Merge "Add openEuler Distro support"

This commit is contained in:
Zuul 2022-03-30 08:22:39 +00:00 committed by Gerrit Code Review
commit f993047f45
9 changed files with 66 additions and 6 deletions

View File

@ -13,6 +13,8 @@ host_os_distributions:
- "8" - "8"
Debian: Debian:
- "bullseye" - "bullseye"
openEuler:
- "20.03"
RHEL: RHEL:
- "8" - "8"
Rocky: Rocky:

View File

@ -48,7 +48,7 @@ execution, which is described in
#. Install Python build dependencies: #. Install Python build dependencies:
For CentOS or RHEL 8, run: For CentOS, RHEL 8 or openEuler, run:
.. code-block:: console .. code-block:: console
@ -67,7 +67,7 @@ If not installing Kolla Ansible in a virtual environment, skip this section.
#. Install the virtual environment dependencies. #. Install the virtual environment dependencies.
For CentOS or RHEL 8, you don't need to do anything. For CentOS, RHEL 8 or openEuler, you don't need to do anything.
For Debian or Ubuntu, run: For Debian or Ubuntu, run:
@ -105,7 +105,7 @@ If installing Kolla Ansible in a virtual environment, skip this section.
#. Install ``pip``. #. Install ``pip``.
For CentOS or RHEL, run: For CentOS, RHEL or openEuler, run:
.. code-block:: console .. code-block:: console
@ -132,6 +132,12 @@ If installing Kolla Ansible in a virtual environment, skip this section.
sudo dnf install ansible sudo dnf install ansible
For openEuler, run:
.. code-block:: console
sudo pip install ansible
For Debian or Ubuntu, run: For Debian or Ubuntu, run:
.. code-block:: console .. code-block:: console
@ -334,7 +340,7 @@ than one node, edit ``multinode`` inventory:
errors in the ``ping`` module. To quickly install Python with Ansible you errors in the ``ping`` module. To quickly install Python with Ansible you
can run: for Debian or Ubuntu: can run: for Debian or Ubuntu:
``ansible -i multinode all -m raw -a "apt -y install python3"``, ``ansible -i multinode all -m raw -a "apt -y install python3"``,
and for CentOS or RHEL: and for CentOS, RHEL or openEuler:
``ansible -i multinode all -m raw -a "dnf -y install python3"``. ``ansible -i multinode all -m raw -a "dnf -y install python3"``.
Kolla passwords Kolla passwords

View File

@ -23,6 +23,7 @@ Kolla Ansible supports the following host Operating Systems (OS):
* CentOS Stream 8 * CentOS Stream 8
* Debian Bullseye (11) * Debian Bullseye (11)
* openEuler 20.03 LTS SP2
* RHEL 8 (deprecated) * RHEL 8 (deprecated)
* Rocky Linux 8 * Rocky Linux 8
* Ubuntu Focal (20.04) * Ubuntu Focal (20.04)

View File

@ -0,0 +1,5 @@
---
features:
- |
openEuler 20.03-LTS-SP2 distro is supported as host os for kolla-ansible
now.

View File

@ -102,6 +102,32 @@
use: systemd use: systemd
become: true become: true
# NOTE(wxy): There are some issues on openEuler, fix them by hand.
# 1. iptables-legacy is used by default.
# 2. NTP sync doesn't work by default.
- block:
# The CentOS Stream 8 in container uses iptables-nft while the host
# openEuler uses iptables-legacy by default. We should update openEuler
# to keep iptables the same.
# Ubuntu 20.04 container OS uses iptables-legacy by default. It works
# well on openEuler.
- name: Set iptables from legacy to nft for centos stream container
shell:
cmd: |
dnf install -y iptables-nft
iptables-save > iptables.txt
iptables-nft-restore < iptables.txt
update-alternatives --set iptables /usr/sbin/iptables-nft
become: true
when: base_distro == 'centos'
# The command `timedatectl status` always times out if the command
# `timedatectl show-timesync` is not run first.
- name: Let ntp service work
shell: timedatectl show-timesync
become: true
when: ansible_facts.distribution == 'openEuler'
- name: Wait for ntp time sync - name: Wait for ntp time sync
command: timedatectl status command: timedatectl status
register: timedatectl_status register: timedatectl_status

View File

@ -1,6 +1,6 @@
--- ---
{% if ansible_os_family == 'Debian' %} {% if ansible_os_family == 'Debian' or ansible_facts.distribution == "openEuler" %}
# Force the use of python3 on Debian and Ubuntu remote hosts. These distros # Force the use of python3 on Debian, Ubuntu and openEuler remote hosts. These distros
# typically have an unversioned Python interpreter which links to python2.7. # typically have an unversioned Python interpreter which links to python2.7.
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
{% endif %} {% endif %}
@ -14,6 +14,9 @@ docker_custom_config:
debug: true debug: true
registry-mirrors: registry-mirrors:
- {{ infra_dockerhub_mirror }} - {{ infra_dockerhub_mirror }}
{% if ansible_facts.distribution == "openEuler" %}
exec-opts: ["native.umask=normal"]
{% endif %}
{% if kolla_python_version is defined and not is_previous_release %} {% if kolla_python_version is defined and not is_previous_release %}
distro_python_version: "{{ kolla_python_version }}" distro_python_version: "{{ kolla_python_version }}"

View File

@ -26,6 +26,16 @@
install_type: source install_type: source
tls_enabled: true tls_enabled: true
- job:
name: kolla-ansible-openeuler-source
parent: kolla-ansible-base
nodeset: kolla-ansible-openeuler-20.03-lts-sp2
voting: false
vars:
base_distro: centos
install_type: source
tls_enabled: true
- job: - job:
name: kolla-ansible-rocky8-source name: kolla-ansible-rocky8-source
parent: kolla-ansible-base parent: kolla-ansible-base

View File

@ -33,6 +33,12 @@
- name: secondary2 - name: secondary2
label: debian-bullseye label: debian-bullseye
- nodeset:
name: kolla-ansible-openeuler-20.03-lts-sp2
nodes:
- name: primary
label: openEuler-20-03-LTS-SP2
- nodeset: - nodeset:
name: kolla-ansible-rocky-8 name: kolla-ansible-rocky-8
nodes: nodes:

View File

@ -12,6 +12,7 @@
jobs: jobs:
- kolla-ansible-centos8s-source - kolla-ansible-centos8s-source
- kolla-ansible-debian-source - kolla-ansible-debian-source
- kolla-ansible-openeuler-source
- kolla-ansible-rocky8-source - kolla-ansible-rocky8-source
- kolla-ansible-ubuntu-source - kolla-ansible-ubuntu-source
- kolla-ansible-centos8s-source-kvm - kolla-ansible-centos8s-source-kvm