diff --git a/README.md b/README.md index 6fea9abac..812d6436f 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,6 @@ vagrant up - **Ubuntu** 16.04, 18.04 - **CentOS/RHEL** 7 - **Fedora** 28 -- **Fedora/CentOS** Atomic - **Fedora CoreOS** (experimental: see [fcos Note](docs/fcos.md) - **openSUSE** Leap 42.3/Tumbleweed - **Oracle Linux** 7 diff --git a/docs/_sidebar.md b/docs/_sidebar.md index a71b2e871..7dda2f05c 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -23,9 +23,9 @@ * [Packet](/docs/packet.md) * [vSphere](/docs/vsphere.md) * Operating Systems - * [Atomic](docs/atomic.md) * [Debian](docs/debian.md) * [Coreos](docs/coreos.md) + * [Fedora CoreOS](docs/fcos.md) * [OpenSUSE](docs/opensuse.md) * Advanced * [Proxy](/docs/proxy.md) diff --git a/docs/atomic.md b/docs/atomic.md deleted file mode 100644 index 92f0b7142..000000000 --- a/docs/atomic.md +++ /dev/null @@ -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 -* For users of vagrant-libvirt download fedora/atomic-host qcow2 format from - -Then you can proceed to [cluster deployment](#run-deployment) diff --git a/roles/bootstrap-os/tasks/bootstrap-centos.yml b/roles/bootstrap-os/tasks/bootstrap-centos.yml index 04b14ee4c..4bfe984fd 100644 --- a/roles/bootstrap-os/tasks/bootstrap-centos.yml +++ b/roles/bootstrap-os/tasks/bootstrap-centos.yml @@ -24,15 +24,6 @@ # 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 stat: path: /etc/yum/pluginconf.d/fastestmirror.conf @@ -73,5 +64,3 @@ name: "{{ ( (ansible_distribution_major_version | int) < 8) | ternary('libselinux-python','python3-libselinux') }}" state: present become: true - when: - - not is_atomic diff --git a/roles/bootstrap-os/tasks/bootstrap-fedora.yml b/roles/bootstrap-os/tasks/bootstrap-fedora.yml index 2eb1fe477..ca5ae2119 100644 --- a/roles/bootstrap-os/tasks/bootstrap-fedora.yml +++ b/roles/bootstrap-os/tasks/bootstrap-fedora.yml @@ -1,21 +1,6 @@ --- # 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 raw: which python register: need_bootstrap @@ -43,7 +28,6 @@ when: - http_proxy is defined - need_http_proxy.rc != 0 - - not is_atomic # 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 @@ -53,7 +37,6 @@ environment: {} when: - need_bootstrap.rc != 0 - - not is_atomic # libselinux-python is required on SELinux enabled hosts # See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements @@ -62,5 +45,3 @@ name: libselinux-python state: present become: true - when: - - not is_atomic diff --git a/roles/container-engine/containerd/tasks/containerd_repo.yml b/roles/container-engine/containerd/tasks/containerd_repo.yml index e2e8afa07..6fbacb5d3 100644 --- a/roles/container-engine/containerd/tasks/containerd_repo.yml +++ b/roles/container-engine/containerd/tasks/containerd_repo.yml @@ -12,7 +12,6 @@ with_items: "{{ containerd_repo_key_info.repo_keys }}" when: - ansible_os_family in ['Ubuntu', 'Debian'] - - not is_atomic - name: ensure containerd repository is enabled action: "{{ containerd_repo_info.pkg_repo }}" @@ -22,7 +21,6 @@ with_items: "{{ containerd_repo_info.repos }}" when: - ansible_os_family in ['Ubuntu', 'Debian'] - - not is_atomic - containerd_repo_info.repos|length > 0 # This is required to ensure any apt upgrade will not break kubernetes @@ -34,25 +32,24 @@ mode: 0644 when: - ansible_os_family in ['Ubuntu', 'Debian'] - - not is_atomic - name: Configure containerd repository on Fedora template: src: "fedora_containerd.repo.j2" 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 template: src: "rh_containerd.repo.j2" 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 yum: list: "container-selinux" 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 yum_repository: @@ -66,7 +63,7 @@ keepcache: "{{ containerd_rpm_keepcache | default('1') }}" proxy: " {{ http_proxy | default('_none_') }}" when: - - ansible_distribution in ["CentOS","RedHat"] and not is_atomic + - ansible_distribution in ["CentOS","RedHat"] - yum_result.results | length == 0 - name: Copy yum.conf for editing @@ -74,7 +71,7 @@ src: "{{ yum_conf }}" dest: "{{ containerd_yum_conf }}" 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 lineinfile: @@ -82,4 +79,4 @@ state: present regexp: '^obsoletes=' line: 'obsoletes=0' - when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic + when: ansible_distribution in ["CentOS","RedHat"] diff --git a/roles/container-engine/containerd/tasks/main.yml b/roles/container-engine/containerd/tasks/main.yml index 093e00210..5c33504dd 100644 --- a/roles/container-engine/containerd/tasks/main.yml +++ b/roles/container-engine/containerd/tasks/main.yml @@ -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 fail: msg: "{{ ansible_distribution }} is not supported by containerd." @@ -25,6 +35,7 @@ - facts - include_tasks: containerd_repo.yml + when: not is_ostree - name: Create containerd service systemd directory if it doesn't exist file: @@ -63,7 +74,7 @@ mode: 0644 when: - ansible_os_family in ['Ubuntu', 'Debian'] - - not is_atomic + - not is_ostree - name: ensure containerd packages are installed action: "{{ containerd_package_info.pkg_mgr }}" @@ -80,7 +91,7 @@ with_items: "{{ containerd_package_info.pkgs }}" notify: restart containerd when: - - not is_atomic + - not is_ostree - containerd_package_info.pkgs|length > 0 ignore_errors: true @@ -101,7 +112,7 @@ delay: "{{ retry_stagger | d(3) }}" notify: restart containerd when: - - not is_atomic + - not is_ostree - not runc_stat.stat.exists - include_tasks: crictl.yml diff --git a/roles/container-engine/cri-o/tasks/main.yaml b/roles/container-engine/cri-o/tasks/main.yaml index 453c57848..e30e94f97 100644 --- a/roles/container-engine/cri-o/tasks/main.yaml +++ b/roles/container-engine/cri-o/tasks/main.yaml @@ -1,6 +1,6 @@ --- -- name: check if atomic host or fedora coreos +- name: check if fedora coreos stat: path: /run/ostree-booted register: ostree diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index c4e4f3b8d..4366af06a 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: check if atomic host or fedora coreos +- name: check if fedora coreos stat: path: /run/ostree-booted register: ostree diff --git a/roles/etcd/meta/main.yml b/roles/etcd/meta/main.yml index a47113793..83ed7826a 100644 --- a/roles/etcd/meta/main.yml +++ b/roles/etcd/meta/main.yml @@ -2,7 +2,7 @@ dependencies: - role: adduser 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 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) diff --git a/roles/kubernetes/preinstall/meta/main.yml b/roles/kubernetes/preinstall/meta/main.yml index 01c6cbc56..26572c306 100644 --- a/roles/kubernetes/preinstall/meta/main.yml +++ b/roles/kubernetes/preinstall/meta/main.yml @@ -3,7 +3,6 @@ dependencies: - role: adduser user: "{{ addusers.kube }}" when: - - not is_atomic - not is_fedora_coreos tags: - kubelet diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml index 48201a5a9..a5c632aa0 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml @@ -22,7 +22,7 @@ tags: - facts -- name: check if atomic host +- name: check if booted with ostree stat: path: /run/ostree-booted register: ostree @@ -39,15 +39,6 @@ set_fact: 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 shell: which resolvconf register: resolvconf diff --git a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml index 2094c073a..44b99a571 100644 --- a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml +++ b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml @@ -23,7 +23,6 @@ state: absent when: - ansible_distribution in ["CentOS","RedHat","OracleLinux"] - - not is_atomic - not is_fedora_coreos - name: Install python-dnf for latest RedHat versions @@ -36,7 +35,6 @@ - ansible_distribution == "Fedora" - ansible_distribution_major_version|int > 21 - ansible_distribution_major_version|int <= 29 - - not is_atomic - not is_fedora_coreos changed_when: False tags: @@ -51,7 +49,6 @@ when: - ansible_distribution == "Fedora" - ansible_distribution_major_version|int >= 30 - - not is_atomic - not is_fedora_coreos changed_when: False tags: @@ -63,7 +60,6 @@ state: present when: - ansible_distribution in ["CentOS","RedHat"] - - not is_atomic - not is_fedora_coreos - epel_enabled|bool tags: @@ -83,7 +79,7 @@ until: pkgs_task_result is succeeded retries: 4 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: - bootstrap-os diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index f45096a81..04ae9f68f 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -9,7 +9,6 @@ preinstall_selinux_state: permissive kube_api_anonymous_auth: true # Default value, but will be set to true automatically if detected -is_atomic: false is_fedora_coreos: false # optional disable the swap