From c5dac1cdf6fea229239a63ff8dc2993161107bdb Mon Sep 17 00:00:00 2001 From: Louis Tu <92532497+tu1h@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:20:21 +0800 Subject: [PATCH] Add Debian 12(bookworm) support and CI (#10221) Signed-off-by: tu1h --- .gitlab-ci/packet.yml | 10 ++++ README.md | 2 +- docs/ci.md | 3 ++ .../docker/vars/debian-bookworm.yml | 48 +++++++++++++++++++ .../kubernetes/preinstall/vars/debian-12.yml | 11 +++++ .../roles/packet-ci/defaults/main.yml | 1 + tests/files/packet_debian12-calico.yml | 4 ++ tests/files/packet_debian12-docker.yml | 9 ++++ 8 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 roles/container-engine/docker/vars/debian-bookworm.yml create mode 100644 roles/kubernetes/preinstall/vars/debian-12.yml create mode 100644 tests/files/packet_debian12-calico.yml create mode 100644 tests/files/packet_debian12-docker.yml diff --git a/.gitlab-ci/packet.yml b/.gitlab-ci/packet.yml index 02bf4f1b7..edf8ebcdb 100644 --- a/.gitlab-ci/packet.yml +++ b/.gitlab-ci/packet.yml @@ -103,6 +103,16 @@ packet_debian11-docker: extends: .packet_pr when: on_success +packet_debian12-calico: + stage: deploy-part2 + extends: .packet_pr + when: on_success + +packet_debian12-docker: + stage: deploy-part2 + extends: .packet_pr + when: on_success + packet_centos7-calico-ha-once-localhost: stage: deploy-part2 extends: .packet_pr diff --git a/README.md b/README.md index 628e7eeef..53590bc2c 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ vagrant up ## Supported Linux Distributions - **Flatcar Container Linux by Kinvolk** -- **Debian** Bullseye, Buster +- **Debian** Bookworm, Bullseye, Buster - **Ubuntu** 20.04, 22.04 - **CentOS/RHEL** 7, [8, 9](docs/centos.md#centos-8) - **Fedora** 35, 36 diff --git a/docs/ci.md b/docs/ci.md index 59fcc0788..f981a593a 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -11,6 +11,7 @@ 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: | debian10 | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | debian11 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | +debian12 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | fedora35 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | fedora36 | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | opensuse | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | @@ -28,6 +29,7 @@ amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | centos7 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian10 | :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: | fedora35 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | fedora36 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | opensuse | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | @@ -45,6 +47,7 @@ amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | centos7 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | debian10 | :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: | fedora35 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | fedora36 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | opensuse | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | diff --git a/roles/container-engine/docker/vars/debian-bookworm.yml b/roles/container-engine/docker/vars/debian-bookworm.yml new file mode 100644 index 000000000..db20d0b31 --- /dev/null +++ b/roles/container-engine/docker/vars/debian-bookworm.yml @@ -0,0 +1,48 @@ +--- +docker_version: 24.0 +docker_cli_version: 24.0 +docker_containerd_version: 1.6.21 + +# containerd package info is only relevant for docker +containerd_versioned_pkg: + 'latest': "{{ containerd_package }}" + '1.6.16': "{{ containerd_package }}=1.6.16-1" + '1.6.18': "{{ containerd_package }}=1.6.18-1" + '1.6.19': "{{ containerd_package }}=1.6.19-1" + '1.6.20': "{{ containerd_package }}=1.6.20-1" + '1.6.21': "{{ containerd_package }}=1.6.21-1" + 'stable': "{{ containerd_package }}=1.6.21-1" + 'edge': "{{ containerd_package }}=1.6.21-1" + +# https://download.docker.com/linux/debian/ +docker_versioned_pkg: + 'latest': docker-ce + '23.0': docker-ce=5:23.0.6-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + '24.0': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + 'stable': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + 'edge': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + +docker_cli_versioned_pkg: + 'latest': docker-ce-cli + '23.0': docker-ce=5:23.0.6-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + '24.0': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + 'stable': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + 'edge': docker-ce=5:24.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release|lower }} + +docker_package_info: + pkgs: + - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}" + - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" + - "{{ docker_versioned_pkg[docker_version | string] }}" + +docker_repo_key_info: + url: '{{ docker_debian_repo_gpgkey }}' + repo_keys: + - '{{ docker_debian_repo_repokey }}' + +docker_repo_info: + repos: + - > + deb {{ docker_debian_repo_base_url }} + {{ ansible_distribution_release|lower }} + stable diff --git a/roles/kubernetes/preinstall/vars/debian-12.yml b/roles/kubernetes/preinstall/vars/debian-12.yml new file mode 100644 index 000000000..e0dca4dcd --- /dev/null +++ b/roles/kubernetes/preinstall/vars/debian-12.yml @@ -0,0 +1,11 @@ +--- +required_pkgs: + - python3-apt + - gnupg + - apt-transport-https + - software-properties-common + - conntrack + - iptables + - apparmor + - libseccomp2 + - mergerfs diff --git a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml index 2c487fb2b..8d51612e8 100644 --- a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml +++ b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml @@ -31,6 +31,7 @@ cloud_init: debian-9: "I2Nsb3VkLWNvbmZpZwogdXNlcnM6CiAgLSBuYW1lOiBrdWJlc3ByYXkKICAgIHN1ZG86IEFMTD0oQUxMKSBOT1BBU1NXRDpBTEwKICAgIHNoZWxsOiAvYmluL2Jhc2gKICAgIGxvY2tfcGFzc3dkOiBGYWxzZQogICAgaG9tZTogL2hvbWUva3ViZXNwcmF5CiAgICBzc2hfYXV0aG9yaXplZF9rZXlzOgogICAgICAtIHNzaC1yc2EgQUFBQUIzTnphQzF5YzJFQUFBQURBUUFCQUFBQkFRQ2FuVGkvZUt4MCt0SFlKQWVEaHErc0ZTMk9iVVAxL0k2OWY3aVYzVXRrS2xUMjBKZlcxZjZGZVh0LzA0VmYyN1dRcStOcXM2dkdCcUQ5UVhTWXVmK3QwL3M3RVBMalRlaTltZTFtcHFyK3VUZStLRHRUUDM5cGZEMy9lVkNhZUI3MjZHUDJGa2FEMEZ6cG1FYjY2TzNOcWh4T1E5Nkd4Lzl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ICAgIHNoZWxsOiAvYmluL2Jhc2gKICAgIGxvY2tfcGFzc3dkOiBGYWxzZQogICAgaG9tZTogL2hvbWUva3ViZXNwcmF5CiAgICBzc2hfYXV0aG9yaXplZF9rZXlzOgogICAgICAtIHNzaC1yc2EgQUFBQUIzTnphQzF5YzJFQUFBQURBUUFCQUFBQkFRQ2FuVGkvZUt4MCt0SFlKQWVEaHErc0ZTMk9iVVAxL0k2OWY3aVYzVXRrS2xUMjBKZlcxZjZGZVh0LzA0VmYyN1dRcStOcXM2dkdCcUQ5UVhTWXVmK3QwL3M3RVBMalRlaTltZTFtcHFyK3VUZStLRHRUUDM5cGZEMy9lVkNhZUI3MjZHUDJGa2FEMEZ6cG1FYjY2TzNOcWh4T1E5Nkd4LzlYVHV3L0szbGxqNE9WRDZHcmpSM0I3YzRYdEVCc1pjWnBwTUovb0gxbUd5R1hkaDMxbVdRU3FBUk8vUDhVOEd3dDArSEdwVXdoL2hkeTN0K1NZb1RCMkd3VmIwem95Vnd0VnZmRFF6c204ZnEzYXY0S3ZlejhrWXVOREp2MDV4NGx2VVpnUjE1WkRSWHNBbmRoUXlxb1hkQ0xBZTArZWFLWHE5QmtXeEtGYjloUGUwQVVqamE1" diff --git a/tests/files/packet_debian12-calico.yml b/tests/files/packet_debian12-calico.yml new file mode 100644 index 000000000..a4adafc84 --- /dev/null +++ b/tests/files/packet_debian12-calico.yml @@ -0,0 +1,4 @@ +--- +# Instance settings +cloud_image: debian-12 +mode: default diff --git a/tests/files/packet_debian12-docker.yml b/tests/files/packet_debian12-docker.yml new file mode 100644 index 000000000..5d4ac539f --- /dev/null +++ b/tests/files/packet_debian12-docker.yml @@ -0,0 +1,9 @@ +--- +# Instance settings +cloud_image: debian-12 +mode: default + +# Use docker +container_manager: docker +etcd_deployment_type: docker +resolvconf_mode: docker_dns