
- In case we deploy Ceph on a multi-node env we have to prepare the loop devices on all nodes. For this we moved loop devices setup to the deploy-env Ansible role. For simplicity we need the same device on all nodes, so we create a loop device with a big minor number (/dev/loop100 by default) hoping that only low minor numbers could be busy. - For test jobs we don't need to use different devices for OSD data and metadata. There is no any benefit from this for the test environment. So let's keep it simple and put both OSD data and metadata on the same device. - On multi-node env Ceph cluster needs cluster members see each other, so let's use pod network CIDR. Change-Id: I493b6c31d97ff2fc4992c6bb1994d0c73320cd7b
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
- name: Include prerequisites tasks
|
|
include_tasks:
|
|
file: prerequisites.yaml
|
|
|
|
- name: Configure /etc/hosts
|
|
template:
|
|
src: files/hosts
|
|
dest: /etc/hosts
|
|
|
|
- name: Deploy Containerd
|
|
include_tasks:
|
|
file: containerd.yaml
|
|
|
|
- name: Common K8s tasks
|
|
include_tasks:
|
|
file: common_k8s.yaml
|
|
|
|
- name: Include control-plane tasks
|
|
include_tasks:
|
|
file: control-plane.yaml
|
|
when: inventory_hostname == 'primary'
|
|
|
|
- name: Join workload nodes to cluster
|
|
command: "{{ hostvars['primary']['join_command'].stdout_lines[0] }}"
|
|
when: inventory_hostname in (groups['nodes'] | default([]))
|
|
|
|
- name: Wait for cluster is ready
|
|
become: false
|
|
block:
|
|
- name: Sleep 10 before checking calico nodes
|
|
pause:
|
|
seconds: 10
|
|
- name: Wait for Calico pods ready
|
|
command: kubectl -n kube-system wait --timeout=240s --for=condition=Ready pods -l k8s-app=calico-node
|
|
when: inventory_hostname == 'primary'
|
|
|
|
- name: Add coredns to /etc/resolv.conf
|
|
lineinfile:
|
|
line: nameserver 10.96.0.10
|
|
path: /etc/resolv.conf
|
|
state: present
|
|
insertbefore: "BOF"
|
|
|
|
- name: Loop devices
|
|
include_tasks:
|
|
file: loopback_devices.yaml
|
|
when: loopback_setup
|
|
...
|