2018-02-17 15:11:49 +00:00
< p align = "center" >
2019-06-06 18:50:21 +00:00
< a href = "https://keel.sh" target = "_blank" > < img width = "100" src = "https://keel.sh/img/logo.png" > < / a >
2018-02-17 15:11:49 +00:00
< / p >
< p align = "center" >
< a href = "https://hub.docker.com/r/keelhq/keel/" >
< img src = "https://circleci.com/gh/keel-hq/keel/tree/master.svg?style=shield&circle-token=0239846a42cfa188de531058b9a2116a4b8600d8" alt = "CircleCI" >
< / a >
< a href = "https://goreportcard.com/report/github.com/keel-hq/keel" >
< img src = "https://goreportcard.com/badge/github.com/keel-hq/keel" alt = "Go Report" >
< / a >
2018-07-01 13:49:41 +00:00
< a href = "https://img.shields.io/docker/pulls/keelhq/keel.svg" >
< img src = "https://img.shields.io/docker/pulls/keelhq/keel.svg" alt = "Docker Pulls" >
2019-04-27 07:06:49 +00:00
< / a >
< a href = "https://drone-kr.webrelay.io/keel-hq/keel" >
< img src = "https://drone-kr.webrelay.io/api/badges/keel-hq/keel/status.svg" alt = "Drone Status" >
< / a >
2019-06-29 04:03:12 +00:00
< a href = "https://www.boss.dev/issues/repo/keel-hq/keel" >
< img src = "https://img.shields.io/endpoint.svg?url=https://api.boss.dev/badge/enabled/keel-hq/keel&style=flat" alt = "Boss Bounty Badge" >
< / a >
2018-02-17 15:11:49 +00:00
< / p >
2017-07-16 20:45:26 +00:00
2017-06-11 23:03:56 +00:00
# Keel - automated Kubernetes deployments for the rest of us
2017-06-11 10:29:33 +00:00
2017-07-09 20:33:52 +00:00
* Website [https://keel.sh ](https://keel.sh )
2017-08-04 17:45:22 +00:00
* Slack - [kubernetes.slack.com ](https://kubernetes.slack.com ) look for channel #keel
2017-06-11 10:29:33 +00:00
2017-07-09 20:33:52 +00:00
Keel is a tool for automating [Kubernetes ](https://kubernetes.io/ ) deployment updates. Keel is stateless, robust and lightweight.
2017-06-11 10:29:33 +00:00
2017-07-09 20:33:52 +00:00
Keel provides several key features:
2017-07-04 15:42:25 +00:00
2017-07-24 18:57:15 +00:00
* __[Kubernetes](https://kubernetes.io/) and [Helm ](https://helm.sh ) providers__ - Keel has direct integrations with Kubernetes and Helm.
* __No CLI/API__ - tired of `f***ctl` for everything? Keel doesn't have one. Gets job done through labels, annotations, charts.
* __Semver policies__ - specify update policy for each deployment/Helm release individually.
2017-07-04 16:53:21 +00:00
2017-07-09 20:33:52 +00:00
* __Automatic [Google Container Registry ](https://cloud.google.com/container-registry/ ) configuration__ - Keel automatically sets up topic and subscriptions for your deployment images by periodically scanning your environment.
2017-06-14 17:50:41 +00:00
2019-06-06 15:37:57 +00:00
* __[Native, DockerHub, Quay and Azure container registry webhooks](https://keel.sh/docs/#triggers) support__ - once webhook is received impacted deployments will be identified and updated.
2017-06-11 23:03:56 +00:00
2019-06-06 15:37:57 +00:00
* __ [Polling ](https://keel.sh/docs/#polling )__ - when webhooks and pubsub aren't available - Keel can still be useful by checking Docker Registry for new tags (if current tag is semver) or same tag SHA digest change (ie: `latest` ).
2017-07-09 20:41:42 +00:00
2019-07-16 21:43:17 +00:00
* __Notifications__ - out of the box Keel has Slack, Hipchat, Mattermost and standard webhook notifications, more info [here ](https://keel.sh/docs/#notifications )
2017-07-04 15:42:25 +00:00
2018-02-17 15:11:49 +00:00
< p align = "center" >
2019-06-06 18:51:32 +00:00
< a href = "https://keel.sh" target = "_blank" > < img width = "700" src = "https://keel.sh/img/keel_high_level.png" > < / a >
2018-02-17 15:11:49 +00:00
< / p >
2017-06-11 10:29:33 +00:00
2017-10-08 09:51:27 +00:00
### Support
2018-02-17 15:11:49 +00:00
Support Keel's development by:
2017-10-08 09:51:27 +00:00
* [Patreon ](https://patreon.com/keel )
* [Paypal ](https://www.paypal.me/keelhq )
2018-02-17 15:11:49 +00:00
* Star this repository
* [Follow on Twitter ](https://twitter.com/keel_hq )
2017-10-08 09:51:27 +00:00
2019-05-29 22:06:16 +00:00
### Warp speed quick start
2019-05-29 22:49:13 +00:00
To achieve warp speed, we will be using [sunstone.dev ](https://about.sunstone.dev ) service and [Minikube ](https://kubernetes.io/docs/tasks/tools/install-minikube/ ).
2019-05-29 22:06:16 +00:00
Start Minikube:
```bash
minikube start
```
Install customized Keel (feel free to change credentials, namespace and version tag) straight from your `kubectl` .
```bash
# To override default latest semver tag, add &tag=x.x.x query argument to the URL below
2019-05-29 22:39:49 +00:00
kubectl apply -f https://sunstone.dev/keel?namespace=default& username=admin& password=admin& tag=latest
2019-05-29 22:06:16 +00:00
# and get Keel IP:
minikube service --namespace default keel --url
http://192.168.99.100:3199
```
2019-05-29 22:39:49 +00:00
> We are overriding default latest semver tag with **latest** since it has the new UI. If you want to use latest semver, just remove the `&tag=latest` part from the URL.
2019-05-29 22:33:43 +00:00
### Creating remotely accessible Keel instance
Keel can work together with [webhook relay tunnels ](https://webhookrelay.com ). To deploy Keel with Webhook Relay sidecar you will need to get [a token ](https://my.webhookrelay.com/tokens ), then pre-create [a tunnel ](https://my.webhookrelay.com/tunnels ) and:
```
2019-05-29 23:11:59 +00:00
kubectl apply -f https://sunstone.dev/keel?namespace=default& username=admin& password=admin& relay_key=TOKEN_KEY& relay_secret=TOKEN_SECRET& relay_tunnel=TUNNEL_NAME& tag=latest
2019-05-29 22:33:43 +00:00
```
Now, you can access Keel remotely.
2019-05-29 22:06:16 +00:00
### Helm quick start
2018-08-06 08:19:29 +00:00
Prerequisites:
* [Helm ](https://docs.helm.sh/using_helm/#installing-helm )
* Kubernetes
2018-11-23 15:17:36 +00:00
You need to add this Chart repo to Helm:
2018-08-06 08:19:29 +00:00
2018-11-23 15:17:36 +00:00
```bash
2018-12-17 13:54:54 +00:00
helm repo add keel https://charts.keel.sh
2018-11-23 15:17:36 +00:00
helm repo update
2018-08-06 08:19:29 +00:00
```
2018-11-23 15:17:36 +00:00
Install through Helm (with Helm provider enabled by default):
2018-08-06 08:19:29 +00:00
```bash
2018-12-17 13:54:54 +00:00
helm upgrade --install keel --namespace=kube-system keel/keel
2018-08-06 08:19:29 +00:00
```
If you work mostly with regular Kubernetes manifests, you can install Keel without Helm provider support:
```bash
2018-12-17 13:54:54 +00:00
helm upgrade --install keel --namespace=keel keel/keel --set helmProvider.enabled="false"
2018-08-06 08:19:29 +00:00
```
That's it, see [Configuration ](https://github.com/keel-hq/keel#configuration ) section now.
2017-07-09 20:33:52 +00:00
### Quick Start
2017-06-16 14:30:09 +00:00
2018-02-17 15:11:49 +00:00
< p align = "center" >
2019-06-06 18:51:32 +00:00
< a href = "https://keel.sh" target = "_blank" > < img width = "700" src = "https://keel.sh/img/examples/force-workflow.png" > < / a >
2018-02-17 15:11:49 +00:00
< / p >
2017-07-09 20:33:52 +00:00
A step-by-step guide to install Keel on your Kubernetes cluster is viewable on the Keel website:
2017-07-01 12:56:33 +00:00
2019-06-06 15:37:57 +00:00
[https://keel.sh/examples/#example-1-push-to-deploy ](https://keel.sh/examples/#example-1-push-to-deploy )
2017-07-08 17:52:33 +00:00
2018-02-25 20:10:08 +00:00
### Configuration
Once Keel is deployed, you only need to specify update policy on your deployment file or Helm chart:
2019-06-06 18:50:21 +00:00
```yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: wd
namespace: default
labels:
name: "wd"
annotations:
keel.sh/policy: minor # < -- policy name according to https: / / semver . org /
keel.sh/trigger: poll # < -- actively query registry , otherwise defaults to webhooks
spec:
template:
metadata:
name: wd
labels:
app: wd
spec:
containers:
- image: karolisr/webhook-demo:0.0.8
imagePullPolicy: Always
name: wd
command: ["/bin/webhook-demo"]
ports:
- containerPort: 8090
```
2018-02-25 20:10:08 +00:00
No additional configuration is required. Enabling continuous delivery for your workloads has never been this easy!
2017-07-09 20:33:52 +00:00
### Documentation
2017-07-08 17:52:33 +00:00
2017-07-09 20:33:52 +00:00
Documentation is viewable on the Keel Website:
2017-07-08 17:52:33 +00:00
2019-06-06 15:37:57 +00:00
[https://keel.sh/docs/#introduction ](https://keel.sh/docs/#introduction )
2017-07-08 17:52:33 +00:00
2017-07-09 20:33:52 +00:00
### Contributing
2017-07-08 17:52:33 +00:00
2019-06-06 15:37:57 +00:00
Before starting to work on some big or medium features - raise an issue [here ](https://github.com/keel-hq/keel/issues ) so we can coordinate our efforts.
We use pull requests, so:
1. Fork this repository
2. Create a branch on your local copy with a sensible name
3. Push to your fork and open a pull request
2017-07-08 17:52:33 +00:00
2017-07-09 20:33:52 +00:00
### Developing Keel
2017-07-08 17:52:33 +00:00
2019-05-02 21:46:17 +00:00
If you wish to work on Keel itself, you will need Go 1.12+ installed. Make sure you put Keel into correct Gopath and `go build` (dependency management is done through [dep ](https://github.com/golang/dep )).
2018-04-04 20:50:52 +00:00
To test Keel while developing:
1. Launch a Kubernetes cluster like Minikube or Docker for Mac with Kubernetes.
2. Change config to use it: `kubectl config use-context docker-for-desktop`
3. Build Keel from `cmd/keel` directory.
4. Start Keel with: `keel --no-incluster` . This will use Kubeconfig from your home.
2018-11-14 22:48:13 +00:00
### Running unit tests
2019-04-23 22:02:37 +00:00
Get a test parser (makes output nice):
2018-11-14 22:48:13 +00:00
2019-04-23 22:02:37 +00:00
```bash
2019-04-25 16:16:02 +00:00
go get github.com/mfridman/tparse
2018-11-14 22:48:13 +00:00
```
2019-04-23 22:02:37 +00:00
To run unit tests:
```bash
2018-11-14 22:48:13 +00:00
make test
```
### Running e2e tests
Prerequisites:
- configured kubectl + kubeconfig
- a running cluster (test suite will create testing namespaces and delete them after tests)
- Go environment (will compile Keel before running)
Once prerequisites are ready:
2019-06-06 15:37:57 +00:00
```bash
2018-11-14 22:48:13 +00:00
make e2e
2019-06-29 04:03:12 +00:00
```