2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2019 The Nordix Foundation. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
20 - name: Load execution mode variables
21 include_vars: "{{ execution_mode }}.yaml"
23 - name: Delete existing rook cluster if any
25 definition: "{{ lookup('template', config_file) }}"
28 - external-dashboard-https.yaml.j2
30 - storageclass.yaml.j2
38 - name: Delete existing rook cluster CRD if any
40 api_version: apiextensions.k8s.io/v1beta1
42 kind: CustomResourceDefinition
43 name: cephclusters.ceph.rook.io
47 - name: Delete existing rook operator if any
49 definition: "{{ lookup('template', config_file) }}"
59 - name: Wait until rook namespace is deleted
62 name: "{{ rook_namespace }}"
64 until: not result.resources
69 - name: Create rook operator
72 definition: "{{ lookup('template', config_file) }}"
79 - name: Implement Workaround for connectivity problem - ping all tunnels
82 definition: "{{ lookup('template', config_file) }}"
84 - ping-tunnel-workaround.yaml.j2
88 - name: Wait until OPERATOR pod is available
91 namespace: "{{ rook_namespace }}"
93 - app = rook-ceph-operator
95 - status.phase=Running
96 register: rook_mgr_status
98 - rook_mgr_status.resources is defined
99 - rook_mgr_status.resources
103 - name: Create rook cluster
106 definition: "{{ lookup('template', config_file) }}"
111 loop_var: config_file
113 - name: Wait until rook cluster deployment is complete
117 namespace: "{{ rook_namespace }}"
119 - status.state = "Created"
120 register: rook_cluster_status
122 - rook_cluster_status.resources
126 - name: Wait until MGR pods are available
129 namespace: "{{ rook_namespace }}"
131 - app = rook-ceph-mgr
133 - status.phase=Running
134 register: rook_mgr_status
136 - rook_mgr_status.resources is defined
137 - rook_mgr_status.resources
141 - name: Wait until OSD pods are available
144 namespace: "{{ rook_namespace }}"
146 - app = rook-ceph-osd
148 - status.phase=Running
149 register: rook_osd_status
151 - rook_osd_status.resources is defined
152 - rook_osd_status.resources
156 - name: Create rook block storage
159 definition: "{{ lookup('template', config_file) }}"
162 - storageclass.yaml.j2
164 loop_var: config_file
166 - name: Create rook file system
169 definition: "{{ lookup('template', config_file) }}"
172 - filesystem-storageclass.yaml.j2
174 loop_var: config_file
175 when: rook_filesystem|bool
177 - name: Create rook external dashboard
180 definition: "{{ lookup('template', 'external-dashboard-https.yaml.j2') }}"
182 # vim: set ts=2 sw=2 expandtab: