Merge "Remove support for Centos-7"
This commit is contained in:
commit
b8e07fca1a
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -31,8 +31,8 @@ Vagrant.configure(2) do |config|
|
|||||||
./run_tests.sh
|
./run_tests.sh
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
config.vm.define "centos7" do |centos7|
|
config.vm.define "centos8" do |centos8|
|
||||||
centos7.vm.box = "centos/7"
|
centos8.vm.box = "centos/8"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "debian8" do |debian8|
|
config.vm.define "debian8" do |debian8|
|
||||||
|
@ -260,23 +260,4 @@ lxc_centos_package_key: "{{ _lxc_centos_package_key }}"
|
|||||||
# the OBS repositories. If you want to use the same mirror in both cases, then leave the
|
# the OBS repositories. If you want to use the same mirror in both cases, then leave the
|
||||||
# 'lxc_hosts_opensuse_mirror_obs_url' to its default value.
|
# 'lxc_hosts_opensuse_mirror_obs_url' to its default value.
|
||||||
lxc_hosts_opensuse_mirror_url: "{{ opensuse_mirror | default('http://download.opensuse.org') }}"
|
lxc_hosts_opensuse_mirror_url: "{{ opensuse_mirror | default('http://download.opensuse.org') }}"
|
||||||
lxc_hosts_opensuse_mirror_obs_url: "{{ lxc_hosts_opensuse_mirror_url }}"
|
lxc_hosts_opensuse_mirror_obs_url: "{{ lxc_hosts_opensuse_mirror_url }}"
|
||||||
|
|
||||||
## A list of 'legacy' lxc configuration keys and their corresponding new
|
|
||||||
## keys. Use this map to substitute keys suitable for other/newer lxc versions
|
|
||||||
lxc_template_config_key_mapping:
|
|
||||||
4:
|
|
||||||
fstab: lxc.mount.fstab
|
|
||||||
rootfs: lxc.rootfs.path
|
|
||||||
rootfs_backend: lxc.rootfs.backend
|
|
||||||
uts_name: lxc.uts.name
|
|
||||||
3:
|
|
||||||
fstab: lxc.mount.fstab
|
|
||||||
rootfs: lxc.rootfs.path
|
|
||||||
rootfs_backend: lxc.rootfs.backend
|
|
||||||
uts_name: lxc.uts.name
|
|
||||||
2:
|
|
||||||
fstab: lxc.mount.fstab
|
|
||||||
rootfs: lxc.rootfs
|
|
||||||
rootfs_backend: lxc.rootfs.backend
|
|
||||||
uts_name: lxc.utsname
|
|
@ -26,7 +26,7 @@ galaxy_info:
|
|||||||
- bionic
|
- bionic
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 8
|
||||||
- name: opensuse
|
- name: opensuse
|
||||||
versions:
|
versions:
|
||||||
- 15.0
|
- 15.0
|
||||||
|
@ -51,13 +51,10 @@ fi
|
|||||||
# Source distribution information
|
# Source distribution information
|
||||||
source /etc/os-release || source /usr/lib/os-release
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
|
|
||||||
# Prefer dnf over yum for CentOS.
|
|
||||||
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
|
|
||||||
|
|
||||||
# Figure out the appropriate package install command
|
# Figure out the appropriate package install command
|
||||||
case ${ID,,} in
|
case ${ID,,} in
|
||||||
*suse*) pkg_mgr_cmd="zypper -n in" ;;
|
*suse*) pkg_mgr_cmd="zypper -n in" ;;
|
||||||
centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
|
centos|rhel|fedora) pkg_mgr_cmd="dnf install -y" ;;
|
||||||
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
|
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
|
||||||
# Gentoo needs to have version set since it's rolling
|
# Gentoo needs to have version set since it's rolling
|
||||||
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;
|
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2016, Rackspace US, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
- name: Deploy upstream COPR yum repo for LXC 2.0
|
|
||||||
yum_repository:
|
|
||||||
name: thm-lxc2.0
|
|
||||||
description: "COPR repository for LXC 2.0 packages on CentOS 7"
|
|
||||||
baseurl: "{{ lxc_centos_package_baseurl }}"
|
|
||||||
enabled: yes
|
|
||||||
gpgcheck: yes
|
|
||||||
gpgkey: "{{ lxc_centos_package_key }}"
|
|
||||||
repo_gpgcheck: no
|
|
||||||
priority: 99
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Add GPG key for COPR LXC repo
|
|
||||||
rpm_key:
|
|
||||||
key: "{{ lxc_centos_package_key }}"
|
|
||||||
state: present
|
|
||||||
register: add_keys
|
|
||||||
until: add_keys is success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
|
|
||||||
- name: Download EPEL gpg keys
|
|
||||||
get_url:
|
|
||||||
url: "{{ lxc_centos_epel_key }}"
|
|
||||||
dest: /etc/pki/rpm-gpg
|
|
||||||
register: _get_yum_keys
|
|
||||||
until: _get_yum_keys is success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
|
|
||||||
- name: Install EPEL gpg keys
|
|
||||||
rpm_key:
|
|
||||||
key: "/etc/pki/rpm-gpg/{{ lxc_centos_epel_key.split('/')[-1] }}"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Install the EPEL repository
|
|
||||||
yum_repository:
|
|
||||||
name: epel-lxc_hosts
|
|
||||||
baseurl: "{{ lxc_centos_epel_mirror ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
|
||||||
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
|
|
||||||
gpgcheck: yes
|
|
||||||
enabled: yes
|
|
||||||
state: present
|
|
||||||
includepkgs: 'aria2 python2-lxc'
|
|
||||||
register: install_epel_repo
|
|
||||||
until: install_epel_repo is success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
|
|
||||||
- name: Install distro packages
|
|
||||||
package:
|
|
||||||
pkg: "{{ lxc_hosts_distro_packages }}"
|
|
||||||
state: "{{ lxc_hosts_package_state }}"
|
|
||||||
register: install_packages
|
|
||||||
until: install_packages is success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
|
||||||
- lxc-packages
|
|
||||||
|
|
||||||
- name: Remove sub system lock if found
|
|
||||||
file:
|
|
||||||
path: "/var/lock/subsys/lxc"
|
|
||||||
state: "absent"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
tags:
|
|
||||||
- lxc-directories
|
|
||||||
|
|
||||||
- name: Enable lxc service
|
|
||||||
service:
|
|
||||||
name: lxc
|
|
||||||
enabled: "yes"
|
|
||||||
tags:
|
|
||||||
- lxc_hosts-config
|
|
@ -74,21 +74,6 @@
|
|||||||
- lxc-bridge
|
- lxc-bridge
|
||||||
- lxc-interfaces
|
- lxc-interfaces
|
||||||
|
|
||||||
- name: Create networking post-up and post-down data for Red Hat
|
|
||||||
lineinfile:
|
|
||||||
dest: "/etc/sysconfig/network-scripts/ifdown-post"
|
|
||||||
line: ". /etc/sysconfig/network-scripts/ifdown-post-{{ lxc_net_bridge }}"
|
|
||||||
insertbefore: "^exit\ 0$"
|
|
||||||
when:
|
|
||||||
- ansible_os_family | lower == "redhat"
|
|
||||||
- ansible_distribution_major_version == "7"
|
|
||||||
notify:
|
|
||||||
- Restart bridge
|
|
||||||
tags:
|
|
||||||
- lxc-post-up
|
|
||||||
- lxc-post-down
|
|
||||||
- lxc_hosts-config
|
|
||||||
|
|
||||||
# NOTE(mhayden): There are ifup hooks that handle the customized LXC container
|
# NOTE(mhayden): There are ifup hooks that handle the customized LXC container
|
||||||
# networking. Starting lxc-net will trample over these hooks and cause
|
# networking. Starting lxc-net will trample over these hooks and cause
|
||||||
# networking issues for containers.
|
# networking issues for containers.
|
||||||
|
@ -39,17 +39,6 @@
|
|||||||
- lxc-files
|
- lxc-files
|
||||||
- lxc-config
|
- lxc-config
|
||||||
|
|
||||||
- name: Pull lxc version
|
|
||||||
command: "lxc-ls --version"
|
|
||||||
changed_when: false
|
|
||||||
register: lxc_version
|
|
||||||
tags:
|
|
||||||
- skip_ansible_lint
|
|
||||||
|
|
||||||
- name: Enable or Disable lxc three syntax
|
|
||||||
set_fact:
|
|
||||||
lxc_major_version: "{{ lxc_version.stdout.split('.')[0] }}"
|
|
||||||
|
|
||||||
- name: Drop lxc veth check script
|
- name: Drop lxc veth check script
|
||||||
copy:
|
copy:
|
||||||
src: "lxc-veth-check.sh"
|
src: "lxc-veth-check.sh"
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e -x
|
|
||||||
|
|
||||||
{{ lxc_cache_prep_pre_commands }}
|
|
||||||
|
|
||||||
{% include 'templates/prep-scripts/_container_sys_setup.sh.j2' %}
|
|
||||||
|
|
||||||
if [[ -d "/etc/pki/rpm-gpg" ]]; then
|
|
||||||
rpm --import /etc/pki/rpm-gpg/* || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The containers do not need the LXC repository (only hosts need it).
|
|
||||||
rm -f /etc/yum.repos.d/thm-lxc2.0*
|
|
||||||
|
|
||||||
# Prefer dnf over yum for CentOS.
|
|
||||||
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
|
|
||||||
|
|
||||||
# Create yum/dnf transaction file and run it all at once
|
|
||||||
echo "update" > /tmp/package-transaction.txt
|
|
||||||
echo "install {{ lxc_cache_distro_packages | join(' ') }}" >> /tmp/package-transaction.txt
|
|
||||||
echo "run" >> /tmp/package-transaction.txt
|
|
||||||
$RHT_PKG_MGR -y shell /tmp/package-transaction.txt
|
|
||||||
yum-complete-transaction --cleanup-only
|
|
||||||
rm -f /tmp/package-transaction.txt
|
|
||||||
rm -f /usr/bin/python
|
|
||||||
ln -s /usr/bin/python2.7 /usr/bin/python
|
|
||||||
rm /etc/machine-id || true
|
|
||||||
rm /var/lib/dbus/machine-id || true
|
|
||||||
rm /etc/sysctl.d/* || true
|
|
||||||
echo '' > /etc/sysctl.conf
|
|
||||||
touch /etc/machine-id
|
|
||||||
yum clean all
|
|
||||||
mkdir -p /var/backup
|
|
||||||
chage -I -1 -d -1 -m 0 -M 99999 -E -1 root
|
|
||||||
|
|
||||||
# Set the IP of the lxcbr0 interface as the DNS server
|
|
||||||
echo "nameserver {{ lxc_net_address }}" > /etc/resolv.conf
|
|
||||||
systemctl enable systemd-networkd
|
|
||||||
|
|
||||||
{{ lxc_cache_prep_post_commands }}
|
|
@ -1,49 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2016, Rackspace US, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
system_config_dir: "/etc/sysconfig"
|
|
||||||
systemd_utils_prefix: "/lib/systemd"
|
|
||||||
|
|
||||||
_lxc_centos_package_baseurl: https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/epel-7-x86_64/
|
|
||||||
_lxc_centos_package_key: https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/pubkey.gpg
|
|
||||||
|
|
||||||
# Required rpm packages.
|
|
||||||
_lxc_hosts_distro_packages:
|
|
||||||
- aria2
|
|
||||||
- bridge-utils
|
|
||||||
- btrfs-progs
|
|
||||||
- dbus
|
|
||||||
- dnsmasq
|
|
||||||
- git
|
|
||||||
- libseccomp
|
|
||||||
- lxc
|
|
||||||
- lxc-devel
|
|
||||||
- lxc-libs
|
|
||||||
- lxc-templates
|
|
||||||
- policycoreutils-python
|
|
||||||
- procps
|
|
||||||
- python2-lxc
|
|
||||||
- unzip
|
|
||||||
- xz
|
|
||||||
|
|
||||||
lxc_xz_bin: xz
|
|
||||||
|
|
||||||
lxc_cached_network_interfaces:
|
|
||||||
- src: "lxc-net-redhat-bridge.cfg.j2"
|
|
||||||
dest: "/etc/sysconfig/network-scripts/ifcfg-{{ lxc_net_bridge }}"
|
|
||||||
- src: "lxc-net-suseredhat-postdown.cfg.j2"
|
|
||||||
dest: "/etc/sysconfig/network-scripts/ifdown-post-{{ lxc_net_bridge }}"
|
|
||||||
mode: "0755"
|
|
||||||
interface: "${DEVICE}"
|
|
@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2016, Rackspace US, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
_lxc_hosts_container_image_url: "http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-191001/x86_64/centos-7-x86_64-docker.tar.xz"
|
|
||||||
|
|
||||||
_lxc_cache_map:
|
|
||||||
distro: centos
|
|
||||||
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
|
|
||||||
release: 7
|
|
||||||
copy_from_host:
|
|
||||||
- /etc/default/locale
|
|
||||||
- /etc/environment
|
|
||||||
- /etc/localtime
|
|
||||||
- /etc/locale.conf
|
|
||||||
- /etc/protocols
|
|
||||||
- /etc/pki/rpm-gpg/
|
|
||||||
- /etc/yum/pluginconf.d/fastestmirror.conf
|
|
||||||
- /etc/yum.repos.d/
|
|
||||||
|
|
||||||
_lxc_cache_prep_template: "prep-scripts/centos_7_prep.sh.j2"
|
|
||||||
|
|
||||||
_lxc_cache_distro_packages:
|
|
||||||
- ca-certificates
|
|
||||||
- cronie
|
|
||||||
- gcc
|
|
||||||
- iproute
|
|
||||||
- iputils
|
|
||||||
- libffi-devel
|
|
||||||
- openssh-server
|
|
||||||
- openssl
|
|
||||||
- openssl-devel
|
|
||||||
- policycoreutils
|
|
||||||
- python2
|
|
||||||
- python-devel
|
|
||||||
- python3-devel
|
|
||||||
- rsync
|
|
||||||
- setup
|
|
||||||
- sudo
|
|
||||||
- systemd
|
|
||||||
- systemd-sysv
|
|
||||||
- systemd-networkd
|
|
||||||
- systemd-resolved
|
|
||||||
- tar
|
|
||||||
- wget
|
|
||||||
- which
|
|
||||||
- yum-plugin-priorities
|
|
||||||
- yum-plugin-rpm-warm-cache
|
|
||||||
- yum-utils
|
|
@ -34,9 +34,9 @@
|
|||||||
tox_env: dir
|
tox_env: dir
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-lxc-dir-centos-7
|
name: openstack-ansible-lxc-dir-centos-8
|
||||||
parent: openstack-ansible-lxc-container-create
|
parent: openstack-ansible-lxc-container-create
|
||||||
nodeset: centos-7
|
nodeset: centos-8
|
||||||
vars:
|
vars:
|
||||||
tox_env: dir
|
tox_env: dir
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-lxc-dir-centos-7
|
- openstack-ansible-lxc-dir-centos-8
|
||||||
- openstack-ansible-lxc-dir-ubuntu-bionic
|
- openstack-ansible-lxc-dir-ubuntu-bionic
|
||||||
- openstack-ansible-lxc-dir-ubuntu-focal
|
- openstack-ansible-lxc-dir-ubuntu-focal
|
||||||
- openstack-ansible-lxc-btrfs-ubuntu-bionic
|
- openstack-ansible-lxc-btrfs-ubuntu-bionic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user