openEuler 20.03 LTS SP2 support

openEuler is an open-source Linux based operating system. The current
openEuler kernel is based on Linux and supports multi arch, such as X86_64
and aarch64. It fully unleashes the potential of computing chips. As an
efficient, stable, and secure open-source OS built by global open-source
contributors, openEuler applies to database, big data, cloud computing,
and AI scenarios. openEuler is using RPM for package management.

Note:
Currently there is no available package for uwsgi-plugin-python3 and ovn, so that
openEuler needs manually install them from source.

Website: https://www.openeuler.org/en/

Change-Id: I169a0017998054604a63ac6c177d0f43f8a32ba6
Co-Authored-By: wangxiyuan <wangxiyuan1007@gmail.com>
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
This commit is contained in:
Kevin Zhao 2021-03-31 04:58:28 +00:00 committed by wangxiyuan
parent 6c849e3713
commit 7880ba665e
12 changed files with 80 additions and 22 deletions

View File

@ -106,6 +106,16 @@
nodes:
- controller
- nodeset:
name: devstack-single-node-openeuler-20.03-sp2
nodes:
- name: controller
label: openEuler-20-03-LTS-SP2
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: openstack-two-node
nodes:
@ -683,6 +693,20 @@
# Enable Neutron ML2/OVS services
q-agt: true
- job:
name: devstack-platform-openEuler-20.03-SP2
parent: tempest-full-py3
description: openEuler 20.03 SP2 platform test
nodeset: devstack-single-node-openeuler-20.03-sp2
voting: false
timeout: 9000
vars:
configure_swap_size: 4096
devstack_localrc:
# NOTE(wxy): OVN package is not supported by openEuler yet. Build it
# from source instead.
OVN_BUILD_FROM_SOURCE: True
- job:
name: devstack-no-tls-proxy
parent: tempest-full-py3
@ -788,6 +812,7 @@
- devstack-platform-centos-8-stream
- devstack-platform-centos-9-stream
- devstack-platform-debian-bullseye
- devstack-platform-openEuler-20.03-SP2
- devstack-multinode
- devstack-unit-tests
- openstack-tox-bashate

View File

@ -38,7 +38,7 @@ Install Linux
Start with a clean and minimal install of a Linux system. DevStack
attempts to support the two latest LTS releases of Ubuntu, the
latest/current Fedora version, CentOS/RHEL 8 and OpenSUSE.
latest/current Fedora version, CentOS/RHEL 8, OpenSUSE and openEuler.
If you do not have a preference, Ubuntu 20.04 (Focal Fossa) is the
most tested, and will probably go the smoothest.

View File

@ -1,3 +1,3 @@
ceph # NOPRIME
redhat-lsb-core # not:rhel9
redhat-lsb-core # not:rhel9,openEuler-20.03
xfsprogs

View File

@ -16,6 +16,7 @@ libjpeg-turbo-devel # Pillow 3.0.0
libxml2-devel # lxml
libxslt-devel # lxml
libyaml-devel
make # dist:openEuler-20.03
net-tools
openssh-server
openssl
@ -27,7 +28,8 @@ psmisc
python3-devel
python3-pip
python3-systemd
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
redhat-rpm-config # not:openEuler-20.03 missing dep for gcc hardening flags, see rhbz#1217376
systemd-devel # dist:openEuler-20.03
tar
tcpdump
unzip

View File

@ -6,7 +6,7 @@ ebtables
genisoimage # not:rhel9 required for config_drive
iptables
iputils
kernel-modules
kernel-modules # not:openEuler-20.03
kpartx
parted
polkit

View File

@ -1,5 +1,5 @@
curl
liberasurecode-devel
liberasurecode-devel # not:openEuler-20.03
memcached
rsync-daemon
sqlite

View File

