common: add centos8 support

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>
pull/4884/head
Guillaume Abrioux 2019-11-18 15:05:16 -05:00
parent 2ca3364109
commit 217d95abb2
13 changed files with 38 additions and 19 deletions

View File

@ -85,7 +85,7 @@ dummy:
#centos_package_dependencies:
# - epel-release
# - libselinux-python
# - python3-libselinux
#redhat_package_dependencies: []

View File

@ -85,7 +85,7 @@ fetch_directory: ~/ceph-ansible-keys
#centos_package_dependencies:
# - epel-release
# - libselinux-python
# - python3-libselinux
#redhat_package_dependencies: []

View 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:

View 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

View 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

View File

@ -0,0 +1 @@
RedHat-8.yml

View File

@ -77,7 +77,7 @@ debian_package_dependencies: []
centos_package_dependencies:
- epel-release
- libselinux-python
- python3-libselinux
redhat_package_dependencies: []

View 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(

View 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

View 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

View 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

View 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

View File

@ -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