X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=apps%2Fceph%2Fkubespray%2Fplaybooks%2Froles%2Finstall%2Ftasks%2Fmain.yaml;h=60ed129e0d7a39cc60e48c64bd6af2dafee67381;hp=b977018025287c576a429692c0f62c11c0269e37;hb=refs%2Fheads%2F1.15;hpb=a1e1f40e71a48d8c5315f37999b9123c7ea908ab diff --git a/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml b/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml index b977018..60ed129 100644 --- a/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml +++ b/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml @@ -37,7 +37,7 @@ - name: Delete existing rook cluster CRD if any k8s: - api_version: apiextensions.k8s.io/v1beta1 + api_version: apiextensions.k8s.io/v1 state: absent kind: CustomResourceDefinition name: cephclusters.ceph.rook.io @@ -51,6 +51,7 @@ with_items: - operator.yaml.j2 - common.yaml.j2 + - crds.yaml.j2 loop_control: loop_var: config_file ignore_errors: true @@ -66,16 +67,41 @@ delay: 5 tags: reset +- name: label storage nodes # noqa 305 + shell: "kubectl label node {{ item }} {{ rook_storage_label }}=true" + changed_when: true + with_items: "{{ rook_storage_nodes }}" + +- name: taint storage nodes # noqa 305 + shell: "kubectl taint node {{ item }} {{ rook_storage_label }}=true:NoSchedule" + changed_when: true + with_items: "{{ rook_storage_nodes }}" + +- name: label nodes for other workloads # noqa 305 + shell: "kubectl label node {{ item }} {{ rook_storage_label }}=false" + changed_when: true + with_items: "{{ rook_nostorage_nodes }}" + - name: Create rook operator k8s: state: present definition: "{{ lookup('template', config_file) }}" with_items: + - crds.yaml.j2 - common.yaml.j2 - operator.yaml.j2 loop_control: loop_var: config_file +- name: Implement Workaround for connectivity problem - ping all tunnels + k8s: + state: present + definition: "{{ lookup('template', config_file) }}" + with_items: + - ping-tunnel-workaround.yaml.j2 + loop_control: + loop_var: config_file + - name: Wait until OPERATOR pod is available k8s_facts: kind: Pod @@ -88,7 +114,7 @@ until: - rook_mgr_status.resources is defined - rook_mgr_status.resources - retries: 20 + retries: 40 delay: 5 - name: Create rook cluster @@ -111,7 +137,7 @@ register: rook_cluster_status until: - rook_cluster_status.resources - retries: 10 + retries: 20 delay: 5 - name: Wait until MGR pods are available @@ -126,7 +152,7 @@ until: - rook_mgr_status.resources is defined - rook_mgr_status.resources - retries: 30 + retries: 40 delay: 10 - name: Wait until OSD pods are available @@ -141,7 +167,7 @@ until: - rook_osd_status.resources is defined - rook_osd_status.resources - retries: 30 + retries: 60 delay: 10 - name: Create rook block storage @@ -151,14 +177,24 @@ with_items: - pool.yaml.j2 - storageclass.yaml.j2 + loop_control: + loop_var: config_file + +- name: Create rook file system + k8s: + state: present + definition: "{{ lookup('template', config_file) }}" + with_items: - filesystem.yaml.j2 - filesystem-storageclass.yaml.j2 loop_control: loop_var: config_file + when: rook_filesystem|bool - name: Create rook external dashboard k8s: state: present definition: "{{ lookup('template', 'external-dashboard-https.yaml.j2') }}" + when: rook_ceph_dashboard_enabled|bool # vim: set ts=2 sw=2 expandtab: