From 1ae03932c7000a2830c556730406c774f6d3a783 Mon Sep 17 00:00:00 2001 From: Petr OspalĂ˝ Date: Wed, 19 Dec 2018 14:57:05 +0100 Subject: Add the playbook for deploying the kubernetes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the orchestration manager is used the rancher project Change-Id: I178bfc8edc7f381dd735e3b19ac34f3cf6efdf53 Issue-ID: OOM-1551 Signed-off-by: Petr OspalĂ˝ --- ansible/rancher_kubernetes.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ansible/rancher_kubernetes.yml (limited to 'ansible') 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'" -- cgit 1.2.3-korg