From 7f527f6195e680bd4a4eda42fc6451e1a70f7ac5 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Thu, 5 Sep 2024 06:41:01 +0000 Subject: [PATCH] Drop support for RHEL 7 / CentOS 7 (#11246) * Simplify docker systemd unit systemd handles missing unit by ignoring the dependency so we don't need to template them. * Remove RHEL 7/CentOS 7 support - remove ref in kubespray roles - move CI from centos 7 to 8 - remove docs related to centos7 * Remove container-storage-setup Only used for RHEL 7 and CentOS 7 --- README.md | 4 +- Vagrantfile | 3 -- contrib/dind/group_vars/all/distro.yaml | 2 +- docs/CNI/calico.md | 2 +- docs/CRI/docker.md | 8 ---- docs/developers/ci.md | 6 +-- docs/developers/vagrant.md | 2 +- docs/operating_systems/centos.md | 5 -- inventory/sample/group_vars/all/offline.yml | 2 +- playbooks/ansible_version.yml | 1 - .../molecule/default/molecule.yml | 6 --- roles/bootstrap-os/tasks/centos.yml | 29 +---------- roles/bootstrap-os/tasks/redhat.yml | 11 ----- .../docker-storage/defaults/main.yml | 19 -------- .../files/install_container_storage_setup.sh | 23 --------- .../docker-storage/tasks/main.yml | 48 ------------------- .../templates/docker-storage-setup.j2 | 35 -------------- roles/container-engine/docker/meta/main.yml | 2 - .../docker/templates/docker.service.j2 | 14 ++---- .../nvidia_gpu/vars/centos-7.yml | 3 -- roles/kubernetes/preinstall/defaults/main.yml | 3 -- .../tasks/0120-growpart-azure-centos-7.yml | 44 ----------------- roles/kubernetes/preinstall/tasks/main.yml | 10 ---- roles/kubernetes/preinstall/vars/main.yml | 7 +-- .../kubespray-defaults/defaults/main/main.yml | 7 --- .../roles/kubevirt-images/defaults/main.yml | 7 --- .../roles/packet-ci/defaults/main.yml | 1 - ...cket_centos8-calico-ha-once-localhost.yml} | 2 +- ...co-ha.yml => packet_centos8-calico-ha.yml} | 2 +- ...l => packet_centos8-flannel-addons-ha.yml} | 2 +- ...o.yml => packet_centos8-multus-calico.yml} | 2 +- ...ml => packet_centos8-weave-upgrade-ha.yml} | 2 +- ...uter.rb => vagrant_centos8-kube-router.rb} | 2 +- ...er.yml => vagrant_centos8-kube-router.yml} | 2 +- 34 files changed, 22 insertions(+), 296 deletions(-) delete mode 100644 roles/container-engine/docker-storage/defaults/main.yml delete mode 100644 roles/container-engine/docker-storage/files/install_container_storage_setup.sh delete mode 100644 roles/container-engine/docker-storage/tasks/main.yml delete mode 100644 roles/container-engine/docker-storage/templates/docker-storage-setup.j2 delete mode 100644 roles/kubernetes-apps/container_engine_accelerator/nvidia_gpu/vars/centos-7.yml delete mode 100644 roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml rename tests/files/{packet_centos7-calico-ha-once-localhost.yml => packet_centos8-calico-ha-once-localhost.yml} (93%) rename tests/files/{packet_centos7-calico-ha.yml => packet_centos8-calico-ha.yml} (91%) rename tests/files/{packet_centos7-flannel-addons-ha.yml => packet_centos8-flannel-addons-ha.yml} (98%) rename tests/files/{packet_centos7-multus-calico.yml => packet_centos8-multus-calico.yml} (80%) rename tests/files/{packet_centos7-weave-upgrade-ha.yml => packet_centos8-weave-upgrade-ha.yml} (90%) rename tests/files/{vagrant_centos7-kube-router.rb => vagrant_centos8-kube-router.rb} (95%) rename tests/files/{vagrant_centos7-kube-router.yml => vagrant_centos8-kube-router.yml} (84%) diff --git a/README.md b/README.md index 9d3a57c81..7bb62ef17 100644 --- a/README.md +++ b/README.md @@ -143,11 +143,11 @@ vagrant up - **Flatcar Container Linux by Kinvolk** - **Debian** Bookworm, Bullseye - **Ubuntu** 20.04, 22.04, 24.04 -- **CentOS/RHEL** 7, [8, 9](docs/operating_systems/centos.md#centos-8) +- **CentOS/RHEL** [8, 9](docs/operating_systems/centos.md#centos-8) - **Fedora** 37, 38 - **Fedora CoreOS** (see [fcos Note](docs/operating_systems/fcos.md)) - **openSUSE** Leap 15.x/Tumbleweed -- **Oracle Linux** 7, [8, 9](docs/operating_systems/centos.md#centos-8) +- **Oracle Linux** [8, 9](docs/operating_systems/centos.md#centos-8) - **Alma Linux** [8, 9](docs/operating_systems/centos.md#centos-8) - **Rocky Linux** [8, 9](docs/operating_systems/centos.md#centos-8) - **Kylin Linux Advanced Server V10** (experimental: see [kylin linux notes](docs/operating_systems/kylinlinux.md)) diff --git a/Vagrantfile b/Vagrantfile index 9733105b0..8b43088b0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -22,8 +22,6 @@ SUPPORTED_OS = { "ubuntu2004" => {box: "generic/ubuntu2004", user: "vagrant"}, "ubuntu2204" => {box: "generic/ubuntu2204", user: "vagrant"}, "ubuntu2404" => {box: "bento/ubuntu-24.04", user: "vagrant"}, - "centos" => {box: "centos/7", user: "vagrant"}, - "centos-bento" => {box: "bento/centos-7.6", user: "vagrant"}, "centos8" => {box: "centos/8", user: "vagrant"}, "centos8-bento" => {box: "bento/centos-8", user: "vagrant"}, "almalinux8" => {box: "almalinux/8", user: "vagrant"}, @@ -36,7 +34,6 @@ SUPPORTED_OS = { "opensuse-tumbleweed" => {box: "opensuse/Tumbleweed.x86_64", user: "vagrant"}, "oraclelinux" => {box: "generic/oracle7", user: "vagrant"}, "oraclelinux8" => {box: "generic/oracle8", user: "vagrant"}, - "rhel7" => {box: "generic/rhel7", user: "vagrant"}, "rhel8" => {box: "generic/rhel8", user: "vagrant"}, "debian11" => {box: "debian/bullseye64", user: "vagrant"}, "debian12" => {box: "debian/bookworm64", user: "vagrant"}, diff --git a/contrib/dind/group_vars/all/distro.yaml b/contrib/dind/group_vars/all/distro.yaml index b9c2670e9..279536c00 100644 --- a/contrib/dind/group_vars/all/distro.yaml +++ b/contrib/dind/group_vars/all/distro.yaml @@ -18,7 +18,7 @@ distro_settings: init: | /sbin/init centos: &CENTOS - image: "centos:7" + image: "centos:8" user: "centos" pid1_exe: /usr/lib/systemd/systemd init: | diff --git a/docs/CNI/calico.md b/docs/CNI/calico.md index 8708f0bcc..916426827 100644 --- a/docs/CNI/calico.md +++ b/docs/CNI/calico.md @@ -424,7 +424,7 @@ calico_wireguard_enabled: true The following OSes will require enabling the EPEL repo in order to bring in wireguard tools: -* CentOS 7 & 8 +* CentOS 8 * AlmaLinux 8 * Rocky Linux 8 * Amazon Linux 2 diff --git a/docs/CRI/docker.md b/docs/CRI/docker.md index b5de70274..aba0051d8 100644 --- a/docs/CRI/docker.md +++ b/docs/CRI/docker.md @@ -16,14 +16,6 @@ Enabling the `overlay2` graph driver: docker_storage_options: -s overlay2 ``` -Enabling `docker_container_storage_setup`, it will configure devicemapper driver on Centos7 or RedHat7. -Deployers must be define a disk path for `docker_container_storage_setup_devs`, otherwise docker-storage-setup will be executed incorrectly. - -```yaml -docker_container_storage_setup: true -docker_container_storage_setup_devs: /dev/vdb -``` - Changing the Docker cgroup driver (native.cgroupdriver); valid options are `systemd` or `cgroupfs`, default is `systemd`: ```yaml diff --git a/docs/developers/ci.md b/docs/developers/ci.md index e60e11f41..406ad156d 100644 --- a/docs/developers/ci.md +++ b/docs/developers/ci.md @@ -8,7 +8,7 @@ To generate this Matrix run `./tests/scripts/md-table/main.py` |---| --- | --- | --- | --- | --- | --- | --- | --- | almalinux8 | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | amazon | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | -centos7 | :white_check_mark: | :x: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | +centos8 | :white_check_mark: | :x: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | debian11 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | debian12 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | fedora37 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | @@ -26,7 +26,7 @@ ubuntu24 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | |---| --- | --- | --- | --- | --- | --- | --- | --- | almalinux8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | -centos7 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | +centos8 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian11 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian12 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | fedora37 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | @@ -44,7 +44,7 @@ ubuntu24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | |---| --- | --- | --- | --- | --- | --- | --- | --- | almalinux8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | -centos7 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | +centos8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian11 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian12 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | fedora37 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | diff --git a/docs/developers/vagrant.md b/docs/developers/vagrant.md index 824b3953b..83b5b999e 100644 --- a/docs/developers/vagrant.md +++ b/docs/developers/vagrant.md @@ -80,7 +80,7 @@ cat << EOF > vagrant/config.rb \$instance_name_prefix = "kub" \$vm_cpus = 1 \$num_instances = 3 -\$os = "centos-bento" +\$os = "centos8-bento" \$subnet = "10.0.20" \$network_plugin = "flannel" \$inventory = "$INV" diff --git a/docs/operating_systems/centos.md b/docs/operating_systems/centos.md index 4b6b7331e..2f1125ae0 100644 --- a/docs/operating_systems/centos.md +++ b/docs/operating_systems/centos.md @@ -1,10 +1,5 @@ # CentOS and derivatives -## CentOS 7 - -The maximum python version officially supported in CentOS is 3.6. Ansible as of version 5 (ansible core 2.12.x) increased their python requirement to python 3.8 and above. -Kubespray supports multiple ansible versions but only the default (5.x) gets wide testing coverage. If your deployment host is CentOS 7 it is recommended to use one of the earlier versions still supported. - ## CentOS 8 If you have containers that are using iptables in the host network namespace (`hostNetwork=true`), diff --git a/inventory/sample/group_vars/all/offline.yml b/inventory/sample/group_vars/all/offline.yml index 6fb8dfc03..c27aa8956 100644 --- a/inventory/sample/group_vars/all/offline.yml +++ b/inventory/sample/group_vars/all/offline.yml @@ -82,7 +82,7 @@ # krew_download_url: "{{ files_repo }}/github.com/kubernetes-sigs/krew/releases/download/{{ krew_version }}/krew-{{ host_os }}_{{ image_arch }}.tar.gz" ## CentOS/Redhat/AlmaLinux -### For EL7, base and extras repo must be available, for EL8, baseos and appstream +### For EL8, baseos and appstream must be available, ### By default we enable those repo automatically # rhel_enable_repos: false ### Docker / Containerd diff --git a/playbooks/ansible_version.yml b/playbooks/ansible_version.yml index 2c8bac63c..009183f7f 100644 --- a/playbooks/ansible_version.yml +++ b/playbooks/ansible_version.yml @@ -25,7 +25,6 @@ tags: - check - # CentOS 7 provides too old jinja version - name: "Check that jinja is not too old (install via pip)" assert: msg: "Your Jinja version is too old, install via pip" diff --git a/roles/bootstrap-os/molecule/default/molecule.yml b/roles/bootstrap-os/molecule/default/molecule.yml index 76e5b7a94..9fa29ae91 100644 --- a/roles/bootstrap-os/molecule/default/molecule.yml +++ b/roles/bootstrap-os/molecule/default/molecule.yml @@ -19,12 +19,6 @@ platforms: memory: 1024 provider_options: driver: kvm - - name: centos7 - box: centos/7 - cpus: 1 - memory: 512 - provider_options: - driver: kvm - name: almalinux8 box: almalinux/8 cpus: 1 diff --git a/roles/bootstrap-os/tasks/centos.yml b/roles/bootstrap-os/tasks/centos.yml index 304a37b07..93816ff2f 100644 --- a/roles/bootstrap-os/tasks/centos.yml +++ b/roles/bootstrap-os/tasks/centos.yml @@ -80,40 +80,13 @@ - { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" } - { option: "enabled", value: "1" } - { option: "gpgcheck", value: "0" } - - { option: "baseurl", value: "http://vault.centos.org/{{ 'altarch' if (ansible_distribution_major_version | int) <= 7 and ansible_architecture == 'aarch64' else 'centos' }}/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version | int > 7 %}os/{% endif %}" } + - { option: "baseurl", value: "http://mirror.centos.org/centos/{{ ansible_distribution_major_version }}/extras/$basearch/os/" } when: - use_oracle_public_repo | default(true) - '''ID="ol"'' in os_release.stdout_lines' - (ansible_distribution_version | float) >= 7.6 - (ansible_distribution_version | float) < 9 -# CentOS 7 EOL at July 1, 2024. -- name: Check CentOS-Base.repo exists for CentOS 7 - stat: - path: /etc/yum.repos.d/CentOS-Base.repo - register: centos_base_repo_stat - when: - - ansible_distribution_major_version == "7" - -# CentOS 7 EOL at July 1, 2024. -- name: Update CentOS 7 CentOS-Base.repo - when: - - ansible_distribution_major_version == "7" - - centos_base_repo_stat.stat.exists - become: true - block: - - name: Disable CentOS 7 mirrorlist in CentOS-Base.repo - replace: - path: "{{ centos_base_repo_stat.stat.path }}" - regexp: '^mirrorlist=' - replace: '#mirrorlist=' - - - name: Update CentOS 7 baseurl in CentOS-Base.repo - replace: - path: "{{ centos_base_repo_stat.stat.path }}" - regexp: '^#baseurl=http:\/\/mirror.centos.org' - replace: 'baseurl=http:\/\/vault.centos.org' - # CentOS ships with python installed - name: Check presence of fastestmirror.conf diff --git a/roles/bootstrap-os/tasks/redhat.yml b/roles/bootstrap-os/tasks/redhat.yml index 76a39b2f5..2bf508d9b 100644 --- a/roles/bootstrap-os/tasks/redhat.yml +++ b/roles/bootstrap-os/tasks/redhat.yml @@ -62,17 +62,6 @@ - rh_subscription_username is defined - rh_subscription_status.changed -# container-selinux is in extras repo -- name: Enable RHEL 7 repos - community.general.rhsm_repository: - name: - - "rhel-7-server-rpms" - - "rhel-7-server-extras-rpms" - state: "{{ 'enabled' if (rhel_enable_repos | default(True) | bool) else 'disabled' }}" - when: - - ansible_distribution_major_version == "7" - - (not rh_subscription_status.changed) or (rh_subscription_username is defined) or (rh_subscription_org_id is defined) - # container-selinux is in appstream repo - name: Enable RHEL 8 repos community.general.rhsm_repository: diff --git a/roles/container-engine/docker-storage/defaults/main.yml b/roles/container-engine/docker-storage/defaults/main.yml deleted file mode 100644 index 6a69556cd..000000000 --- a/roles/container-engine/docker-storage/defaults/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -docker_container_storage_setup_repository: https://github.com/projectatomic/container-storage-setup.git -docker_container_storage_setup_version: v0.6.0 -docker_container_storage_setup_profile_name: kubespray -docker_container_storage_setup_storage_driver: devicemapper -docker_container_storage_setup_container_thinpool: docker-pool -# It must be define a disk path for docker_container_storage_setup_devs. -# Otherwise docker-storage-setup will be executed incorrectly. -# docker_container_storage_setup_devs: /dev/vdb -docker_container_storage_setup_data_size: 40%FREE -docker_container_storage_setup_min_data_size: 2G -docker_container_storage_setup_chunk_size: 512K -docker_container_storage_setup_growpart: "false" -docker_container_storage_setup_auto_extend_pool: "yes" -docker_container_storage_setup_pool_autoextend_threshold: 60 -docker_container_storage_setup_pool_autoextend_percent: 20 -docker_container_storage_setup_device_wait_timeout: 60 -docker_container_storage_setup_wipe_signatures: "false" -docker_container_storage_setup_container_root_lv_size: 40%FREE diff --git a/roles/container-engine/docker-storage/files/install_container_storage_setup.sh b/roles/container-engine/docker-storage/files/install_container_storage_setup.sh deleted file mode 100644 index 604c8439e..000000000 --- a/roles/container-engine/docker-storage/files/install_container_storage_setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -repository=${1:-https://github.com/projectatomic/container-storage-setup.git} -version=${2:-master} -profile_name=${3:-kubespray} -dir=`mktemp -d` -export GIT_DIR=$dir/.git -export GIT_WORK_TREE=$dir - -git init -git fetch --depth 1 $repository $version -git merge FETCH_HEAD -make -C $dir install -rm -rf /var/lib/container-storage-setup/$profile_name $dir - -set +e - -/usr/bin/container-storage-setup create $profile_name /etc/sysconfig/docker-storage-setup && /usr/bin/container-storage-setup activate $profile_name -# FIXME: exit status can be 1 for both fatal and non fatal errors in current release, -# could be improved by matching error strings -exit 0 diff --git a/roles/container-engine/docker-storage/tasks/main.yml b/roles/container-engine/docker-storage/tasks/main.yml deleted file mode 100644 index d90dcb775..000000000 --- a/roles/container-engine/docker-storage/tasks/main.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- - -- name: Docker-storage-setup | install git and make - with_items: [git, make] - package: - pkg: "{{ item }}" - state: present - -- name: Docker-storage-setup | docker-storage-setup sysconfig template - template: - src: docker-storage-setup.j2 - dest: /etc/sysconfig/docker-storage-setup - mode: "0644" - -- name: Docker-storage-override-directory | docker service storage-setup override dir - file: - dest: /etc/systemd/system/docker.service.d - mode: "0755" - owner: root - group: root - state: directory - -- name: Docker-storage-override | docker service storage-setup override file - copy: - dest: /etc/systemd/system/docker.service.d/override.conf - content: |- - ### This file is managed by Ansible - [Service] - EnvironmentFile=-/etc/sysconfig/docker-storage - - owner: root - group: root - mode: "0644" - -# https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository -- name: Docker-storage-setup | install lvm2 - package: - name: lvm2 - state: present - -- name: Docker-storage-setup | install and run container-storage-setup - become: true - script: | - install_container_storage_setup.sh \ - {{ docker_container_storage_setup_repository }} \ - {{ docker_container_storage_setup_version }} \ - {{ docker_container_storage_setup_profile_name }} - notify: Docker | reload systemd diff --git a/roles/container-engine/docker-storage/templates/docker-storage-setup.j2 b/roles/container-engine/docker-storage/templates/docker-storage-setup.j2 deleted file mode 100644 index 1a502b2c9..000000000 --- a/roles/container-engine/docker-storage/templates/docker-storage-setup.j2 +++ /dev/null @@ -1,35 +0,0 @@ -{%if docker_container_storage_setup_storage_driver is defined%}STORAGE_DRIVER={{docker_container_storage_setup_storage_driver}}{%endif%} - -{%if docker_container_storage_setup_extra_storage_options is defined%}EXTRA_STORAGE_OPTIONS={{docker_container_storage_setup_extra_storage_options}}{%endif%} - -{%if docker_container_storage_setup_devs is defined%}DEVS={{docker_container_storage_setup_devs}}{%endif%} - -{%if docker_container_storage_setup_container_thinpool is defined%}CONTAINER_THINPOOL={{docker_container_storage_setup_container_thinpool}}{%endif%} - -{%if docker_container_storage_setup_vg is defined%}VG={{docker_container_storage_setup_vg}}{%endif%} - -{%if docker_container_storage_setup_root_size is defined%}ROOT_SIZE={{docker_container_storage_setup_root_size}}{%endif%} - -{%if docker_container_storage_setup_data_size is defined%}DATA_SIZE={{docker_container_storage_setup_data_size}}{%endif%} - -{%if docker_container_storage_setup_min_data_size is defined%}MIN_DATA_SIZE={{docker_container_storage_setup_min_data_size}}{%endif%} - -{%if docker_container_storage_setup_chunk_size is defined%}CHUNK_SIZE={{docker_container_storage_setup_chunk_size}}{%endif%} - -{%if docker_container_storage_setup_growpart is defined%}GROWPART={{docker_container_storage_setup_growpart}}{%endif%} - -{%if docker_container_storage_setup_auto_extend_pool is defined%}AUTO_EXTEND_POOL={{docker_container_storage_setup_auto_extend_pool}}{%endif%} - -{%if docker_container_storage_setup_pool_autoextend_threshold is defined%}POOL_AUTOEXTEND_THRESHOLD={{docker_container_storage_setup_pool_autoextend_threshold}}{%endif%} - -{%if docker_container_storage_setup_pool_autoextend_percent is defined%}POOL_AUTOEXTEND_PERCENT={{docker_container_storage_setup_pool_autoextend_percent}}{%endif%} - -{%if docker_container_storage_setup_device_wait_timeout is defined%}DEVICE_WAIT_TIMEOUT={{docker_container_storage_setup_device_wait_timeout}}{%endif%} - -{%if docker_container_storage_setup_wipe_signatures is defined%}WIPE_SIGNATURES={{docker_container_storage_setup_wipe_signatures}}{%endif%} - -{%if docker_container_storage_setup_container_root_lv_name is defined%}CONTAINER_ROOT_LV_NAME={{docker_container_storage_setup_container_root_lv_name}}{%endif%} - -{%if docker_container_storage_setup_container_root_lv_size is defined%}CONTAINER_ROOT_LV_SIZE={{docker_container_storage_setup_container_root_lv_size}}{%endif%} - -{%if docker_container_storage_setup_container_root_lv_mount_path is defined%}CONTAINER_ROOT_LV_MOUNT_PATH={{docker_container_storage_setup_container_root_lv_mount_path}}{%endif%} diff --git a/roles/container-engine/docker/meta/main.yml b/roles/container-engine/docker/meta/main.yml index d7e47517a..1a53ba7d6 100644 --- a/roles/container-engine/docker/meta/main.yml +++ b/roles/container-engine/docker/meta/main.yml @@ -1,5 +1,3 @@ --- dependencies: - role: container-engine/containerd-common - - role: container-engine/docker-storage - when: docker_container_storage_setup and ansible_os_family == "RedHat" diff --git a/roles/container-engine/docker/templates/docker.service.j2 b/roles/container-engine/docker/templates/docker.service.j2 index 44ccbd8e1..bc220197d 100644 --- a/roles/container-engine/docker/templates/docker.service.j2 +++ b/roles/container-engine/docker/templates/docker.service.j2 @@ -1,19 +1,11 @@ [Unit] Description=Docker Application Container Engine Documentation=http://docs.docker.com -{% if ansible_os_family == "RedHat" %} -After=network.target {{ ' docker-storage-setup.service' if docker_container_storage_setup else '' }} containerd.service +After=network.target docker.socket containerd.service lvm2-monitor.service SuSEfirewall2.service +{% if ansible_os_family != "Suse" %} BindsTo=containerd.service -{{ 'Wants=docker-storage-setup.service' if docker_container_storage_setup else '' }} -{% elif ansible_os_family == "Debian" %} -After=network.target docker.socket containerd.service -BindsTo=containerd.service -Wants=docker.socket -{% elif ansible_os_family == "Suse" %} -After=network.target lvm2-monitor.service SuSEfirewall2.service -# After=network.target containerd.service -# BindsTo=containerd.service {% endif %} +Wants=docker.socket [Service] Type=notify diff --git a/roles/kubernetes-apps/container_engine_accelerator/nvidia_gpu/vars/centos-7.yml b/roles/kubernetes-apps/container_engine_accelerator/nvidia_gpu/vars/centos-7.yml deleted file mode 100644 index b1ea65ba7..000000000 --- a/roles/kubernetes-apps/container_engine_accelerator/nvidia_gpu/vars/centos-7.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -nvidia_driver_install_container: "{{ nvidia_driver_install_centos_container }}" -nvidia_driver_install_supported: true diff --git a/roles/kubernetes/preinstall/defaults/main.yml b/roles/kubernetes/preinstall/defaults/main.yml index 3c4d8a40d..bf537f18d 100644 --- a/roles/kubernetes/preinstall/defaults/main.yml +++ b/roles/kubernetes/preinstall/defaults/main.yml @@ -139,6 +139,3 @@ systemd_resolved_disable_stub_listener: "{{ ansible_os_family in ['Flatcar', 'Fl # Used to disable File Access Policy Daemon service. # If service is enabled, the CNI plugin installation will fail disable_fapolicyd: true - -# Enable 0120-growpart-azure-centos-7 tasks -growpart_azure_enabled: true diff --git a/roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml b/roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml deleted file mode 100644 index b9c35875e..000000000 --- a/roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- - -# Running growpart seems to be only required on Azure, as other Cloud Providers do this at boot time - -- name: Install growpart - package: - name: cloud-utils-growpart - state: present - -- name: Gather mounts facts - setup: - gather_subset: 'mounts' - -- name: Search root filesystem device - vars: - query: "[?mount=='/'].device" - _root_device: "{{ ansible_mounts | json_query(query) }}" - set_fact: - device: "{{ _root_device | first | regex_replace('([^0-9]+)[0-9]+', '\\1') }}" - partition: "{{ _root_device | first | regex_replace('[^0-9]+([0-9]+)', '\\1') }}" - root_device: "{{ _root_device }}" - -- name: Check if growpart needs to be run - command: growpart -N {{ device }} {{ partition }} - failed_when: false - changed_when: "'NOCHANGE:' not in growpart_needed.stdout" - register: growpart_needed - environment: - LC_ALL: C - -- name: Check fs type - command: file -Ls {{ root_device }} - changed_when: false - register: fs_type - -- name: Run growpart # noqa no-handler - command: growpart {{ device }} {{ partition }} - when: growpart_needed.changed - environment: - LC_ALL: C - -- name: Run xfs_growfs # noqa no-handler - command: xfs_growfs {{ root_device }} - when: growpart_needed.changed and 'XFS' in fs_type.stdout diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 722beecd3..a6450808f 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -130,16 +130,6 @@ tags: - bootstrap-os -- name: Grow partition on azure CentOS - import_tasks: 0120-growpart-azure-centos-7.yml - when: - - not dns_late - - azure_check.stat.exists - - ansible_os_family == "RedHat" - - growpart_azure_enabled - tags: - - bootstrap-os - - name: Run calico checks include_role: name: network_plugin/calico diff --git a/roles/kubernetes/preinstall/vars/main.yml b/roles/kubernetes/preinstall/vars/main.yml index 4b3524a54..e788b5db7 100644 --- a/roles/kubernetes/preinstall/vars/main.yml +++ b/roles/kubernetes/preinstall/vars/main.yml @@ -93,11 +93,8 @@ pkgs: python3-libselinux: os: distributions: - RedHat: &major_redhat_like - major_versions: - - "8" - - "9" - CentOS: *major_redhat_like + RedHat: {} + CentOS: {} rsync: {} socat: {} software-properties-common: *debian_family_base diff --git a/roles/kubespray-defaults/defaults/main/main.yml b/roles/kubespray-defaults/defaults/main/main.yml index c648bcc72..4f1dfd2b9 100644 --- a/roles/kubespray-defaults/defaults/main/main.yml +++ b/roles/kubespray-defaults/defaults/main/main.yml @@ -317,13 +317,6 @@ crio_insecure_registries: [] ## Please note that overlay2 is only supported on newer kernels # docker_storage_options: -s overlay2 -## Enable docker_container_storage_setup, it will configure devicemapper driver on Centos7 or RedHat7. -docker_container_storage_setup: false - -## It must be define a disk path for docker_container_storage_setup_devs. -## Otherwise docker-storage-setup will be executed incorrectly. -# docker_container_storage_setup_devs: /dev/vdb - ## Only set this if you have more than 3 nameservers: ## If true Kubespray will only use the first 3, otherwise it will fail docker_dns_servers_strict: false diff --git a/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml b/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml index 1b9f5d401..4d3ae83a7 100644 --- a/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml +++ b/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml @@ -48,13 +48,6 @@ images: converted: true tag: "latest" - centos-7: - filename: CentOS-7-x86_64-GenericCloud-2009.qcow2 - url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2211.qcow2 - checksum: sha256:284aab2b23d91318f169ff464bce4d53404a15a0618ceb34562838c59af4adea - converted: true - tag: "latest" - centos-8: filename: CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2 url: http://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2 diff --git a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml index 4bf59b5fa..6223d1368 100644 --- a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml +++ b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml @@ -25,7 +25,6 @@ mode: all-in-one # distro: rhel (+ sudo and hostname packages): -> I2Nsb3VkLWNvbmZpZwpwYWNrYWdlczoKIC0gc3VkbwogLSBob3N0bmFtZQpzeXN0ZW1faW5mbzoKICBkaXN0cm86IHJoZWwKdXNlcnM6CiAtIG5hbWU6IGt1YmVzcHJheQogICBncm91cHM6IHdoZWVsCiAgIHN1ZG86ICdBTEw9KEFMTCkgTk9QQVNTV0Q6QUxMJwogICBzaGVsbDogL2Jpbi9iYXNoCiAgIGxvY2tfcGFzc3dkOiBGYWxzZQogICBob21lOiAvaG9tZS9rdWJlc3ByYXkKICAgc3NoX2F1dGhvcml6ZWRfa2V5czoKICAgICAtIHNzaC1yc2EgQUFBQUIzTnphQzF5YzJFQUFBQURBUUFCQUFBQkFRQ2FuVGkvZUt4MCt0SFlKQWVEaHErc0ZTMk9iVVAxL0k2OWY3aVYzVXRrS2xUMjBKZlcxZjZGZVh0LzA0VmYyN1dRcStOcXM2dkdCcUQ5UVhTWXVmK3QwL3M3RVBMalRlaTltZTFtcHFyK3VUZStLRHRUUDM5cGZEMy9lVkNhZUI3MjZHUDJGa2FEMEZ6cG1FYjY2TzNOcWh4T1E5Nkd4LzlYVHV3L0szbGxqNE9WRDZHcmpSM0I3YzRYdEVCc1pjWnBwTUovb0gxbUd5R1hkaDMxbVdRU3FBUk8vUDhVOEd3dDArSEdwVXdoL2hkeTN0K1NZb1RCMkd3VmIwem95Vnd0V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d3VmIwem95Vnd0VnZmRFF6c204ZnEzYXY0S3ZlejhrWXVOREp2MDV4NGx2VVpnUjE1WkRSWHNBbmRoUXlxb1hkQ0xBZTArZWFLWHE5QmtXeEtGYjloUGUwQVVqamE1Cgo=" rockylinux-8: "I2Nsb3VkLWNvbmZpZwpwYWNrYWdlczoKIC0gc3VkbwogLSBob3N0bmFtZQpzeXN0ZW1faW5mbzoKICBkaXN0cm86IHJoZWwKdXNlcnM6CiAtIG5hbWU6IGt1YmVzcHJheQogICBncm91cHM6IHdoZWVsCiAgIHN1ZG86ICdBTEw9KEFMTCkgTk9QQVNTV0Q6QUxMJwogICBzaGVsbDogL2Jpbi9iYXNoCiAgIGxvY2tfcGFzc3dkOiBGYWxzZQogICBob21lOiAvaG9tZS9rdWJlc3ByYXkKICAgc3NoX2F1dGhvcml6ZWRfa2V5czoKICAgICAtIHNzaC1yc2EgQUFBQUIzTnphQzF5YzJFQUFBQURBUUFCQUFBQkFRQ2FuVGkvZUt4MCt0SFlKQWVEaHErc0ZTMk9iVVAxL0k2OWY3aVYzVXRrS2xUMjBKZlcxZjZGZVh0LzA0VmYyN1dRcStOcXM2dkdCcUQ5UVhTWXVmK3QwL3M3RVBMalRlaTltZTFtcHFyK3VUZStLRHRUUDM5cGZEMy9lVkNhZUI3MjZHUDJGa2FEMEZ6cG1FYjY2TzNOcWh4T1E5Nkd4LzlYVHV3L0szbGxqNE9WRDZHcmpSM0I3YzRYdEVCc1pjWnBwTUovb0gxbUd5R1hkaDMxbVdRU3FBUk8vUDhVOEd3dDArSEdwVXdoL2hkeTN0K1NZb1RCMkd3VmIwem95Vnd0VnZmRFF6c204ZnEzYXY0S3ZlejhrWXVOREp2MDV4NGx2VVpnUjE1WkRSWHNBbmRoUXlxb1hkQ0xBZTArZWFLWHE5QmtXeEtGYjloUGUwQVVqamE1Cgo=" diff --git a/tests/files/packet_centos7-calico-ha-once-localhost.yml b/tests/files/packet_centos8-calico-ha-once-localhost.yml similarity index 93% rename from tests/files/packet_centos7-calico-ha-once-localhost.yml rename to tests/files/packet_centos8-calico-ha-once-localhost.yml index 950aae073..62272c678 100644 --- a/tests/files/packet_centos7-calico-ha-once-localhost.yml +++ b/tests/files/packet_centos8-calico-ha-once-localhost.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: ha # Kubespray settings diff --git a/tests/files/packet_centos7-calico-ha.yml b/tests/files/packet_centos8-calico-ha.yml similarity index 91% rename from tests/files/packet_centos7-calico-ha.yml rename to tests/files/packet_centos8-calico-ha.yml index be93a607a..33049bfdd 100644 --- a/tests/files/packet_centos7-calico-ha.yml +++ b/tests/files/packet_centos8-calico-ha.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: ha # Kubespray settings diff --git a/tests/files/packet_centos7-flannel-addons-ha.yml b/tests/files/packet_centos8-flannel-addons-ha.yml similarity index 98% rename from tests/files/packet_centos7-flannel-addons-ha.yml rename to tests/files/packet_centos8-flannel-addons-ha.yml index ef7cb1bfd..821988ffc 100644 --- a/tests/files/packet_centos7-flannel-addons-ha.yml +++ b/tests/files/packet_centos8-flannel-addons-ha.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: ha # Kubespray settings diff --git a/tests/files/packet_centos7-multus-calico.yml b/tests/files/packet_centos8-multus-calico.yml similarity index 80% rename from tests/files/packet_centos7-multus-calico.yml rename to tests/files/packet_centos8-multus-calico.yml index 350c101b7..7337537e4 100644 --- a/tests/files/packet_centos7-multus-calico.yml +++ b/tests/files/packet_centos8-multus-calico.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: default # Kubespray settings diff --git a/tests/files/packet_centos7-weave-upgrade-ha.yml b/tests/files/packet_centos8-weave-upgrade-ha.yml similarity index 90% rename from tests/files/packet_centos7-weave-upgrade-ha.yml rename to tests/files/packet_centos8-weave-upgrade-ha.yml index e290ae4ae..25ca8d370 100644 --- a/tests/files/packet_centos7-weave-upgrade-ha.yml +++ b/tests/files/packet_centos8-weave-upgrade-ha.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: ha # Kubespray settings diff --git a/tests/files/vagrant_centos7-kube-router.rb b/tests/files/vagrant_centos8-kube-router.rb similarity index 95% rename from tests/files/vagrant_centos7-kube-router.rb rename to tests/files/vagrant_centos8-kube-router.rb index 620df711a..c7426fb3f 100644 --- a/tests/files/vagrant_centos7-kube-router.rb +++ b/tests/files/vagrant_centos8-kube-router.rb @@ -1,6 +1,6 @@ $num_instances = 2 $vm_memory ||= 2048 -$os = "centos" +$os = "centos8" $kube_master_instances = 1 $etcd_instances = 1 diff --git a/tests/files/vagrant_centos7-kube-router.yml b/tests/files/vagrant_centos8-kube-router.yml similarity index 84% rename from tests/files/vagrant_centos7-kube-router.yml rename to tests/files/vagrant_centos8-kube-router.yml index e9e4161af..434c37c96 100644 --- a/tests/files/vagrant_centos7-kube-router.yml +++ b/tests/files/vagrant_centos8-kube-router.yml @@ -1,6 +1,6 @@ --- # Instance settings -cloud_image: centos-7 +cloud_image: centos-8 mode: default # Kubespray settings