feat: adopt cephadm (#752)
diff --git a/playbooks/ceph.yml b/playbooks/ceph.yml
new file mode 100644
index 0000000..ede7fbd
--- /dev/null
+++ b/playbooks/ceph.yml
@@ -0,0 +1,28 @@
+# Copyright (c) 2024 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- hosts: "{{ target | default('all') }}"
+ become: true
+ roles:
+ - role: defaults
+ post_tasks:
+ - name: Set a fact with the "atmosphere_images" for other plays
+ ansible.builtin.set_fact:
+ atmosphere_images: "{{ atmosphere_images }}"
+ tags:
+ - always
+
+- import_playbook: vexxhost.ceph.site
+ vars:
+ containerd_pause_image: "{{ atmosphere_images['pause'] }}"
diff --git a/playbooks/csi.yml b/playbooks/csi.yml
index 27d9c29..a0590fe 100644
--- a/playbooks/csi.yml
+++ b/playbooks/csi.yml
@@ -19,3 +19,6 @@
- role: csi
tags:
- csi
+ environment:
+ CEPH_CONTAINER_IMAGE: "{{ cephadm_image | default('quay.io/ceph/ceph:v' + (ceph_version | default('18.2.1'))) }}"
+ CEPH_CONTAINER_BINARY: docker
diff --git a/playbooks/kubernetes.yml b/playbooks/kubernetes.yml
index c4bea74..fca47d3 100644
--- a/playbooks/kubernetes.yml
+++ b/playbooks/kubernetes.yml
@@ -31,6 +31,22 @@
tags:
- always
+- hosts: "{{ target | default('all') }}"
+ become: true
+ gather_facts: false
+ tasks:
+ - name: Install PIP
+ ansible.builtin.package:
+ name: python3-pip
+
+ # (rico) there is dependency isuse with pyopenssl and cryptography before 22.1.0
+ # This make sure we have consist dependency between them.
+ - name: Upgrade pyopenssl in pip
+ ansible.builtin.pip:
+ name:
+ - pyopenssl>=22.1.0
+ extra_args: --upgrade
+
- import_playbook: vexxhost.kubernetes.site
vars:
keepalived_image: "{{ atmosphere_images['keepalived'] }}"
diff --git a/playbooks/openstack.yml b/playbooks/openstack.yml
index be3cc7c..3d12749 100644
--- a/playbooks/openstack.yml
+++ b/playbooks/openstack.yml
@@ -59,6 +59,9 @@
- role: placement
tags:
- placement
+ environment:
+ CEPH_CONTAINER_IMAGE: "{{ cephadm_image | default('quay.io/ceph/ceph:v' + (ceph_version | default('18.2.1'))) }}"
+ CEPH_CONTAINER_BINARY: docker
- name: Configure operating system
hosts: controllers:computes
diff --git a/playbooks/site.yml b/playbooks/site.yml
index 5d44097..d4639ae 100644
--- a/playbooks/site.yml
+++ b/playbooks/site.yml
@@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-- import_playbook: vexxhost.ceph.site
+- name: Install Ceph
+ import_playbook: vexxhost.atmosphere.ceph
- name: Install Kubernetes
import_playbook: vexxhost.atmosphere.kubernetes