Skip to content

Commit

Permalink
common: add centos8 support
Browse files Browse the repository at this point in the history
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>
guits and dsavineau committed Jan 8, 2020
1 parent 2ca3364 commit 217d95a
Showing 13 changed files with 38 additions and 19 deletions.
2 changes: 1 addition & 1 deletion group_vars/all.yml.sample
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ dummy:

#centos_package_dependencies:
# - epel-release
# - libselinux-python
# - python3-libselinux

#redhat_package_dependencies: []

2 changes: 1 addition & 1 deletion group_vars/rhcs.yml.sample
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ fetch_directory: ~/ceph-ansible-keys

#centos_package_dependencies:
# - epel-release
# - libselinux-python
# - python3-libselinux

#redhat_package_dependencies: []

Original file line number Diff line number Diff line change
@@ -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:
23 changes: 23 additions & 0 deletions roles/ceph-common/tasks/installs/redhat_dev_repository.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion roles/ceph-container-engine/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions roles/ceph-container-engine/vars/CentOS-8.yml
2 changes: 1 addition & 1 deletion roles/ceph-defaults/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ debian_package_dependencies: []

centos_package_dependencies:
- epel-release
- libselinux-python
- python3-libselinux

redhat_package_dependencies: []

2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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(
1 change: 1 addition & 0 deletions tests/functional/setup.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tox-filestore_to_bluestore.ini
Original file line number Diff line number Diff line change
@@ -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
9 changes: 2 additions & 7 deletions tox-podman.ini
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tox-update.ini
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 217d95a

Please sign in to comment.