@ -388,7 +388,7 @@ function _ensure_lsb_release {
elif [[ -x $(command -v zypper 2>/dev/null) ]]; then
sudo zypper -n install lsb-release
elif [[ -x $(command -v dnf 2>/dev/null) ]]; then
sudo dnf install -y redhat-lsb-core
sudo dnf install -y redhat-lsb-core || sudo dnf install -y openeuler-lsb
else
die $LINENO "Unable to find or auto-install lsb_release"
fi
@ -459,6 +459,10 @@ function GetDistro {
# Drop the . release as we assume it's compatible
# XXX re-evaluate when we get RHEL10
DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (openEuler) ]]; then
# The DISTRO here is `openEuler-20.03`. While, actually only openEuler
# 20.03 LTS SP2 is fully tested. Other SP version maybe have bugs.
DISTRO="openEuler-$os_RELEASE"
else
# We can't make a good choice here. Setting a sensible DISTRO
# is part of the problem, but not the major issue -- we really
@ -510,6 +514,7 @@ function is_fedora {
fi
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
[ "$os_VENDOR" = "openEuler" ] || \
[ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \
[ "$os_VENDOR" = "RedHatEnterprise" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \
@ -558,7 +563,12 @@ function is_ubuntu {
[ "$os_PACKAGE" = "deb" ]
}
function is_openeuler {
if [[ -z "$os_PACKAGE" ]]; then
GetOSVersion
fi
[ "$os_VENDOR" = "openEuler" ]
}
# Git Functions
# =============

View File

@ -82,19 +82,10 @@ function install_apache_uwsgi {
apxs="apxs"
fi
# This varies based on packaged/installed. If we've
# pip_installed, then the pip setup will only build a "python"
# module that will be either python2 or python3 depending on what
# it was built with.
#
# For package installs, the distro ships both plugins and you need
# to select the right one ... it will not be autodetected.
UWSGI_PYTHON_PLUGIN=python3
if is_ubuntu; then
local pkg_list="uwsgi uwsgi-plugin-python3 libapache2-mod-proxy-uwsgi"
install_package ${pkg_list}
elif is_fedora; then
elif is_fedora && ! is_openeuler; then
# Note httpd comes with mod_proxy_uwsgi and it is loaded by
# default; the mod_proxy_uwsgi package actually conflicts now.
# See:
@ -122,7 +113,6 @@ function install_apache_uwsgi {
popd
# delete the temp directory
sudo rm -rf $dir
UWSGI_PYTHON_PLUGIN=python
fi
if is_ubuntu || is_suse ; then
@ -283,7 +273,7 @@ function write_uwsgi_config {
# configured after graceful shutdown
iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
iniset "$file" uwsgi plugins http,python3
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM
@ -336,7 +326,7 @@ function write_local_uwsgi_http_config {
iniset "$file" uwsgi die-on-term true
iniset "$file" uwsgi exit-on-reload false
iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
iniset "$file" uwsgi plugins http,python3
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM

View File

@ -90,7 +90,7 @@ function install_libvirt {
install_package libvirt libvirt-devel python3-libvirt
if is_arch "aarch64"; then
install_package edk2.git-aarch64
install_package edk2-aarch64
fi
fi

View File

@ -64,6 +64,7 @@
'Debian': '/etc/apache2/sites-enabled/'
'Suse': '/etc/apache2/conf.d/'
'RedHat': '/etc/httpd/conf.d/'
'openEuler': '/etc/httpd/conf.d/'
- name: Discover configurations
find:

View File

@ -227,7 +227,7 @@ write_devstack_version
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
SUPPORTED_DISTROS="bullseye|focal|f34|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9"
SUPPORTED_DISTROS="bullseye|focal|f34|opensuse-15.2|opensuse-tumbleweed|rhel8|rhel9|openEuler-20.03"
if [[ ! ${DISTRO} =~ $SUPPORTED_DISTROS ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
@ -278,6 +278,12 @@ chmod 0440 $TEMPFILE
sudo chown root:root $TEMPFILE
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
# TODO(wxy): Currently some base packages are not installed by default in
# openEuler. Remove the code below once the packaged are installed by default
# in the future.
if [[ $DISTRO == "openEuler-20.03" ]]; then
install_package hostname
fi
# Configure Distro Repositories
# -----------------------------

View File

@ -148,8 +148,32 @@ function fixup_ubuntu {
sudo rm -rf /usr/lib/python3/dist-packages/simplejson-*.egg-info
}
function fixup_openeuler {
if ! is_openeuler; then
return
fi
if is_arch "x86_64"; then
arch="x86_64"
elif is_arch "aarch64"; then
arch="aarch64"
fi
# Some packages' version in openEuler are too old, use the newer ones we
# provide in oepkg. (oepkg is an openEuler third part yum repo which is
# endorsed by openEuler community)
(echo '[openstack-ci]'
echo 'name=openstack'
echo 'baseurl=https://repo.oepkgs.net/openEuler/rpm/openEuler-20.03-LTS-SP2/budding-openeuler/openstack-master-ci/'$arch'/'
echo 'enabled=1'
echo 'gpgcheck=0') | sudo tee -a /etc/yum.repos.d/openstack-master.repo > /dev/null
yum_install liberasurecode-devel
}
function fixup_all {
fixup_ubuntu
fixup_fedora
fixup_suse
fixup_openeuler
}