|
2 | 2 |
|
3 | 3 | [](https://travis-ci.org/deis/workflow) [](http://goreportcard.com/report/deis/workflow) |
4 | 4 |
|
5 | | -Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications on your own servers. Deis builds on [Kubernetes](http://kubernetes.io/) to provide a lightweight, [Heroku-inspired](http://heroku.com) workflow. |
| 5 | +Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage |
| 6 | +applications on your own servers. Deis builds on [Kubernetes](http://kubernetes.io/) to provide |
| 7 | +a lightweight, [Heroku-inspired](http://heroku.com) workflow. |
6 | 8 |
|
7 | 9 | ## Work in Progress |
8 | 10 |
|
9 | 11 |  |
10 | 12 |
|
11 | | -Deis Workflow v2 is changing quickly. Your feedback and participation are more than welcome, but be aware that this project is considered a work in progress. |
| 13 | +Deis Workflow v2 is changing quickly. Your feedback and participation are more than welcome, but be |
| 14 | +aware that this project is considered a work in progress. |
12 | 15 |
|
13 | 16 | ## Hacking Workflow |
14 | 17 |
|
15 | | -First, install [deis/etcd](https://github.com/deis/etcd) as described in its documentation. Ensure that the deis-etcd-service is running and healthy by accessing its port 4001 and seeing that the environment variable `DEIS_ETCD_1_SERVICE_HOST` is set. |
| 18 | +First, install [helm](http://helm.sh) and [boot up a kubernetes cluster][install-k8s]. Next, add the |
| 19 | +deis repository to your chart list: |
16 | 20 |
|
17 | | -One way to test this by running commands from another pod in the same namespace: |
| 21 | +```console |
| 22 | +$ helm repo add deis https://github.com/deis/charts |
| 23 | +``` |
| 24 | + |
| 25 | +Then, install Deis! |
18 | 26 |
|
19 | 27 | ```console |
20 | | -$ kubectl exec alpine -- env | grep DEIS_ETCD_1_SERVICE | sort |
21 | | -DEIS_ETCD_1_SERVICE_HOST=10.247.187.217 |
22 | | -DEIS_ETCD_1_SERVICE_PORT=2380 |
23 | | -DEIS_ETCD_1_SERVICE_PORT_CLIENT=4100 |
24 | | -DEIS_ETCD_1_SERVICE_PORT_PEER=2380 |
25 | | -$ kubectl exec alpine -- curl -sS 10.247.187.217:4100/version |
26 | | -{"etcdserver":"2.2.1","etcdcluster":"2.2.0"} |
| 28 | +$ helm install deis/deis |
27 | 29 | ``` |
28 | 30 |
|
29 | | -Next build the deis/workflow image and push it to a Docker registry. The `$DEIS_REGISTRY` environment variable must point to a registry accessible to your Kubernetes cluster. You may need to configure the Docker engines on your Kubernetes nodes to allow `--insecure-registry 192.168.0.0/16` (or the appropriate address range). |
| 31 | +You can then monitor their status by running |
30 | 32 |
|
31 | 33 | ```console |
32 | | -$ make docker-build docker-push |
| 34 | +$ kubectl get pods --namespace=deis |
33 | 35 | ``` |
34 | 36 |
|
35 | | -Finally create a PostgreSQL database and the Deis workflow service: |
| 37 | +Once this is done, you can SSH into the minion running the controller and run the following: |
| 38 | + |
| 39 | +``` |
| 40 | +$ curl -sSL http://deis.io/deis-cli/install.sh | sh |
| 41 | +$ sudo mv deis /bin |
| 42 | +$ kubectl get service deis-workflow |
| 43 | +$ deis register 10.247.59.157 # or the appropriate CLUSTER_IP |
| 44 | +$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" |
| 45 | +$ eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa |
| 46 | +$ deis keys:add ~/.ssh/id_rsa.pub |
| 47 | +$ deis create --no-remote |
| 48 | +Creating Application... done, created madras-radiator |
| 49 | +$ deis pull deis/example-go -a madras-radiator |
| 50 | +Creating build... ..o |
| 51 | +``` |
| 52 | + |
| 53 | +If you want to hack on a new feature, build the deis/workflow image and push it to a Docker |
| 54 | +registry. The `$DEIS_REGISTRY` environment variable must point to a registry accessible to your |
| 55 | +Kubernetes cluster. You may need to configure the Docker engines on your Kubernetes nodes to allow |
| 56 | +`--insecure-registry 192.168.0.0/16` (or the appropriate address range). |
| 57 | + |
36 | 58 | ```console |
37 | | -$ make kube-create-all |
38 | | -kubectl create -f manifests/deis-database-rc.yml |
39 | | -replicationcontrollers/deis-database |
40 | | -kubectl create -f manifests/deis-database-service.yml |
41 | | -services/deis-database |
42 | | -kubectl create -f manifests/deis-workflow-rc.yml.tmp |
43 | | -replicationcontrollers/deis-workflow |
44 | | -kubectl create -f manifests/deis-workflow-service.yml |
45 | | -services/deis-workflow |
46 | | -$ kubectl get pod |
47 | | -NAME READY STATUS RESTARTS AGE |
48 | | -deis-database-34ch4 1/1 Running 0 12m |
49 | | -deis-etcd-1-140w7 1/1 Running 2 1h |
50 | | -deis-etcd-1-3jib8 1/1 Running 2 1h |
51 | | -deis-etcd-1-qf9ab 1/1 Running 2 1h |
52 | | -deis-etcd-discovery-dp2kp 1/1 Running 0 1h |
53 | | -deis-workflow-e8qks 1/1 Running 0 12m |
54 | | -$ kubectl logs deis-workflow-e8qks |
55 | | -+ export ETCD_PORT=4100 |
56 | | -+ ETCD_PORT=4100 |
57 | | -+ export ETCD_HOST=10.247.187.217 |
58 | | -+ ETCD_HOST=10.247.187.217 |
59 | | -... |
| 59 | +$ make docker-build docker-push |
60 | 60 | ``` |
61 | 61 |
|
| 62 | +You'll want to modify the deis chart to use your custom image, then run `helm install` on the |
| 63 | +chart. |
| 64 | + |
62 | 65 | ## License |
63 | 66 |
|
64 | 67 | Copyright 2013, 2014, 2015 Engine Yard, Inc. |
65 | 68 |
|
66 | 69 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0> |
67 | 70 |
|
68 | 71 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
| 72 | + |
| 73 | + |
| 74 | +[install-k8s]: http://kubernetes.io/gettingstarted/ |
0 commit comments