Skip to content

Commit

Permalink
Merge pull request #2 from mlafeldt/ha-etcd
Browse files Browse the repository at this point in the history
Install Kubernetes using HA etcd
  • Loading branch information
mlafeldt committed Dec 10, 2015
2 parents 1002984 + b769b3d commit 606584e
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@
command: ./dcos package update
when: "'/kubernetes' not in package_list.stdout"

- name: Install etcd-mesos cluster
command: ./dcos package install --yes etcd
when: "'/etcd' not in package_list.stdout"

- name: Wait until etcd is healthy
command: ./dcos marathon app show /etcd
register: etcd_status
until: (etcd_status.stdout|from_json)["tasksHealthy"] > 0
retries: 6
delay: 15

- name: Write Kubernetes configuration
copy:
content: >
{"kubernetes": {"etcd-mesos-framework-name": "etcd"}}
dest: tmp/kubernetes-options.json

- name: Install Kubernetes on DCOS
command: ./dcos package install --yes kubernetes
command: ./dcos package install --yes --options=tmp/kubernetes-options.json kubernetes
when: "'/kubernetes' not in package_list.stdout"

- name: Wait until Kubernetes is healthy
command: ./dcos marathon app show /kubernetes
register: kubernetes_status
until: (kubernetes_status.stdout|from_json)["tasksHealthy"] > 0
retries: 6
delay: 15

- name: Verify that kubectl works
command: ./dcos kubectl get pods --namespace=kube-system

0 comments on commit 606584e

Please sign in to comment.