summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hrabos <s.hrabos@partner.samsung.com>2018-12-19 14:11:43 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-19 14:11:43 +0000
commit83b5756da40a92387702f292f91e0a88210a93d9 (patch)
tree65cf2dc10516366756ef9fe6923b0328abb6d801
parente928b555085a44efe23c54e7cd43db303f6016fc (diff)
parent1ae03932c7000a2830c556730406c774f6d3a783 (diff)
Merge "Add the playbook for deploying the kubernetes"
-rw-r--r--ansible/rancher_kubernetes.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible/rancher_kubernetes.yml b/ansible/rancher_kubernetes.yml
new file mode 100644
index 00000000..196f1fc2
--- /dev/null
+++ b/ansible/rancher_kubernetes.yml
@@ -0,0 +1,31 @@
+---
+- name: Install binaries for controlling deployment
+ hosts: infrastructure
+ roles:
+ - kubectl
+ - helm
+
+- name: Deploy rancher server and create k8s env
+ hosts: infrastructure
+ roles:
+ - rancher
+ vars:
+ rancher_role: server
+
+- name: Deploy rancher agents
+ hosts: kubernetes
+ roles:
+ - rancher
+ vars:
+ rancher_role: agent
+
+- name: Wait for Kubernetes environment to be healthy
+ hosts: infrastructure
+ tasks:
+ - name: Check cluster health
+ uri:
+ url: "{{ rancher_server_url }}/v2-beta/projects/{{ k8s_env_id }}"
+ register: env_info
+ retries: 30
+ delay: 15
+ until: "env_info.json.healthState == 'healthy'"