]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: add centos8 support
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 18 Nov 2019 20:05:16 +0000 (15:05 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 8 Jan 2020 10:13:46 +0000 (11:13 +0100)
Ceph octopus only supports CentOS 8.

This commit adds CentOS 8 support:
  - update vagrant image in tox configurations.
  - add CentOS 8 repository for el8 dependencies.
  - CentOS 8 container engine is podman (same than RHEL 8).
  - don't use the epel mirror on sepia because it's epel7 only.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
13 files changed:
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-common/tasks/installs/redhat_community_repository.yml
roles/ceph-common/tasks/installs/redhat_dev_repository.yml
roles/ceph-container-engine/tasks/main.yml
roles/ceph-container-engine/vars/CentOS-8.yml [new symlink]
roles/ceph-defaults/defaults/main.yml
tests/conftest.py
tests/functional/setup.yml
tox-filestore_to_bluestore.ini
tox-podman.ini
tox-update.ini
tox.ini

index 06ca800df92dbc7ef1f75daf3c236db13c8e33d2..0f44c4942b8623b94a1196d3b94b2bb7f7810ad1 100644 (file)
@@ -85,7 +85,7 @@ dummy:
 
 #centos_package_dependencies:
 #  - epel-release
-#  - libselinux-python
+#  - python3-libselinux
 
 #redhat_package_dependencies: []
 
index 33fd858a8fde47ca5cdf66cc1b8f269094d0dc63..7bd9c67c46249828d7eed02259f46437f1409578 100644 (file)
@@ -85,7 +85,7 @@ fetch_directory: ~/ceph-ansible-keys
 
 #centos_package_dependencies:
 #  - epel-release
-#  - libselinux-python
+#  - python3-libselinux
 
 #redhat_package_dependencies: []
 
index 332491d4a5faab0839bc7f57c54cf83548de9857..aee8fffe9309296f7e47881db9e23aa9a84c984d 100644 (file)
@@ -5,6 +5,7 @@
   register: result
   until: result is succeeded
   tags: with_pkg
+  when: ansible_distribution_major_version | int == 7
 
 - name: configure red hat ceph community repository stable key
   rpm_key:
index 2b767e9291ec933e3ff665f6b1f38e9e1fe9c8a3..85a32a1ab938663bf21747ff93b8e7727d4425b8 100644 (file)
@@ -1,4 +1,27 @@
 ---
+- name: install dnf-plugins-core
+  package:
+    name: dnf-plugins-core
+  register: result
+  until: result is succeeded
+  tags: with_pkg
+
+- name: enable ceph-el8 copr
+  command: dnf copr enable -y ktdreyer/ceph-el8
+  args:
+    creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ktdreyer:ceph-el8.repo
+    warn: false
+  register: result
+  until: result is succeeded
+
+- name: enable ceph lab extras repository
+  yum_repository:
+    name: lab-extras
+    baseurl: http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
+    description: Sepia Lab Extras repository
+    enabled: true
+    gpgcheck: false
+
 - name: fetch ceph red hat development repository
   uri:
     # Use the centos repo since we don't currently have a dedicated red hat repo
index c6af42601d00a6523d4661ddf54f0ef303aef771..d328c124f6043b08b63323ec7f493e5d3ea64d96 100644 (file)
@@ -1,4 +1,4 @@
 ---
 - name: include pre_requisites/prerequisites.yml
   include_tasks: pre_requisites/prerequisites.yml
-  when: not is_atomic
+  when: not is_atomic | bool
diff --git a/roles/ceph-container-engine/vars/CentOS-8.yml b/roles/ceph-container-engine/vars/CentOS-8.yml
new file mode 120000 (symlink)
index 0000000..d49e1cd
--- /dev/null
@@ -0,0 +1 @@
+RedHat-8.yml
\ No newline at end of file
index 1515bfac40fd1fa28fc9c7ae142b6a124eb7ee8a..df2ac751b18ddc213f5bd4edf5b528e57d1d7bce 100644 (file)
@@ -77,7 +77,7 @@ debian_package_dependencies: []
 
 centos_package_dependencies:
   - epel-release
-  - libselinux-python
+  - python3-libselinux
 
 redhat_package_dependencies: []
 
index 032e704a0ff448fed2afdca28ff8df1bf8473597..0d8a01e2b6825c942e037a175638a62c94d3230b 100644 (file)
@@ -64,8 +64,6 @@ def setup(host):
     address = host.interface(public_interface).addresses[0]
 
     if docker:
-        container_binary = "docker"
-    if docker and str_to_bool(os.environ.get('IS_PODMAN', False)):  # noqa E501
         container_binary = "podman"
 
     data = dict(
index 3fb644454254877edbaa882a17c9cac21c64e60f..f709940f8efc91342860d553e1fed4828ec2887c 100644 (file)
@@ -66,6 +66,7 @@
             state: absent
       when:
         - ansible_distribution == 'CentOS'
+        - ansible_distribution_major_version | int == 7
         - not is_atomic | bool
 
     - name: resize logical volume for root partition to fill remaining free space
index 01b5ef2caf4c611488a15edd098a8428064bf52f..8dd68284011a9819eade28a7436eaa7dfd7df0ab 100644 (file)
@@ -20,8 +20,8 @@ setenv=
   ANSIBLE_STDOUT_CALLBACK = yaml
 #  non_container: DEV_SETUP = True
   # Set the vagrant box image to use
-  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
-  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host
+  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
+  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
   ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64
 
   # Set the ansible inventory host file to be used according to which distrib we are running on
index 84cbc96cc988acf9b3ad34357b8baca7e3ed87a7..c3a7811826aec23261b4e5eeb42da2eb88bcc597 100644 (file)
@@ -22,12 +22,11 @@ setenv=
   # only available for ansible >= 2.5
   ANSIBLE_STDOUT_CALLBACK = yaml
   # Set the vagrant box image to use
-  CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host
+  CEPH_ANSIBLE_VAGRANT_BOX = centos/8
 
   # Set the ansible inventory host file to be used according to which distrib we are running on
   INVENTORY = {env:_INVENTORY:hosts}
-  PLAYBOOK = site-docker.yml.sample
-  IS_PODMAN = TRUE
+  PLAYBOOK = site-container.yml.sample
   CEPH_STABLE_RELEASE = nautilus
 
 deps= -r{toxinidir}/tests/requirements.txt
@@ -48,10 +47,6 @@ commands=
       ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
       ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
       ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-master} \
-      container_binary=podman \
-      container_package_name=podman \
-      container_service_name=podman \
-      container_binding_name=podman \
   "
 
   # wait 30sec for services to be ready
index 3147c344dd46b3e2eba08fb94d68f843dd7d50e0..6103314460cea925d34f4b239e77448e3d520bcd 100644 (file)
@@ -20,8 +20,8 @@ setenv=
   ANSIBLE_STDOUT_CALLBACK = yaml
 #  non_container: DEV_SETUP = True
   # Set the vagrant box image to use
-  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
-  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host
+  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
+  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
   ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64
 
   # Set the ansible inventory host file to be used according to which distrib we are running on
diff --git a/tox.ini b/tox.ini
index ce7de02b92b19d0e3006ea09889e6ed5866cf4b6..39ad3480c083db74c861eec5a9077c7a138e70dd 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -385,8 +385,8 @@ setenv=
   ANSIBLE_STDOUT_CALLBACK = yaml
   non_container: DEV_SETUP = True
   # Set the vagrant box image to use
-  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
-  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host
+  centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
+  centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8
   ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64
 
   # Set the ansible inventory host file to be used according to which distrib we are running on