Skip to content

Commit ff12bdf

Browse files
Aleix Ramírez Baenask4zuzu
andauthored
B #123: Updates ceph version compatibility constraints (#124)
Signed-off-by: Aleix Ramírez <aramirez@opennebula.io> Co-authored-by: Michal Opala <mopala@opennebula.io>
1 parent 04ab066 commit ff12bdf

13 files changed

Lines changed: 342 additions & 286 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "vendor/ceph-ansible"]
22
path = vendor/ceph-ansible
33
url = https://github.com/ceph/ceph-ansible.git
4-
branch = stable-7.0
4+
branch = stable-9.0

inventory/ceph-hci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ceph:
5858
? osd memory target
5959
: "{{ osd_memory_target | int }}"
6060
osd_auto_discovery: true
61+
public_network: 172.20.0.0/24
6162

6263
mons:
6364
hosts:

inventory/ceph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ceph:
4242
? osds
4343
vars:
4444
osd_auto_discovery: true
45+
public_network: 172.20.0.0/24
4546

4647
mons:
4748
hosts:

inventory/group_vars/ceph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
ceph_origin: distro
3+
ceph_stable_release: squid
34
configure_firewall: false
45
no_log_on_ceph_key_tasks: false

molecule/ceph-hci/molecule.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ provisioner:
4848
GATEWAY: "{{ '${ONE_SUBNET}' | ansible.utils.nthhost(1) }}"
4949
DNS: 1.1.1.1 8.8.8.8
5050
ceph_origin: distro
51+
public_network: "{{ '${ONE_SUBNET}' }}"
5152
configure_firewall: false
5253
no_log_on_ceph_key_tasks: false
5354
osd_auto_discovery: true
55+
ceph:
56+
ceph_stable_release: squid
5457
host_vars:
5558
ceph-hci-f1:
5659
monitor_address: "{{ ansible_host }}"
@@ -80,9 +83,9 @@ provisioner:
8083
8184
platforms:
8285
- name: ceph-hci-f1
83-
groups: [frontend, mons, mgrs]
86+
groups: [frontend, ceph, mons, mgrs]
8487
template:
85-
name: alma8
88+
name: alma9
8689
content: &content
8790
CONTEXT:
8891
GROW_FS: /
@@ -99,9 +102,9 @@ platforms:
99102
pswd: ${ONE_PSWD}
100103

101104
- name: ceph-hci-n1
102-
groups: [node, osds]
105+
groups: [node, ceph, osds]
103106
template:
104-
name: ubuntu2204
107+
name: debian12
105108
content: *content
106109
datablocks: &datablocks
107110
- PERSISTENT: "NO"
@@ -117,9 +120,9 @@ platforms:
117120
auth: *auth
118121

119122
- name: ceph-hci-n2
120-
groups: [node, osds]
123+
groups: [node, ceph, osds]
121124
template:
122-
name: ubuntu2404
125+
name: ubuntu2204
123126
content: *content
124127
datablocks: *datablocks
125128
auth: *auth

playbooks/pre.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
- hosts:
2727
- "{{ frontend_group | d('frontend') }}"
2828
- "{{ node_group | d('node') }}"
29+
- "{{ mon_group_name | d('mons') }}"
30+
- "{{ mgr_group_name | d('mgrs') }}"
31+
- "{{ osd_group_name | d('osds') }}"
2932
collections:
3033
- opennebula.deploy
3134
roles:
@@ -34,6 +37,12 @@
3437

3538
- role: precheck
3639

40+
- hosts:
41+
- "{{ frontend_group | d('frontend') }}"
42+
- "{{ node_group | d('node') }}"
43+
collections:
44+
- opennebula.deploy
45+
roles:
3746
- role: helper/hosts
3847
tags: [hosts]
3948

roles/ceph/repository/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Role Variables
1313

1414
| Name | Type | Default | Example | Description |
1515
|-------------|-------|----------|---------|-----------------------------------------------------------------|
16-
| `ceph.repo` | `str` | `distro` | | Defines type of Ceph repository to use `distro` or `community`. |
16+
| `ceph.repo` | `str` | | `distro` | Defines type of Ceph repository to use `distro` or `community`. Tasks ignored if not set. |
17+
| `ceph_stable_release` | `str` | | `squid` | Defines Ceph version to use. |
1718

1819
Dependencies
1920
------------

roles/ceph/repository/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
_common: []
1212
_specific:
1313
Debian: [qemu-utils]
14-
RedHat: [qemu-img, centos-release-ceph-quincy]
14+
RedHat: [qemu-img, "centos-release-ceph-{{ ceph_stable_release }}"]
1515
register: package
1616
until: package is success
1717
retries: 12

roles/precheck/tasks/ceph.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
- name: Prevent Ceph deployment in the parallel federation deployment mode
3+
ansible.builtin.assert:
4+
that: (features.ceph is undefined)
5+
or
6+
(features.ceph | bool is false)
7+
or
8+
(groups[_frontend_group ~ '0'] is undefined)
9+
msg: Please use sequential federation deployment mode if you want to deploy Ceph.
10+
vars:
11+
_frontend_group: "{{ frontend_group | d('frontend') }}"
12+
run_once: true
13+
14+
# We only support active Ceph releases (https://docs.ceph.com/en/latest/releases/index.html)
15+
- name: Check if specified Ceph release is supported
16+
ansible.builtin.assert:
17+
that: (features.ceph is undefined)
18+
or
19+
(features.ceph | bool is false)
20+
or
21+
((ceph_stable_release is defined) and (ceph_stable_release in _supported))
22+
msg: Please specify one of the supported Ceph versions {{ _supported }} in ceph_stable_release variable.
23+
vars:
24+
_supported:
25+
- reef
26+
- squid
27+
tags: [preinstall]
28+
29+
# We only support active Ceph releases (https://docs.ceph.com/en/latest/releases/index.html)
30+
# and recommended distro families (https://docs.ceph.com/en/latest/start/os-recommendations/)
31+
# Other useful links:
32+
# - https://sigs.centos.org/storage/general/
33+
# - https://ubuntu.com/ceph/docs/supported-ceph-versions
34+
- name: Check if Ceph feature is supported for current distro family
35+
ansible.builtin.assert:
36+
that: (features.ceph is undefined)
37+
or
38+
(features.ceph | bool is false)
39+
or
40+
((ceph_stable_release is defined) and (_repo in _repos))
41+
msg: Please use one of the supported linux distro families to run Ceph {{ ceph_stable_release | d('') }} version
42+
({{ ansible_distribution }}/{{ ansible_distribution_major_version }}/{{ _repo }} combination is unsupported).
43+
vars:
44+
_repo: "{{ ceph.repo | d('community') }}"
45+
_repos: "{{ _supported[ceph_stable_release][ansible_distribution][ansible_distribution_major_version] }}"
46+
_supported:
47+
reef: # Ceph 18.2.z
48+
Debian:
49+
'11': [community]
50+
'12': [community]
51+
Ubuntu:
52+
'22': [distro, community]
53+
AlmaLinux:
54+
'9': [] # Not supported: https://tracker.ceph.com/issues/68802
55+
RedHat:
56+
'9': [] # Not supported: https://tracker.ceph.com/issues/68802
57+
squid: # Ceph 19.2.z
58+
Debian:
59+
'12': [community]
60+
Ubuntu:
61+
'20': [community]
62+
'22': [distro, community]
63+
'24': [distro]
64+
AlmaLinux:
65+
'9': [community]
66+
RedHat:
67+
'9': [community]
68+
tags: [preinstall]

0 commit comments

Comments
 (0)