Support for Oracle Linux (#3655)

Fixed Issue #1032

test case for OEL7 AIL with kubeadm

Add packet CI stuff for oracle 7
pull/4969/head
Jeff Bornemann 2019-07-12 02:17:06 -04:00 committed by Kubernetes Prow Robot
parent cdf9a9f4fc
commit 728155a2a1
14 changed files with 77 additions and 7 deletions

View File

@ -218,6 +218,13 @@ gce_centos7-multus-calico:
<<: *centos7_multus_calico_variables <<: *centos7_multus_calico_variables
when: manual when: manual
gce_oracle-canal:
stage: deploy-gce
<<: *gce
when: manual
except: ['triggers']
only: ['master', /^pr-.*$/]
gce_opensuse-canal: gce_opensuse-canal:
stage: deploy-gce stage: deploy-gce
<<: *gce <<: *gce

View File

@ -101,6 +101,11 @@ packet_opensuse-canal:
<<: *packet <<: *packet
when: manual when: manual
packet_oracle-7-canal:
stage: deploy-part2
<<: *packet
when: manual
packet_ubuntu-kube-router-sep: packet_ubuntu-kube-router-sep:
stage: deploy-part2 stage: deploy-part2
<<: *packet <<: *packet

View File

@ -101,6 +101,7 @@ Supported Linux Distributions
- **Fedora** 28 - **Fedora** 28
- **Fedora/CentOS** Atomic - **Fedora/CentOS** Atomic
- **openSUSE** Leap 42.3/Tumbleweed - **openSUSE** Leap 42.3/Tumbleweed
- **Oracle Linux** 7
Note: Upstart/SysV init based OS types are not supported. Note: Upstart/SysV init based OS types are not supported.

1
Vagrantfile vendored
View File

@ -25,6 +25,7 @@ SUPPORTED_OS = {
"fedora" => {box: "fedora/28-cloud-base", user: "vagrant"}, "fedora" => {box: "fedora/28-cloud-base", user: "vagrant"},
"opensuse" => {box: "opensuse/openSUSE-15.0-x86_64", user: "vagrant"}, "opensuse" => {box: "opensuse/openSUSE-15.0-x86_64", user: "vagrant"},
"opensuse-tumbleweed" => {box: "opensuse/openSUSE-Tumbleweed-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 # Defaults for config options defined in CONFIG

View File

@ -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

View File

@ -25,6 +25,9 @@
- include_tasks: bootstrap-opensuse.yml - include_tasks: bootstrap-opensuse.yml
when: '"openSUSE" in os_release.stdout' 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 - name: Create remote_tmp for it is used by another module
file: file:
path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}" path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}"

View File

@ -22,7 +22,7 @@
description: OpenShift Origin Repo description: OpenShift Origin Repo
baseurl: "{{ crio_rhel_repo_base_url }}" baseurl: "{{ crio_rhel_repo_base_url }}"
gpgcheck: no 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 - name: Add CRI-O PPA
apt_repository: apt_repository:

View File

@ -104,11 +104,11 @@
dest: "{{ yum_repo_dir }}/docker.repo" dest: "{{ yum_repo_dir }}/docker.repo"
when: ansible_distribution == "Fedora" and not is_atomic 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: template:
src: "rh_docker.repo.j2" src: "rh_docker.repo.j2"
dest: "{{ yum_repo_dir }}/docker.repo" 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 - name: check if container-selinux is available
yum: yum:
@ -136,7 +136,7 @@
src: "{{ yum_conf }}" src: "{{ yum_conf }}"
dest: "{{ docker_yum_conf }}" dest: "{{ docker_yum_conf }}"
remote_src: yes 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 - name: Edit copy of yum.conf to set obsoletes=0
lineinfile: lineinfile:
@ -144,7 +144,7 @@
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","OracleLinux"] and not is_atomic
- name: ensure docker packages are installed - name: ensure docker packages are installed
action: "{{ docker_package_info.pkg_mgr }}" action: "{{ docker_package_info.pkg_mgr }}"

View File

@ -16,7 +16,7 @@
- name: Stop if unknown OS - name: Stop if unknown OS
assert: 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 }}" ignore_errors: "{{ ignore_assert_errors }}"
- name: Stop if unknown network plugin - name: Stop if unknown network plugin

