From 51f4e6585a2000bd226c42ffde813639e4154ac6 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Mon, 23 Apr 2018 14:28:24 +0300 Subject: [PATCH] Revert "Add openSUSE support" (#2697) --- .gitlab-ci.yml | 15 ------------- README.md | 2 -- Vagrantfile | 7 ++---- docs/opensuse.md | 19 ---------------- .../bootstrap-os/tasks/bootstrap-opensuse.yml | 7 ------ roles/bootstrap-os/tasks/main.yml | 22 +++++-------------- roles/docker/tasks/main.yml | 22 ++++--------------- roles/docker/templates/docker.service.j2 | 6 ----- roles/docker/vars/suse.yml | 15 ------------- roles/etcd/tasks/upd_ca_trust.yml | 6 ++--- roles/kubernetes/preinstall/defaults/main.yml | 2 +- roles/kubernetes/preinstall/tasks/main.yml | 9 -------- .../preinstall/tasks/verify-settings.yml | 4 ++-- roles/kubernetes/preinstall/vars/suse.yml | 4 ---- .../kubernetes/secrets/tasks/upd_ca_trust.yml | 6 ++--- roles/rkt/tasks/install.yml | 17 +++++++++++--- roles/rkt/vars/suse.yml | 2 -- tests/files/gce_opensuse-canal.yml | 12 ---------- 18 files changed, 33 insertions(+), 144 deletions(-) delete mode 100644 docs/opensuse.md delete mode 100644 roles/bootstrap-os/tasks/bootstrap-opensuse.yml delete mode 100644 roles/docker/vars/suse.yml delete mode 100644 roles/kubernetes/preinstall/vars/suse.yml delete mode 100644 roles/rkt/vars/suse.yml delete mode 100644 tests/files/gce_opensuse-canal.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e03e64017..6a1eef6ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -308,10 +308,6 @@ before_script: # stage: deploy-special MOVED_TO_GROUP_VARS: "true" -.opensuse_canal_variables: &opensuse_canal_variables -# stage: deploy-part2 - MOVED_TO_GROUP_VARS: "true" - # Builds for PRs only (premoderated by unit-tests step) and triggers (auto) ### PR JOBS PART1 @@ -593,17 +589,6 @@ gce_centos7-calico-ha-triggers: when: on_success only: ['triggers'] -gce_opensuse-canal: - stage: deploy-part2 - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *opensuse_canal_variables - when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] - # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613 gce_coreos-alpha-weave-ha: stage: deploy-special diff --git a/README.md b/README.md index 45a3515bf..081c28fe6 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ Documents - [Vagrant install](docs/vagrant.md) - [CoreOS bootstrap](docs/coreos.md) - [Debian Jessie setup](docs/debian.md) -- [openSUSE setup](docs/opensuse.md) - [Downloaded artifacts](docs/downloads.md) - [Cloud providers](docs/cloud.md) - [OpenStack](docs/openstack.md) @@ -71,7 +70,6 @@ Supported Linux Distributions - **Ubuntu** 16.04 - **CentOS/RHEL** 7 - **Fedora/CentOS** Atomic -- **openSUSE** Leap 42.3/Tumbleweed Note: Upstart/SysV init based OS types are not supported. diff --git a/Vagrantfile b/Vagrantfile index d0b6b73d1..720e2419f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,8 +18,6 @@ SUPPORTED_OS = { "coreos-beta" => {box: "coreos-beta", bootstrap_os: "coreos", user: "core", box_url: COREOS_URL_TEMPLATE % ["beta"]}, "ubuntu" => {box: "bento/ubuntu-16.04", bootstrap_os: "ubuntu", user: "vagrant"}, "centos" => {box: "centos/7", bootstrap_os: "centos", user: "vagrant"}, - "opensuse" => {box: "opensuse/openSUSE-42.3-x86_64", bootstrap_os: "opensuse", use: "vagrant"}, - "opensuse-tumbleweed" => {box: "opensuse/openSUSE-Tumbleweed-x86_64", bootstrap_os: "opensuse", use: "vagrant"}, } # Defaults for config options defined in CONFIG @@ -86,6 +84,7 @@ Vagrant.configure("2") do |config| if Vagrant.has_plugin?("vagrant-vbguest") then config.vbguest.auto_update = false end + (1..$num_instances).each do |i| config.vm.define vm_name = "%s-%02d" % [$instance_name_prefix, i] do |config| config.vm.hostname = vm_name @@ -111,10 +110,8 @@ Vagrant.configure("2") do |config| end end - config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__args: ['--verbose', '--archive', '--delete', '-z'] - $shared_folders.each do |src, dst| - config.vm.synced_folder src, dst, type: "rsync", rsync__args: ['--verbose', '--archive', '--delete', '-z'] + config.vm.synced_folder src, dst end config.vm.provider :virtualbox do |vb| diff --git a/docs/opensuse.md b/docs/opensuse.md deleted file mode 100644 index 88fac3790..000000000 --- a/docs/opensuse.md +++ /dev/null @@ -1,19 +0,0 @@ -openSUSE Leap 42.3 and Tumbleweed -=============== - -openSUSE Leap installation Notes: - -- Install Ansible - - ``` - sudo zypper ref - sudo zypper -n install ansible - - ``` - -- Install Jinja2 and Python-Netaddr - - ```sudo zypper -n install python-Jinja2 python-netaddr``` - - -Now you can continue with [Preparing your deployment](getting-started.md#starting-custom-deployment) diff --git a/roles/bootstrap-os/tasks/bootstrap-opensuse.yml b/roles/bootstrap-os/tasks/bootstrap-opensuse.yml deleted file mode 100644 index abedd2195..000000000 --- a/roles/bootstrap-os/tasks/bootstrap-opensuse.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Install required packages (SUSE) - package: - name: "{{ item }}" - state: present - with_items: - - python-cryptography diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index c921b643e..01031deeb 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -11,9 +11,6 @@ - import_tasks: bootstrap-centos.yml when: bootstrap_os == "centos" -- import_tasks: bootstrap-opensuse.yml - when: bootstrap_os == "opensuse" - - import_tasks: setup-pipelining.yml - name: check if atomic host @@ -29,25 +26,18 @@ gather_subset: '!all' filter: ansible_* -- name: Assign inventory name to unconfigured hostnames (non-CoreOS and Tumbleweed) +- name: Assign inventory name to unconfigured hostnames (non-CoreOS) hostname: name: "{{inventory_hostname}}" - when: - - override_system_hostname - - ansible_distribution not in ['openSUSE Tumbleweed'] - - ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] + when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname -- name: Assign inventory name to unconfigured hostnames (CoreOS and Tumbleweed only) +- name: Assign inventory name to unconfigured hostnames (CoreOS only) command: "hostnamectl set-hostname {{inventory_hostname}}" register: hostname_changed - when: - - ansible_hostname == 'localhost' - - ansible_distribution in ['openSUSE Tumbleweed'] or ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] - - override_system_hostname + when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname -- name: Update hostname fact (CoreOS and Tumbleweed only) +- name: Update hostname fact (CoreOS only) setup: gather_subset: '!all' filter: ansible_hostname - when: - - hostname_changed.changed + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] and hostname_changed.changed diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 3668f61b8..729397b44 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -15,14 +15,6 @@ tags: - facts -# https://yum.dockerproject.org/repo/main/opensuse/ contains packages for an EOL -# openSUSE version so we can't use it. The only alternative is to use the docker -# packages from the distribution repositories. -- name: Warn about Docker version on SUSE - debug: - msg: "SUSE distributions always install Docker from the distro repos" - when: ansible_pkg_mgr == 'zypper' - - include_tasks: set_facts_dns.yml when: dns_mode != 'none' and resolvconf_mode == 'docker_dns' tags: @@ -51,7 +43,7 @@ retries: 4 delay: "{{ retry_stagger | random + 3 }}" with_items: "{{ docker_repo_key_info.repo_keys }}" - when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat", "Suse"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat"] or is_atomic) - name: ensure docker-ce repository is enabled action: "{{ docker_repo_info.pkg_repo }}" @@ -59,7 +51,7 @@ repo: "{{item}}" state: present with_items: "{{ docker_repo_info.repos }}" - when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat", "Suse"] or is_atomic) and (docker_repo_info.repos|length > 0) + when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat"] or is_atomic) and (docker_repo_info.repos|length > 0) - name: ensure docker-engine repository public key is installed action: "{{ dockerproject_repo_key_info.pkg_key }}" @@ -72,7 +64,7 @@ retries: 4 delay: "{{ retry_stagger | random + 3 }}" with_items: "{{ dockerproject_repo_key_info.repo_keys }}" - when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat", "Suse"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat"] or is_atomic) - name: ensure docker-engine repository is enabled action: "{{ dockerproject_repo_info.pkg_repo }}" @@ -80,7 +72,7 @@ repo: "{{item}}" state: present with_items: "{{ dockerproject_repo_info.repos }}" - when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat", "Suse"] or is_atomic) and (dockerproject_repo_info.repos|length > 0) + when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "RedHat"] or is_atomic) and (dockerproject_repo_info.repos|length > 0) - name: Configure docker repository on RedHat/CentOS template: @@ -118,12 +110,6 @@ notify: restart docker when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or is_atomic) and (docker_package_info.pkgs|length > 0) -- name: ensure service is started if docker packages are already present - service: - name: docker - state: started - when: docker_task_result is not changed - - name: flush handlers so we can wait for docker to come up meta: flush_handlers diff --git a/roles/docker/templates/docker.service.j2 b/roles/docker/templates/docker.service.j2 index 8dc82bbb2..d8efe2025 100644 --- a/roles/docker/templates/docker.service.j2 +++ b/roles/docker/templates/docker.service.j2 @@ -7,9 +7,6 @@ Wants=docker-storage-setup.service {% elif ansible_os_family == "Debian" %} After=network.target docker.socket Wants=docker.socket -{% elif ansible_os_family == "Suse" %} -After=network.target containerd.socket containerd.service -Requires=containerd.socket containerd.service {% endif %} [Service] @@ -22,9 +19,6 @@ ExecReload=/bin/kill -s HUP $MAINPID Delegate=yes KillMode=process ExecStart={{ docker_bin_dir }}/docker{% if installed_docker_version.stdout|version_compare('17.03', '<') %} daemon{% else %}d{% endif %} \ -{% if ansible_os_family == "Suse" %} - --containerd /run/containerd/containerd.sock --add-runtime oci=/usr/bin/docker-runc \ -{% endif %} $DOCKER_OPTS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ diff --git a/roles/docker/vars/suse.yml b/roles/docker/vars/suse.yml deleted file mode 100644 index d89a50a7f..000000000 --- a/roles/docker/vars/suse.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -docker_kernel_min_version: '0' - -docker_package_info: - pkg_mgr: zypper - pkgs: - - name: docker - -docker_repo_key_info: - pkg_key: '' - repo_keys: [] - -docker_repo_info: - pkg_repo: '' - repos: [] diff --git a/roles/etcd/tasks/upd_ca_trust.yml b/roles/etcd/tasks/upd_ca_trust.yml index 0ff363860..dd36554fb 100644 --- a/roles/etcd/tasks/upd_ca_trust.yml +++ b/roles/etcd/tasks/upd_ca_trust.yml @@ -8,8 +8,6 @@ /etc/pki/ca-trust/source/anchors/etcd-ca.crt {%- elif ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] -%} /etc/ssl/certs/etcd-ca.pem - {%- elif ansible_os_family == "Suse" -%} - /etc/pki/trust/anchors/etcd-ca.pem {%- endif %} tags: - facts @@ -21,9 +19,9 @@ remote_src: true register: etcd_ca_cert -- name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Container Linux by CoreOS) +- name: Gen_certs | update ca-certificates (Debian/Ubuntu/Container Linux by CoreOS) command: update-ca-certificates - when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Container Linux by CoreOS", "Suse"] + when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Container Linux by CoreOS"] - name: Gen_certs | update ca-certificates (RedHat) command: update-ca-trust extract diff --git a/roles/kubernetes/preinstall/defaults/main.yml b/roles/kubernetes/preinstall/defaults/main.yml index 3bf847fb9..149cbb42a 100644 --- a/roles/kubernetes/preinstall/defaults/main.yml +++ b/roles/kubernetes/preinstall/defaults/main.yml @@ -8,7 +8,7 @@ epel_enabled: false common_required_pkgs: - python-httplib2 - - "{{ (ansible_distribution == 'openSUSE Tumbleweed') | ternary('openssl-1_1_0', 'openssl') }}" + - openssl - curl - rsync - bash-completion diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 8df0ff9ee..8b9cbbe1a 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -158,15 +158,6 @@ - not is_atomic tags: bootstrap-os -- name: Update package management cache (zypper) - SUSE - shell: zypper -n --gpg-auto-import-keys ref - register: make_cache_output - until: make_cache_output|succeeded - retries: 4 - delay: "{{ retry_stagger | random + 3 }}" - when: - - ansible_pkg_mgr == 'zypper' - tags: bootstrap-os - name: Update package management cache (APT) apt: diff --git a/roles/kubernetes/preinstall/tasks/verify-settings.yml b/roles/kubernetes/preinstall/tasks/verify-settings.yml index 5f647101d..8f0a2e854 100644 --- a/roles/kubernetes/preinstall/tasks/verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/verify-settings.yml @@ -12,7 +12,7 @@ - name: Stop if unknown OS assert: - that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Container Linux by CoreOS', 'openSUSE Leap', 'openSUSE Tumbleweed'] + that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Container Linux by CoreOS'] ignore_errors: "{{ ignore_assert_errors }}" - name: Stop if unknown network plugin @@ -94,4 +94,4 @@ assert: that: ansible_kernel.split('-')[0]|version_compare('4.8', '>=') when: kube_network_plugin == 'cilium' - ignore_errors: "{{ ignore_assert_errors }}" + ignore_errors: "{{ ignore_assert_errors }}" \ No newline at end of file diff --git a/roles/kubernetes/preinstall/vars/suse.yml b/roles/kubernetes/preinstall/vars/suse.yml deleted file mode 100644 index 3f4f9aee9..000000000 --- a/roles/kubernetes/preinstall/vars/suse.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -required_pkgs: - - device-mapper - - ebtables diff --git a/roles/kubernetes/secrets/tasks/upd_ca_trust.yml b/roles/kubernetes/secrets/tasks/upd_ca_trust.yml index cdd5f48fa..eec44987f 100644 --- a/roles/kubernetes/secrets/tasks/upd_ca_trust.yml +++ b/roles/kubernetes/secrets/tasks/upd_ca_trust.yml @@ -8,8 +8,6 @@ /etc/pki/ca-trust/source/anchors/kube-ca.crt {%- elif ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] -%} /etc/ssl/certs/kube-ca.pem - {%- elif ansible_os_family == "Suse" -%} - /etc/pki/trust/anchors/kube-ca.pem {%- endif %} tags: - facts @@ -21,9 +19,9 @@ remote_src: true register: kube_ca_cert -- name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Container Linux by CoreOS) +- name: Gen_certs | update ca-certificates (Debian/Ubuntu/Container Linux by CoreOS) command: update-ca-certificates - when: kube_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Container Linux by CoreOS", "Suse"] + when: kube_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Container Linux by CoreOS"] - name: Gen_certs | update ca-certificates (RedHat) command: update-ca-trust extract diff --git a/roles/rkt/tasks/install.yml b/roles/rkt/tasks/install.yml index cbaaf4085..599f9e50e 100644 --- a/roles/rkt/tasks/install.yml +++ b/roles/rkt/tasks/install.yml @@ -15,11 +15,22 @@ tags: - facts -- name: install rkt pkg - package: - name: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" +- name: install rkt pkg on ubuntu + apt: + deb: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" state: present register: rkt_task_result until: rkt_task_result|succeeded retries: 4 delay: "{{ retry_stagger | random + 3 }}" + when: ansible_os_family == "Debian" + +- name: install rkt pkg on centos + yum: + pkg: "{{ rkt_download_url }}/{{ rkt_pkg_name }}" + state: present + register: rkt_task_result + until: rkt_task_result|succeeded + retries: 4 + delay: "{{ retry_stagger | random + 3 }}" + when: ansible_os_family == "RedHat" diff --git a/roles/rkt/vars/suse.yml b/roles/rkt/vars/suse.yml deleted file mode 100644 index 13149e8fb..000000000 --- a/roles/rkt/vars/suse.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -rkt_pkg_name: "rkt-{{ rkt_pkg_version }}.x86_64.rpm" diff --git a/tests/files/gce_opensuse-canal.yml b/tests/files/gce_opensuse-canal.yml deleted file mode 100644 index 9eae57e2e..000000000 --- a/tests/files/gce_opensuse-canal.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Instance settings -cloud_image_family: opensuse-leap -cloud_region: us-central1-c -mode: default - -# Deployment settings -bootstrap_os: opensuse -kube_network_plugin: canal -kubeadm_enabled: true -deploy_netchecker: true -kubedns_min_replicas: 1 -cloud_provider: gce