Skip to content

Commit

Permalink
Merge branch 'master' into nh/remove-local-dev-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Huanca committed Jul 17, 2019
2 parents 9079606 + 66a68fa commit 2339d64
Show file tree
Hide file tree
Showing 27 changed files with 904 additions and 236 deletions.
66 changes: 3 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,70 +152,10 @@ jobs:
at: /tmp/binaries
- run:
name: Setup Testing Environment
command: |
echo "Installing git and jq"
sudo apt-get install -yqq jq git
echo "Installing Reckoner"
sudo cp /tmp/binaries/reckoner-linux-amd64 /usr/local/bin/reckoner
reckoner version
echo "Installing Kind"
curl -sLO https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64
chmod 0755 kind-linux-amd64
sudo mv kind-linux-amd64 /usr/local/bin/kind
kind version
echo "Installing Kubectl"
curl -sLO https://storage.googleapis.com/kubernetes-release/release/v1.12.7/bin/linux/amd64/kubectl
chmod 0755 kubectl
sudo mv kubectl /usr/local/bin/
kubectl version --client
echo "Installing Helm"
curl -sL https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz | tar xzv linux-amd64/helm
sudo mv linux-amd64/helm /usr/local/bin/helm
rm -rf linux-amd64
helm version --client
echo "Creating Kubernetes Cluster with Kind"
kind create cluster --wait=90s
docker ps -a
echo "Setting up kubecfg"
cp $(kind get kubeconfig-path --name=kind) ~/.kube/config
kubectl version
echo "Setting up Helm on Kubernetes"
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount kube-system:tiller
helm init --service-account tiller --wait
- run:
name: basic.yml Test Running Whole Course
command: |
test_environ_var=testing reckoner plot end_to_end_testing/basic.yml
helm list --output json | jq . -C
command: "./end_to_end_testing/setup.sh"
- run:
name: basic.yml Check reckoner run for installed services
command: |
helm list --output json | jq -e '.Releases[]|select(.Name == "nginx-ingress")|.Namespace == "infra"'
helm list --output json | jq -e '.Releases[]|select(.Name == "go-harbor")|.Namespace == "test"'
helm list --output json | jq -e '.Releases[]|select(.Name == "redis-env")|.Namespace == "redis-test-namespace"'
helm list --output json | jq -e '.Releases[]|select(.Name == "nginx-ingress")|.Status == "DEPLOYED"'
helm list --output json | jq -e '.Releases[]|select(.Name == "go-harbor")|.Status == "DEPLOYED"'
helm list --output json | jq -e '.Releases[]|select(.Name == "redis-env")|.Status == "DEPLOYED"'
helm list --output json | jq -e '[.Releases[].Name] | contains(["redis-hook"])'
helm list --output json | jq -e '[.Releases[].Name] | contains(["redis-failed-hook"])|not'
- run:
name: basic.yml Test Running Only One Chart
command: |
reckoner plot --only nginx-ingress end_to_end_testing/basic.yml
helm list --output json | jq -e '.Releases[]|select(.Name == "nginx-ingress")|.Status == "DEPLOYED"'
test_environ_var=somevalue reckoner plot --only nginx-ingress --only redis-env end_to_end_testing/basic.yml
helm list --output json | jq -e '.Releases[]|select(.Name == "nginx-ingress")|.Status == "DEPLOYED"'
helm list --output json | jq -e '.Releases[]|select(.Name == "redis-env")|.Status == "DEPLOYED"'
helm get values redis-env --output json | jq -e '.test_environ_var == "somevalue"'
name: Run end to end tests
command: "./end_to_end_testing/run_end_to_end.sh"
publish-binaries:
executor: python-3-7
steps:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [unreleased]
## [1.4.0]
### Breaking Changes
- Removed the `--local-development` flag from `plot` command (unused) and cleaned up test dependencies
- Reckoner now has exit codes that reflect the state of the course run.
Reckoner will immediately exit with a non-zero exit code when a chart or hook fails to run. Previous
behavior to continue on error can be enabled by using the `--continue-on-error` flag on your `plot`.

## [1.3.0]
### Breaking Changes
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,31 @@ pip install git+https://github.com/reactiveops/reckoner@master

For development see [CONTRIBUTING.md](./CONTRIBUTING.md).

## Usage
## Quickstart

In course.yaml, write:
```
charts:
grafana:
namespace: grafana
set-values:
image:
tag: 6.2.5
polaris-dashboard:
namespace: polaris-dashboard
repository:
git: https://github.com/FairwindsOps/charts
path: stable
chart: polaris
```

```bash
reckoner plot course.yaml
```

Grafana and Polaris should now be installed on your cluster!

## Extended Usage

### As standalone shell command
- Usage: reckoner [OPTIONS] COMMAND [ARGS]...
Expand All @@ -43,6 +67,7 @@ For development see [CONTRIBUTING.md](./CONTRIBUTING.md).
* `--debug`: Pass --debug to helm
* `--dry-run`: Pass --dry-run to helm so no action is taken. Also includes `--debug`
* `--heading <chart>`: Run only the specified chart out of the course.yml
* `--continue-on-error`: If any charts or hooks fail, continue installing other charts in the course
* `--helm-args <helm-arg>`: Pass arbitrary flags and parameters to all
helm chart commands in your course.yml. Example:
`--helm-args --set=foo=toast`, or `--helm-args --recreate-pods`.
Expand Down Expand Up @@ -209,3 +234,8 @@ charts:
```

The alternative is to use the files method described above

## Contributing
* [Code of Conduct](CODE_OF_CONDUCT.md)
* [Roadmap](ROADMAP.md)
* [Contributing](CONTRIBUTING.md)
11 changes: 11 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Roadmap

## Q32019
Below is a list of work we plan to get done this quarter. Some more details can be found
[in the milestone](https://github.com/FairwindsOps/reckoner/milestone/4)

* Alpha support for Helm 3
* Exit codes for exit status
* Type support
* Schema validation (stretch goal)

Loading

0 comments on commit 2339d64

Please sign in to comment.