commit bb73290f4493fd01e4df641af91bd891aebdd44f Author: Jonathan Rosser Date: Wed Sep 30 15:38:26 2020 +0100 Update supported operating systems Remove centos-7 Remove suse Update vagrantfile for debian buster Change-Id: I5ebef1d635c0dd9569fc1a61d821d66864f16e15 diff --git a/Vagrantfile b/Vagrantfile index bf2400c..2dbcc20 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -31,15 +31,7 @@ Vagrant.configure(2) do |config| ./run_tests.sh SHELL - config.vm.define "centos7" do |centos7| - centos7.vm.box = "centos/7" - end - - config.vm.define "debian8" do |debian8| - debian8.vm.box = "debian/jessie64" - end - - config.vm.define "debian9" do |debian9| + config.vm.define "debian10" do |debian10| debian9.vm.box = "debian/stretch64" end @@ -47,16 +39,13 @@ Vagrant.configure(2) do |config| gentoo.vm.box = "generic/gentoo" end - config.vm.define "opensuse150" do |leap150| - leap150.vm.box = "opensuse/openSUSE-15.0-x86_64" - end - - config.vm.define "opensuse151" do |leap151| - leap151.vm.box = "opensuse/openSUSE-15.1-x86_64" - end - config.vm.define "ubuntu1804" do |bionic| bionic.disksize.size = "40GB" bionic.vm.box = "ubuntu/bionic64" end + + config.vm.define "ubuntu2004" do |focal| + bionic.disksize.size = "40GB" + bionic.vm.box = "ubuntu/focal64" + end end diff --git a/bindep.txt b/bindep.txt index bb77692..a72962a 100644 --- a/bindep.txt +++ b/bindep.txt @@ -26,25 +26,12 @@ gcc # Base requirements for Ubuntu -git-core [platform:dpkg platform:suse] +git-core [platform:dpkg] libssl-dev [platform:dpkg] libffi-dev [platform:dpkg] python3 [platform:dpkg] python3-apt [platform:dpkg] python3-dev [platform:dpkg] -# Base requirements for RPM distros -gcc-c++ [platform:rpm] -git [platform:rpm !platform:suse] -libffi-devel [platform:rpm] -openssl-devel [platform:rpm] -python3-dnf [platform:fedora] -python3-devel [platform:rpm] - # Base requirements for Gentoo git [platform:gentoo] - -# For SELinux -libselinux-python3 [platform:redhat] -libsemanage-python3 [platform:redhat] -iptables [platform:redhat] diff --git a/meta/main.yml b/meta/main.yml index 8f8fd7f..dbab724 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -26,14 +26,6 @@ galaxy_info: - name: Ubuntu versions: - bionic - - name: EL - versions: - - 7 - - name: opensuse - versions: - - 42.1 - - 42.2 - - 42.3 categories: - cloud - nspawn diff --git a/templates/prep-scripts/nspawn_centos_prep.sh.j2 b/templates/prep-scripts/nspawn_centos_prep.sh.j2 deleted file mode 100644 index f143809..0000000 --- a/templates/prep-scripts/nspawn_centos_prep.sh.j2 +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018, 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. - -# {{ ansible_managed }} - -set -e - -{{ nspawn_cache_prep_pre_commands }} - -{% include 'templates/prep-scripts/_container_sys_setup.sh.j2' %} - -rpm --import /etc/pki/rpm-gpg/* -# 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 {{ (nspawn_container_distro_packages | union(nspawn_container_distro_required_packages) | unique) | 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 -yum clean all - -rm -f /tmp/package-transaction.txt - -rm -f /usr/bin/python || true -ln -s /usr/bin/python2.7 /usr/bin/python - -for action in disable; do - systemctl ${action} sshd.service || true -done - -systemctl enable systemd-hostnamed.service -systemctl enable systemd-networkd.service -systemctl enable systemd-resolved.service -ln -sf /var/run/systemd/resolve/resolv.conf /etc/resolv.conf - -userdel --force --remove centos || true - -{{ nspawn_cache_prep_post_commands }} diff --git a/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 b/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 deleted file mode 100644 index dbce150..0000000 --- a/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018, 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. - -# {{ ansible_managed }} - -set -e - -{{ nspawn_cache_prep_pre_commands }} - -{% include 'templates/prep-scripts/_container_sys_setup.sh.j2' %} - -# We have (tried to!) copied repo-oss and repo-update from the host so wipe everything else. -find /etc/zypp/repos.d/ -type f ! -name "repo-oss.repo" -a ! -name "repo-update.repo" -delete -zypper lr | grep -q 'repo-oss' || zypper --quiet ar {{ nspawn_hosts_opensuse_mirror_url }}/distribution/leap/{{ ansible_distribution_version }}/repo/oss repo-oss -zypper lr | grep -q 'repo-update' || zypper --quiet ar {{ nspawn_hosts_opensuse_mirror_url }}/update/leap/{{ ansible_distribution_version }}/oss repo-update - -# Disable recommended packages. Only update what's really needed -if ! fgrep -qx "solver.onlyRequires = true" /etc/zypp/zypp.conf; then - echo -e "\n\n## Disable recommended packages\nsolver.onlyRequires = true" >> /etc/zypp/zypp.conf -fi - -# Key import -zypper --gpg-auto-import-keys -n dup --force-resolution -l -zypper --gpg-auto-import-keys -n in --force-resolution -l {{ (nspawn_container_distro_packages | union(nspawn_container_distro_required_packages) | unique) | join(' ') }} - -rm -f /usr/bin/python || true -ln -s /usr/bin/python2.7 /usr/bin/python - -for action in disable; do - systemctl ${action} wicked.service || true - systemctl ${action} wickedd.service || true - systemctl ${action} wickedd-auto4.service || true - systemctl ${action} wickedd-dhcp4.service || true - systemctl ${action} wickedd-dhcp6.service || true - systemctl ${action} wickedd-nanny.service || true - systemctl ${action} sshd.service || true -done - -systemctl enable systemd-hostnamed.service -systemctl enable systemd-networkd.service - -userdel --force --remove opensuse || true - -{{ nspawn_cache_prep_post_commands }} diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml deleted file mode 100644 index 2f07d1e..0000000 --- a/vars/redhat-7.yml +++ /dev/null @@ -1,65 +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. - -_nspawn_hosts_container_image_url: "https://github.com/CentOS/sig-cloud-instance-images/raw/CentOS-7/docker/centos-7-docker.tar.xz" - -_nspawn_hosts_distro_packages: - - bridge-utils - - btrfs-progs - - dbus - - dnsmasq - - git - - libseccomp - - psmisc - - systemd-networkd - - unzip - - xz - -_nspawn_container_distro_packages: - - ca-certificates - - cronie - - dbus - - gcc - - iproute - - iputils - - openssh-server - - openssl - - policycoreutils - - python2 - - python-devel - - python-libs - - rsync - - setup - - sudo - - systemd - - systemd-networkd - - systemd-resolved - - tar - - tzdata - - wget - - which - - yum-plugin-priorities - - yum-plugin-rpm-warm-cache - - yum-utils - -_nspawn_cache_map: - distro: centos - arch: amd64 - release: 7 - -_nspawn_copy_from_host: - - /etc/pki/rpm-gpg/ - - /etc/yum/pluginconf.d/fastestmirror.conf - - /etc/yum.repos.d/ diff --git a/vars/suse-15.yml b/vars/suse-15.yml deleted file mode 100644 index 204ef5d..0000000 --- a/vars/suse-15.yml +++ /dev/null @@ -1,70 +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. - -_nspawn_hosts_container_image_url: null -_nspawn_hosts_container_image_download_legacy: true - -_nspawn_hosts_distro_packages: - - apparmor-parser - - apparmor-profiles - - apparmor-utils - - bridge-utils - - btrfsprogs - - dbus-1 - - dnsmasq - - git-core - - libseccomp2 - - xz - -_nspawn_container_distro_packages: - - ca-certificates - - ca-certificates-cacert - - ca-certificates-mozilla - - cronie - - dbus-1 - - gcc - - iproute2 - - iputils - - libpython2_7-1_0 - - libpython3_6m1_0 - - openssh - - openssl - - python - - python-devel - - python-xml - - rsync - - sudo - - systemd - - tar - - timezone - - wget - - which - -_nspawn_cache_map: - distro: opensuse - arch: "{{ nspawn_architecture_mapping.get(ansible_architecture) }}" - release: "{{ hostvars[physical_host]['ansible_distribution_version'] }}" - -_nspawn_copy_from_host: - - /etc/zypp/repos.d/repo-oss.repo - - /etc/zypp/repos.d/repo-update.repo - -## Set default mirror for openSUSE repositories -# NOTE(hwoarang): Ensure that the full path to the 'opensuse' directory is used. -# Additionally, set 'nspawn_hosts_opensuse_mirror_obs_url' to a mirror which also mirrors -# the OBS repositories. If you want to use the same mirror in both cases, then leave the -# 'nspawn_hosts_opensuse_mirror_obs_url' to its default value. -nspawn_hosts_opensuse_mirror_url: 'http://download.opensuse.org' -nspawn_hosts_opensuse_mirror_obs_url: "{{ nspawn_hosts_opensuse_mirror_url }}"