diff --git a/.gitlab-ci/gce.yml b/.gitlab-ci/gce.yml index 9268b211def4fd881b11e330cce0107584c5301f..f8ad8073f95e075f57423951132370c1a2346058 100644 --- a/.gitlab-ci/gce.yml +++ b/.gitlab-ci/gce.yml @@ -218,6 +218,13 @@ gce_centos7-multus-calico: <<: *centos7_multus_calico_variables when: manual +gce_oracle-canal: + stage: deploy-gce + <<: *gce + when: manual + except: ['triggers'] + only: ['master', /^pr-.*$/] + gce_opensuse-canal: stage: deploy-gce <<: *gce diff --git a/.gitlab-ci/packet.yml b/.gitlab-ci/packet.yml index 9a7da69563aea574bde737682300146b892f4104..62ee621284ff2fd9492283ab47d44cfcafe319df 100644 --- a/.gitlab-ci/packet.yml +++ b/.gitlab-ci/packet.yml @@ -101,6 +101,11 @@ packet_opensuse-canal: <<: *packet when: manual +packet_oracle-7-canal: + stage: deploy-part2 + <<: *packet + when: manual + packet_ubuntu-kube-router-sep: stage: deploy-part2 <<: *packet diff --git a/README.md b/README.md index c3714ed9ab0015e8f11fd708780e88f7b31e0874..bc6b63ef54a23f5cd24d63ca12088f76225975c3 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ Supported Linux Distributions - **Fedora** 28 - **Fedora/CentOS** Atomic - **openSUSE** Leap 42.3/Tumbleweed +- **Oracle Linux** 7 Note: Upstart/SysV init based OS types are not supported. diff --git a/Vagrantfile b/Vagrantfile index 991ab2a0fd70033391e83d89b684e3d4184a102a..88a55ed89775a946cd91310ccddbe9f00c47ac40 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,6 +25,7 @@ SUPPORTED_OS = { "fedora" => {box: "fedora/28-cloud-base", user: "vagrant"}, "opensuse" => {box: "opensuse/openSUSE-15.0-x86_64", user: "vagrant"}, "opensuse-tumbleweed" => {box: "opensuse/openSUSE-Tumbleweed-x86_64", user: "vagrant"}, + "oraclelinux" => {box: "generic/oracle7", user: "vagrant"}, } # Defaults for config options defined in CONFIG diff --git a/roles/bootstrap-os/tasks/bootstrap-oracle.yml b/roles/bootstrap-os/tasks/bootstrap-oracle.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e1126e47627cb858946b39d1819421a790ed48d --- /dev/null +++ b/roles/bootstrap-os/tasks/bootstrap-oracle.yml @@ -0,0 +1,21 @@ +--- +- name: Download Oracle Linux public yum repo + get_url: + url: https://yum.oracle.com/public-yum-ol7.repo + dest: /etc/yum.repos.d/public-yum-ol7.repo + +- name: Enable Oracle Linux repo + ini_file: + dest: /etc/yum.repos.d/public-yum-ol7.repo + section: "{{ item }}" + option: enabled + value: "1" + with_items: + - ol7_latest + - ol7_addons + - ol7_developer_EPEL + +- name: Install packages requirements for bootstrap + yum: + name: container-selinux + state: present diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index e758fca124ffa9ba5577f966e12bdb9f0409272e..292017446f43dec47c4e563cdde73e1d0b74f4af 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -25,6 +25,9 @@ - include_tasks: bootstrap-opensuse.yml when: '"openSUSE" in os_release.stdout' +- include_tasks: bootstrap-oracle.yml + when: '"Oracle" in os_release.stdout' + - name: Create remote_tmp for it is used by another module file: path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}" diff --git a/roles/container-engine/cri-o/tasks/main.yaml b/roles/container-engine/cri-o/tasks/main.yaml index 82767a8b924fe1e34488fd55bf8a9983e002fc34..9ab834a2b99084441845bc24cd41974eb939e6d3 100644 --- a/roles/container-engine/cri-o/tasks/main.yaml +++ b/roles/container-engine/cri-o/tasks/main.yaml @@ -22,7 +22,7 @@ description: OpenShift Origin Repo baseurl: "{{ crio_rhel_repo_base_url }}" gpgcheck: no - when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic + when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_atomic - name: Add CRI-O PPA apt_repository: diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index e44dca8d616c1b5bf13278035fcf3c774ce7b0aa..cb1f82ce98a6988bda21a0eab5b7c1fb8fb5aaca 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -104,11 +104,11 @@ dest: "{{ yum_repo_dir }}/docker.repo" when: ansible_distribution == "Fedora" and not is_atomic -- name: Configure docker repository on RedHat/CentOS +- name: Configure docker repository on RedHat/CentOS/Oracle Linux template: src: "rh_docker.repo.j2" dest: "{{ yum_repo_dir }}/docker.repo" - when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic + when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_atomic - name: check if container-selinux is available yum: @@ -136,7 +136,7 @@ src: "{{ yum_conf }}" dest: "{{ docker_yum_conf }}" remote_src: yes - when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic + when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_atomic - name: Edit copy of yum.conf to set obsoletes=0 lineinfile: @@ -144,7 +144,7 @@ state: present regexp: '^obsoletes=' line: 'obsoletes=0' - when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic + when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_atomic - name: ensure docker packages are installed action: "{{ docker_package_info.pkg_mgr }}" diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index 8153bfc85345599d6ccf90addf02080ac707d50d..d5b139e2b66937b3714def9ee3499d1606c6dd60 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -16,7 +16,7 @@ - name: Stop if unknown OS assert: - that: ansible_os_family in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Container Linux by CoreOS', 'Suse', 'ClearLinux'] + that: ansible_os_family in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Container Linux by CoreOS', 'Suse', 'ClearLinux', 'OracleLinux'] ignore_errors: "{{ ignore_assert_errors }}" - name: Stop if unknown network plugin diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index e9e2f64202e55b4a6d93472542fe192f247c9c78..63d20a923ab61c4c9f8420c9a0cb1e3f3c750a2a 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -90,6 +90,6 @@ when: - not dns_late - azure_check.stat.exists - - ansible_distribution in ["CentOS","RedHat"] + - ansible_distribution in ["CentOS","RedHat","OracleLinux"] tags: - bootstrap-os diff --git a/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml b/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml index ed3407a9335f6616a58472da9d58b1d63c6bc6f3..4916ef311d7982855597aaed1ab8188a210883c9 100644 --- a/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml +++ b/test-infra/image-builder/roles/kubevirt-images/defaults/main.yml @@ -35,3 +35,9 @@ images: url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2 checksum: sha256:01d9345ba7a6523d214d2eaabe07fe7b4b69b28e63d7a6b322521e99e5768719 converted: true + + oracle-7: + filename: oracle-linux-76.qcow2 + url: https://storage.googleapis.com/born-images/oracle76/oracle-linux-76.qcow2 + checksum: sha256:f396c03e907fa2a0c94d6807b9f62622f23ee3499df4456ae2a15da381fbdca5 + converted: true diff --git a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml index 5893be751a6295cbb07d35eec46b7abd5bea949e..7093a960dc7b8832017c38262bdf13f125bc1876 100644 --- a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml +++ b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml @@ -26,3 +26,4 @@ cloud_init: rhel-server-7: "I2Nsb3VkLWNvbmZpZwpzeXN0ZW1faW5mbzoKICBkaXN0cm86IHJ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wVXdoL2hkeTN0K1NZb1RCMkd3VmIwem95Vnd0VnZmRFF6c204ZnEzYXY0S3ZlejhrWXVOREp2MDV4NGx2VVpnUjE1WkRSWHNBbmRoUXlxb1hkQ0xBZTArZWFLWHE5QmtXeEtGYjloUGUwQVVqamE1" + oracle-7: "I2Nsb3VkLWNvbmZpZwpzeXN0ZW1faW5mbzoKICBkaXN0cm86IGZlZG9yYQp1c2VyczoKIC0gbmFtZToga3ViZXNwcmF5CiAgIGdyb3Vwczogd2hlZWwKICAgc3VkbzogJ0FMTD0oQUxMKSBOT1BBU1NXRDpBTEwnCiAgIHNoZWxsOiAvYmluL2Jhc2gKICAgbG9ja19wYXNzd2Q6IEZhbHNlCiAgIGhvbWU6IC9ob21lL2t1YmVzcHJheQogICBzc2hfYXV0aG9yaXplZF9rZXlzOgogICAgIC0gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDYW5UaS9lS3gwK3RIWUpBZURocStzRlMyT2JVUDEvSTY5ZjdpVjNVdGtLbFQyMEpmVzFmNkZlWHQvMDRWZjI3V1FxK05xczZ2R0JxRDlRWFNZdWYrdDAvczdFUExqVGVpOW1lMW1wcXIrdVRlK0tEdFRQMzlwZkQzL2VWQ2FlQjcyNkdQMkZrYUQwRnpwbUViNjZPM05xaHhPUTk2R3gvOVhUdXcvSzNsbGo0T1ZENkdyalIzQjdjNFh0RUJzWmNacHBNSi9vSDFtR3lHWGRoMzFtV1FTcUFSTy9QOFU4R3d0MCtIR3BVd2gvaGR5M3QrU1lvVEIyR3dWYjB6b3lWd3RWdmZEUXpzbThmcTNhdjRLdmV6OGtZdU5ESnYwNXg0bHZVWmdSMTVaRFJYc0FuZGhReXFvWGRDTEFlMCtlYUtYcTlCa1d4S0ZiOWhQZTBBVWpqYTU=" diff --git a/tests/files/gce_oracle-canal.yml b/tests/files/gce_oracle-canal.yml new file mode 100644 index 0000000000000000000000000000000000000000..f3da8a1a5caa441a0a8e1be47dc4230df2a6f661 --- /dev/null +++ b/tests/files/gce_oracle-canal.yml @@ -0,0 +1,14 @@ +--- +# Instance settings +cloud_image_family: oracle-7 +cloud_region: us-central1-a +cloud_machine_type: "n1-standard-1" +mode: default + +# Deployment settings +kube_network_plugin: canal +dynamic_kubelet_configuration: true +deploy_netchecker: true +kubeadm_enabled: true +kubedns_min_replicas: 1 +cloud_provider: gce diff --git a/tests/files/packet_oracle-7-canal.yml b/tests/files/packet_oracle-7-canal.yml new file mode 100644 index 0000000000000000000000000000000000000000..042507d1a3f580bf145821f46d699afc607eae01 --- /dev/null +++ b/tests/files/packet_oracle-7-canal.yml @@ -0,0 +1,11 @@ +--- +# Instance settings +cloud_image: oracle-7 +mode: ha + +# Kubespray settings +kube_network_plugin: canal +kubeadm_enabled: true +dynamic_kubelet_configuration: true +deploy_netchecker: true +dns_min_replicas: 1