remove atomic support because reached end of live (#5783)

This commit is contained in:
spaced 2020-03-17 22:31:27 +01:00 committed by GitHub
parent 820d8e6ce6
commit 8ce5a9dd19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 27 additions and 87 deletions

View file

@ -105,7 +105,6 @@ vagrant up
- **Ubuntu** 16.04, 18.04 - **Ubuntu** 16.04, 18.04
- **CentOS/RHEL** 7 - **CentOS/RHEL** 7
- **Fedora** 28 - **Fedora** 28
- **Fedora/CentOS** Atomic
- **Fedora CoreOS** (experimental: see [fcos Note](docs/fcos.md) - **Fedora CoreOS** (experimental: see [fcos Note](docs/fcos.md)
- **openSUSE** Leap 42.3/Tumbleweed - **openSUSE** Leap 42.3/Tumbleweed
- **Oracle Linux** 7 - **Oracle Linux** 7

View file

@ -23,9 +23,9 @@
* [Packet](/docs/packet.md) * [Packet](/docs/packet.md)
* [vSphere](/docs/vsphere.md) * [vSphere](/docs/vsphere.md)
* Operating Systems * Operating Systems
* [Atomic](docs/atomic.md)
* [Debian](docs/debian.md) * [Debian](docs/debian.md)
* [Coreos](docs/coreos.md) * [Coreos](docs/coreos.md)
* [Fedora CoreOS](docs/fcos.md)
* [OpenSUSE](docs/opensuse.md) * [OpenSUSE](docs/opensuse.md)
* Advanced * Advanced
* [Proxy](/docs/proxy.md) * [Proxy](/docs/proxy.md)

View file

@ -1,22 +0,0 @@
# Atomic host bootstrap
Atomic host testing has been done with the network plugin flannel. Change the inventory var `kube_network_plugin: flannel`.
Note: Flannel is the only plugin that has currently been tested with atomic
## Vagrant
* For bootstrapping with Vagrant, use box centos/atomic-host or fedora/atomic-host
* Update VagrantFile variable `local_release_dir` to `/var/vagrant/temp`.
* Update `vm_memory = 2048` and `vm_cpus = 2`
* Networking on vagrant hosts has to be brought up manually once they are booted.
```ShellSession
vagrant ssh
sudo /sbin/ifup enp0s8
```
* For users of vagrant-libvirt download centos/atomic-host qcow2 format from <https://wiki.centos.org/SpecialInterestGroup/Atomic/Download/>
* For users of vagrant-libvirt download fedora/atomic-host qcow2 format from <https://dl.fedoraproject.org/pub/alt/atomic/stable/>
Then you can proceed to [cluster deployment](#run-deployment)

View file

@ -24,15 +24,6 @@
# CentOS ships with python installed # CentOS ships with python installed
- name: Check if this is an atomic host
stat:
path: /run/ostree-booted
register: ostree
- name: Store the fact if this is an atomic host
set_fact:
is_atomic: "{{ ostree.stat.exists }}"
- name: Check presence of fastestmirror.conf - name: Check presence of fastestmirror.conf
stat: stat:
path: /etc/yum/pluginconf.d/fastestmirror.conf path: /etc/yum/pluginconf.d/fastestmirror.conf
@ -73,5 +64,3 @@
name: "{{ ( (ansible_distribution_major_version | int) < 8) | ternary('libselinux-python','python3-libselinux') }}" name: "{{ ( (ansible_distribution_major_version | int) < 8) | ternary('libselinux-python','python3-libselinux') }}"
state: present state: present
become: true become: true
when:
- not is_atomic

View file

@ -1,21 +1,6 @@
--- ---
# Some Fedora based distros ship without Python installed # Some Fedora based distros ship without Python installed
- name: Check if this is an atomic host
raw: stat /run/ostree-booted
register: ostree
environment: {}
failed_when: false
changed_when: false
tags:
- facts
- name: Store the fact if this is an atomic host
set_fact:
is_atomic: "{{ ostree.rc == 0 }}"
tags:
- facts
- name: Check if bootstrap is needed - name: Check if bootstrap is needed
raw: which python raw: which python
register: need_bootstrap register: need_bootstrap
@ -43,7 +28,6 @@
when: when:
- http_proxy is defined - http_proxy is defined
- need_http_proxy.rc != 0 - need_http_proxy.rc != 0
- not is_atomic
# Fedora's policy as of Fedora 30 is to still install python2 as /usr/bin/python # Fedora's policy as of Fedora 30 is to still install python2 as /usr/bin/python
# See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 for the current status # See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 for the current status
@ -53,7 +37,6 @@
environment: {} environment: {}
when: when:
- need_bootstrap.rc != 0 - need_bootstrap.rc != 0
- not is_atomic
# libselinux-python is required on SELinux enabled hosts # libselinux-python is required on SELinux enabled hosts
# See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements # See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements
@ -62,5 +45,3 @@
name: libselinux-python name: libselinux-python
state: present state: present
become: true become: true
when:
- not is_atomic

View file

@ -12,7 +12,6 @@
with_items: "{{ containerd_repo_key_info.repo_keys }}" with_items: "{{ containerd_repo_key_info.repo_keys }}"
when: when:
- ansible_os_family in ['Ubuntu', 'Debian'] - ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- name: ensure containerd repository is enabled - name: ensure containerd repository is enabled
action: "{{ containerd_repo_info.pkg_repo }}" action: "{{ containerd_repo_info.pkg_repo }}"
@ -22,7 +21,6 @@
with_items: "{{ containerd_repo_info.repos }}" with_items: "{{ containerd_repo_info.repos }}"
when: when:
- ansible_os_family in ['Ubuntu', 'Debian'] - ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- containerd_repo_info.repos|length > 0 - containerd_repo_info.repos|length > 0
# This is required to ensure any apt upgrade will not break kubernetes # This is required to ensure any apt upgrade will not break kubernetes
@ -34,25 +32,24 @@
mode: 0644 mode: 0644
when: when:
- ansible_os_family in ['Ubuntu', 'Debian'] - ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- name: Configure containerd repository on Fedora - name: Configure containerd repository on Fedora
template: template:
src: "fedora_containerd.repo.j2" src: "fedora_containerd.repo.j2"
dest: "{{ yum_repo_dir }}/containerd.repo" dest: "{{ yum_repo_dir }}/containerd.repo"
when: ansible_distribution == "Fedora" and not is_atomic when: ansible_distribution == "Fedora"
- name: Configure containerd repository on RedHat/CentOS - name: Configure containerd repository on RedHat/CentOS
template: template:
src: "rh_containerd.repo.j2" src: "rh_containerd.repo.j2"
dest: "{{ yum_repo_dir }}/containerd.repo" dest: "{{ yum_repo_dir }}/containerd.repo"
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic when: ansible_distribution in ["CentOS","RedHat"]
- name: check if container-selinux is available - name: check if container-selinux is available
yum: yum:
list: "container-selinux" list: "container-selinux"
register: yum_result register: yum_result
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic when: ansible_distribution in ["CentOS","RedHat"]
- name: Configure extras repository on RedHat/CentOS if container-selinux is not available in current repos - name: Configure extras repository on RedHat/CentOS if container-selinux is not available in current repos
yum_repository: yum_repository:
@ -66,7 +63,7 @@
keepcache: "{{ containerd_rpm_keepcache | default('1') }}" keepcache: "{{ containerd_rpm_keepcache | default('1') }}"
proxy: " {{ http_proxy | default('_none_') }}" proxy: " {{ http_proxy | default('_none_') }}"
when: when:
- ansible_distribution in ["CentOS","RedHat"] and not is_atomic - ansible_distribution in ["CentOS","RedHat"]
- yum_result.results | length == 0 - yum_result.results | length == 0
- name: Copy yum.conf for editing - name: Copy yum.conf for editing
@ -74,7 +71,7 @@
src: "{{ yum_conf }}" src: "{{ yum_conf }}"
dest: "{{ containerd_yum_conf }}" dest: "{{ containerd_yum_conf }}"
remote_src: yes remote_src: yes
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic when: ansible_distribution in ["CentOS","RedHat"]
- name: Edit copy of yum.conf to set obsoletes=0 - name: Edit copy of yum.conf to set obsoletes=0
lineinfile: lineinfile:
@ -82,4 +79,4 @@
state: present state: present
regexp: '^obsoletes=' regexp: '^obsoletes='
line: 'obsoletes=0' line: 'obsoletes=0'
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic when: ansible_distribution in ["CentOS","RedHat"]

View file

@ -1,4 +1,14 @@
--- ---
- name: check if fedora coreos
stat:
path: /run/ostree-booted
register: ostree
- name: set is_ostree
set_fact:
is_ostree: "{{ ostree.stat.exists }}"
- name: Fail containerd setup if distribution is not supported - name: Fail containerd setup if distribution is not supported
fail: fail:
msg: "{{ ansible_distribution }} is not supported by containerd." msg: "{{ ansible_distribution }} is not supported by containerd."
@ -25,6 +35,7 @@
- facts - facts
- include_tasks: containerd_repo.yml - include_tasks: containerd_repo.yml
when: not is_ostree
- name: Create containerd service systemd directory if it doesn't exist - name: Create containerd service systemd directory if it doesn't exist
file: file:
@ -63,7 +74,7 @@
mode: 0644 mode: 0644
when: when:
- ansible_os_family in ['Ubuntu', 'Debian'] - ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic - not is_ostree
- name: ensure containerd packages are installed - name: ensure containerd packages are installed
action: "{{ containerd_package_info.pkg_mgr }}" action: "{{ containerd_package_info.pkg_mgr }}"
@ -80,7 +91,7 @@
with_items: "{{ containerd_package_info.pkgs }}" with_items: "{{ containerd_package_info.pkgs }}"
notify: restart containerd notify: restart containerd
when: when:
- not is_atomic - not is_ostree
- containerd_package_info.pkgs|length > 0 - containerd_package_info.pkgs|length > 0
ignore_errors: true ignore_errors: true
@ -101,7 +112,7 @@
delay: "{{ retry_stagger | d(3) }}" delay: "{{ retry_stagger | d(3) }}"
notify: restart containerd notify: restart containerd
when: when:
- not is_atomic - not is_ostree
- not runc_stat.stat.exists - not runc_stat.stat.exists
- include_tasks: crictl.yml - include_tasks: crictl.yml

View file

@ -1,6 +1,6 @@
--- ---
- name: check if atomic host or fedora coreos - name: check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
register: ostree register: ostree

View file

@ -1,5 +1,5 @@
--- ---
- name: check if atomic host or fedora coreos - name: check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
register: ostree register: ostree

View file

@ -2,7 +2,7 @@
dependencies: dependencies:
- role: adduser - role: adduser
user: "{{ addusers.etcd }}" user: "{{ addusers.etcd }}"
when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic or is_fedora_coreos) when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic or is_fedora_coreos) when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)

View file

@ -3,7 +3,6 @@ dependencies:
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
when: when:
- not is_atomic
- not is_fedora_coreos - not is_fedora_coreos
tags: tags:
- kubelet - kubelet

View file

@ -22,7 +22,7 @@
tags: tags:
- facts - facts
- name: check if atomic host - name: check if booted with ostree
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
register: ostree register: ostree
@ -39,15 +39,6 @@
set_fact: set_fact:
is_fedora_coreos: "{{ ostree.stat.exists and os_variant_coreos is not changed }}" is_fedora_coreos: "{{ ostree.stat.exists and os_variant_coreos is not changed }}"
- name: set is_atomic
set_fact:
is_atomic: "{{ ostree.stat.exists and not is_fedora_coreos }}"
- name: set kube_cert_group on atomic hosts
set_fact:
kube_cert_group: "kube"
when: is_atomic
- name: check resolvconf - name: check resolvconf
shell: which resolvconf shell: which resolvconf
register: resolvconf register: resolvconf

View file

@ -23,7 +23,6 @@
state: absent state: absent
when: when:
- ansible_distribution in ["CentOS","RedHat","OracleLinux"] - ansible_distribution in ["CentOS","RedHat","OracleLinux"]
- not is_atomic
- not is_fedora_coreos - not is_fedora_coreos
- name: Install python-dnf for latest RedHat versions - name: Install python-dnf for latest RedHat versions
@ -36,7 +35,6 @@
- ansible_distribution == "Fedora" - ansible_distribution == "Fedora"
- ansible_distribution_major_version|int > 21 - ansible_distribution_major_version|int > 21
- ansible_distribution_major_version|int <= 29 - ansible_distribution_major_version|int <= 29
- not is_atomic
- not is_fedora_coreos - not is_fedora_coreos
changed_when: False changed_when: False
tags: tags:
@ -51,7 +49,6 @@
when: when:
- ansible_distribution == "Fedora" - ansible_distribution == "Fedora"
- ansible_distribution_major_version|int >= 30 - ansible_distribution_major_version|int >= 30
- not is_atomic
- not is_fedora_coreos - not is_fedora_coreos
changed_when: False changed_when: False
tags: tags:
@ -63,7 +60,6 @@
state: present state: present
when: when:
- ansible_distribution in ["CentOS","RedHat"] - ansible_distribution in ["CentOS","RedHat"]
- not is_atomic
- not is_fedora_coreos - not is_fedora_coreos
- epel_enabled|bool - epel_enabled|bool
tags: tags:
@ -83,7 +79,7 @@
until: pkgs_task_result is succeeded until: pkgs_task_result is succeeded
retries: 4 retries: 4
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic or is_fedora_coreos) when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
tags: tags:
- bootstrap-os - bootstrap-os

View file

@ -9,7 +9,6 @@ preinstall_selinux_state: permissive
kube_api_anonymous_auth: true kube_api_anonymous_auth: true
# Default value, but will be set to true automatically if detected # Default value, but will be set to true automatically if detected
is_atomic: false
is_fedora_coreos: false is_fedora_coreos: false
# optional disable the swap # optional disable the swap