From f2f9f1d3776e40bf4cf32b5d86ad9eeffc7aa83c Mon Sep 17 00:00:00 2001 From: ERIK Date: Tue, 2 Aug 2022 01:44:29 +0800 Subject: [PATCH] Add kylin OS support (#9078) Signed-off-by: bo.jiang --- README.md | 1 + docs/_sidebar.md | 1 + docs/kylinlinux.md | 11 +++++++++++ roles/bootstrap-os/tasks/main.yml | 2 +- roles/container-engine/containerd/tasks/main.yml | 2 +- .../preinstall/tasks/0020-verify-settings.yml | 2 +- 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 docs/kylinlinux.md diff --git a/README.md b/README.md index 7b8a3e061..b02e96678 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ vagrant up - **Oracle Linux** 7, [8](docs/centos.md#centos-8) - **Alma Linux** [8](docs/centos.md#centos-8) - **Rocky Linux** [8](docs/centos.md#centos-8) +- **Kylin Linux Advanced Server V10** (experimental: see [kylin linux notes](docs/kylinlinux.md)) - **Amazon Linux 2** (experimental: see [amazon linux notes](docs/amazonlinux.md)) Note: Upstart/SysV init based OS types are not supported. diff --git a/docs/_sidebar.md b/docs/_sidebar.md index e4ac39795..44d2d2de5 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -35,6 +35,7 @@ * [OpenSUSE](docs/opensuse.md) * [RedHat Enterprise Linux](docs/rhel.md) * [CentOS/OracleLinux/AlmaLinux/Rocky Linux](docs/centos.md) + * [Kylin Linux Advanced Server V10](docs/kylinlinux.md) * [Amazon Linux 2](docs/amazonlinux.md) * CRI * [Containerd](docs/containerd.md) diff --git a/docs/kylinlinux.md b/docs/kylinlinux.md new file mode 100644 index 000000000..fb3754790 --- /dev/null +++ b/docs/kylinlinux.md @@ -0,0 +1,11 @@ +# Kylin Linux + +Kylin Linux is currently only supported with containerd runtime. + +**Note:** that Kylin Linux is not currently covered in kubespray CI and +support for it is currently considered experimental. + +At present, only `Kylin Linux Advanced Server V10` has been adapted, which can support the deployment of aarch64 and x86_64 platforms. + +There are no special considerations for using Kylin Linux as the target OS +for Kubespray deployments. diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index e535f3946..a5ed5dc96 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -7,7 +7,7 @@ check_mode: false - include_tasks: bootstrap-centos.yml - when: '''ID="centos"'' in os_release.stdout_lines or ''ID="ol"'' in os_release.stdout_lines or ''ID="almalinux"'' in os_release.stdout_lines or ''ID="rocky"'' in os_release.stdout_lines' + when: '''ID="centos"'' in os_release.stdout_lines or ''ID="ol"'' in os_release.stdout_lines or ''ID="almalinux"'' in os_release.stdout_lines or ''ID="rocky"'' in os_release.stdout_lines or ''ID="kylin"'' in os_release.stdout_lines' - include_tasks: bootstrap-amazon.yml when: '''ID="amzn"'' in os_release.stdout_lines' diff --git a/roles/container-engine/containerd/tasks/main.yml b/roles/container-engine/containerd/tasks/main.yml index 746e9c4a4..e2c447607 100644 --- a/roles/container-engine/containerd/tasks/main.yml +++ b/roles/container-engine/containerd/tasks/main.yml @@ -3,7 +3,7 @@ fail: msg: "{{ ansible_distribution }} is not supported by containerd." when: - - ansible_distribution not in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Rocky", "Amazon", "Flatcar", "Flatcar Container Linux by Kinvolk", "Suse", "openSUSE Leap", "openSUSE Tumbleweed"] + - ansible_distribution not in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Rocky", "Amazon", "Flatcar", "Flatcar Container Linux by Kinvolk", "Suse", "openSUSE Leap", "openSUSE Tumbleweed", "Kylin Linux Advanced Server"] - name: containerd | Remove any package manager controlled containerd package package: diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index 3d6e6c06d..f9285811a 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -24,7 +24,7 @@ - name: Stop if unknown OS assert: - that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'openSUSE Tumbleweed', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Rocky', 'Amazon'] + that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'openSUSE Tumbleweed', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Rocky', 'Amazon', 'Kylin Linux Advanced Server'] msg: "{{ ansible_distribution }} is not a known OS" when: not ignore_assert_errors