From d0c607441ae889268141d8cce4b0d17425dde85a Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 26 Jun 2019 16:01:30 +0800 Subject: [PATCH] Apply role "install-docker" to all of jobs Make all of OpenLab jobs to use new role "install-docker" to install and config docker-ce, update tags of related jobs to specific docker version and remove all of "latest-release" define. Closes: theopenlab/openlab#308 --- .../run.yaml | 3 +-- .../kind-integration-test-arm64/run.yaml | 6 ++--- .../run.yaml | 5 ++-- .../tasks/main.yaml | 4 +++- .../tasks/main.yml | 4 +++- roles/install-k8s/tasks/main.yaml | 23 ++++++------------- zuul.d/jobs.yaml | 14 +++++------ 7 files changed, 25 insertions(+), 34 deletions(-) diff --git a/playbooks/helm-integration-test-kubeadm-k8s/run.yaml b/playbooks/helm-integration-test-kubeadm-k8s/run.yaml index bfd79392b..1133732b6 100644 --- a/playbooks/helm-integration-test-kubeadm-k8s/run.yaml +++ b/playbooks/helm-integration-test-kubeadm-k8s/run.yaml @@ -1,8 +1,7 @@ - hosts: all become: yes roles: - - role: create-single-k8s-cluster-with-kubeadm - docker_vcgroupdriver: "cgroupfs" + - create-single-k8s-cluster-with-kubeadm tasks: - name: Run integration tests of Helm deployed on k8s cluster shell: diff --git a/playbooks/kind-integration-test-arm64/run.yaml b/playbooks/kind-integration-test-arm64/run.yaml index 8268af7b6..8d490dbbf 100644 --- a/playbooks/kind-integration-test-arm64/run.yaml +++ b/playbooks/kind-integration-test-arm64/run.yaml @@ -5,10 +5,8 @@ - role: config-golang go_version: 1.12.1 arch: arm64 - - role: install-docker-ce - arch: arm64 - #- role: andrewrothstein.bazel - # bazel_ver: '0.23.1' + - role: install-docker + docker_version: 18.09 tasks: - name: git required repositories diff --git a/playbooks/spark-integration-test-minikube-k8s/run.yaml b/playbooks/spark-integration-test-minikube-k8s/run.yaml index 188e18a7c..7c78af229 100644 --- a/playbooks/spark-integration-test-minikube-k8s/run.yaml +++ b/playbooks/spark-integration-test-minikube-k8s/run.yaml @@ -1,9 +1,8 @@ - hosts: all become: yes roles: - - role: install-docker-ce - docker_ce_version: 18.06 - docker_vcgroupdriver: "cgroupfs" + - role: install-docker + docker_version: 18.06 - create-single-k8s-cluster-with-minikube tasks: - name: Run integration tests of Spark with k8s cluster manager diff --git a/roles/create-multinodes-k8s-cluster-with-kubeadm/tasks/main.yaml b/roles/create-multinodes-k8s-cluster-with-kubeadm/tasks/main.yaml index 15406a793..b69376655 100644 --- a/roles/create-multinodes-k8s-cluster-with-kubeadm/tasks/main.yaml +++ b/roles/create-multinodes-k8s-cluster-with-kubeadm/tasks/main.yaml @@ -1,6 +1,8 @@ - name: Install Runtime Docker CE include_role: - name: install-docker-ce + name: install-docker + vars: + docker_version: '18.09' - name: Install packages repository shell: diff --git a/roles/create-single-k8s-cluster-with-kubeadm/tasks/main.yml b/roles/create-single-k8s-cluster-with-kubeadm/tasks/main.yml index 00f67a8f1..e07acd37a 100644 --- a/roles/create-single-k8s-cluster-with-kubeadm/tasks/main.yml +++ b/roles/create-single-k8s-cluster-with-kubeadm/tasks/main.yml @@ -1,6 +1,8 @@ - name: Install Runtime Docker CE include_role: - name: install-docker-ce + name: install-docker + vars: + docker_version: '18.06' - name: Create a single k8s master cluster by kubeadm shell: diff --git a/roles/install-k8s/tasks/main.yaml b/roles/install-k8s/tasks/main.yaml index ec5ad5cb8..be50daeb9 100644 --- a/roles/install-k8s/tasks/main.yaml +++ b/roles/install-k8s/tasks/main.yaml @@ -1,24 +1,15 @@ -- name: Disable iptables, install docker, etcd {{ etcd_version }} and kubernetes {{ k8s_version }} +- name: Install Runtime Docker CE + include_role: + name: install-docker + vars: + docker_version: '18.09' + +- name: Install etcd {{ etcd_version }} and kubernetes {{ k8s_version }} shell: cmd: | set -x set -e - # Stopping firewall and allow all traffic - iptables -F - iptables -X - iptables -t nat -F - iptables -t nat -X - iptables -t mangle -F - iptables -t mangle -X - iptables -P INPUT ACCEPT - iptables -P FORWARD ACCEPT - iptables -P OUTPUT ACCEPT - - # Install docker - apt update -y - apt install -y docker.io - # Install etcd wget https://github.com/coreos/etcd/releases/download/{{ etcd_version }}/etcd-{{ etcd_version }}-linux-amd64.tar.gz tar -zxf etcd-{{ etcd_version }}-linux-amd64.tar.gz diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 6ec2c7719..a74fedf1b 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -606,7 +606,7 @@ - Project:kubernetes/cloud-provider-openstack - Application:cloud-provider-openstack@release-1.12 - Application:Kubernetes@release-1.12 - - Application:Docker.io@v18.09.2 + - Application:Docker.io@v18.09 - Application:Etcd@v3.3.10 - Application:Go@1.10.8 - OS:ubuntu-xenial @@ -626,7 +626,7 @@ - Project:kubernetes/cloud-provider-openstack - Application:cloud-provider-openstack@release-1.13 - Application:Kubernetes@release-1.13 - - Application:Docker.io@v18.09.2 + - Application:Docker.io@v18.09 - Application:Etcd@v3.3.10 - Application:Go@1.12 - OS:ubuntu-xenial @@ -646,7 +646,7 @@ - Project:kubernetes/cloud-provider-openstack - Application:cloud-provider-openstack@release-1.14 - Application:Kubernetes@release-1.14 - - Application:Docker.io@v18.09.2 + - Application:Docker.io@v18.09 - Application:Etcd@v3.3.10 - Application:Go@1.12.1 - OS:ubuntu-xenial @@ -666,7 +666,7 @@ - Project:kubernetes/cloud-provider-openstack - Application:cloud-provider-openstack@release-1.15 - Application:Kubernetes@release-1.15 - - Application:Docker.io@v18.09.2 + - Application:Docker.io@v18.09 - Application:Etcd@v3.3.10 - Application:Go@1.12.1 - OS:ubuntu-xenial @@ -1954,7 +1954,7 @@ - Category:BigData - Project:apache/spark - Application:Spark@master - - Application:Docker@latest-release + - Application:Docker@18.06 - Application:Kubernetes@v1.14.0 - OS:ubuntu-xenial - Arch:x86_64 @@ -2002,7 +2002,7 @@ - Application:Kind@master - Application:Go@1.12.1 - Application:Kubernetes@master - - Application:Docker@latest-release + - Application:Docker@18.09 - OS:ubuntu-xenial - Arch:aarch64 - BuildType:Integration test @@ -2021,7 +2021,7 @@ - Project:helm/charts - Application:Helm@v2.12.2 - Application:Kubernetes@v1.14.0 - - Application:Docker@latest-release + - Application:Docker@18.06 - OS:ubuntu-xenial - Arch:x86_64 - BuildType:Integration test