View File

@ -90,6 +90,6 @@
when: when:
- not dns_late - not dns_late
- azure_check.stat.exists - azure_check.stat.exists
- ansible_distribution in ["CentOS","RedHat"] - ansible_distribution in ["CentOS","RedHat","OracleLinux"]
tags: tags:
- bootstrap-os - bootstrap-os

View File

@ -35,3 +35,9 @@ images:
url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2 url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2
checksum: sha256:01d9345ba7a6523d214d2eaabe07fe7b4b69b28e63d7a6b322521e99e5768719 checksum: sha256:01d9345ba7a6523d214d2eaabe07fe7b4b69b28e63d7a6b322521e99e5768719
converted: true 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

View File

@ -26,3 +26,4 @@ cloud_init:
rhel-server-7: "I2Nsb3VkLWNvbmZpZwpzeXN0ZW1faW5mbzoKICBkaXN0cm86IHJoZWwKdXNlcnM6CiAtIG5hbWU6IGt1YmVzcHJheQogICBncm91cHM6IHdoZWVsCiAgIHN1ZG86ICdBTEw9KEFMTCkgTk9QQVNTV0Q6QUxMJwogICBzaGVsbDogL2Jpbi9iYXNoCiAgIGxvY2tfcGFzc3dkOiBGYWxzZQogICBob21lOiAvaG9tZS9rdWJlc3ByYXkKICAgc3NoX2F1dGhvcml6ZWRfa2V5czoKICAgICAtIHNzaC1yc2EgQUFBQUIzTnphQzF5YzJFQUFBQURBUUFCQUFBQkFRQ2FuVGkvZUt4MCt0SFlKQWVEaHErc0ZTMk9iVVAxL0k2OWY3aVYzVXRrS2xUMjBKZlcxZjZGZVh0LzA0VmYyN1dRcStOcXM2dkdCcUQ5UVhTWXVmK3QwL3M3RVBMalRlaTltZTFtcHFyK3VUZStLRHRUUDM5cGZEMy9lVkNhZUI3MjZHUDJGa2FEMEZ6cG1FYjY2TzNOcWh4T1E5Nkd4LzlYVHV3L0szbGxqNE9WRDZHcmpSM0I3YzRYdEVCc1pjWnBwTUovb0gxbUd5R1hkaDMxbVdRU3FBUk8vUDhVOEd3dDArSEdwVXdoL2hkeTN0K1NZb1RCMkd3VmIwem95Vnd0VnZmRFF6c204ZnEzYXY0S3ZlejhrWXVOREp2MDV4NGx2VVpnUjE1WkRSWHNBbmRoUXlxb1hkQ0xBZTArZWFLWHE5Q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IWUpBZURocStzRlMyT2JVUDEvSTY5ZjdpVjNVdGtLbFQyMEpmVzFmNkZlWHQvMDRWZjI3V1FxK05xczZ2R0JxRDlRWFNZdWYrdDAvczdFUExqVGVpOW1lMW1wcXIrdVRlK0tEdFRQMzlwZkQzL2VWQ2FlQjcyNkdQMkZrYUQwRnpwbUViNjZPM05xaHhPUTk2R3gvOVhUdXcvSzNsbGo0T1ZENkdyalIzQjdjNFh0RUJzWmNacHBNSi9vSDFtR3lHWGRoMzFtV1FTcUFSTy9QOFU4R3d0MCtIR3BVd2gvaGR5M3QrU1lvVEIyR3dWYjB6b3lWd3RWdmZEUXpzbThmcTNhdjRLdmV6OGtZdU5ESnYwNXg0bHZVWmdSMTVaRFJYc0FuZGhReXFvWGRDTEFlMCtlYUtYcTlCa1d4S0ZiOWhQZTBBVWpqYTU="

View File

@ -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

View File

@ -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