Rename install-kubernetes to ensure-kubernetes for consistency
The old role will be kept and include ensure-kubernetes for backwards compatability. Change-Id: Ic0c18a833f4a07e123f8313673bd9c864d7d2919
This commit is contained in:
parent
c80b593fb6
commit
fcf3202ba4
@ -6,6 +6,7 @@ Container Roles
|
|||||||
.. zuul:autorole:: collect-container-logs
|
.. zuul:autorole:: collect-container-logs
|
||||||
.. zuul:autorole:: deploy-openshift
|
.. zuul:autorole:: deploy-openshift
|
||||||
.. zuul:autorole:: ensure-docker
|
.. zuul:autorole:: ensure-docker
|
||||||
|
.. zuul:autorole:: ensure-kubernetes
|
||||||
.. zuul:autorole:: install-docker
|
.. zuul:autorole:: install-docker
|
||||||
.. zuul:autorole:: install-kubernetes
|
.. zuul:autorole:: install-kubernetes
|
||||||
.. zuul:autorole:: install-openshift
|
.. zuul:autorole:: install-openshift
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: clear-firewall
|
- role: clear-firewall
|
||||||
- role: install-kubernetes
|
- role: ensure-kubernetes
|
||||||
- role: ensure-helm
|
- role: ensure-helm
|
||||||
|
25
roles/ensure-kubernetes/README.rst
Normal file
25
roles/ensure-kubernetes/README.rst
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
An ansible role to install kubernetes.
|
||||||
|
|
||||||
|
**Role Variables**
|
||||||
|
|
||||||
|
.. zuul:rolevar:: install_kubernetes_with_cluster
|
||||||
|
:default: True
|
||||||
|
|
||||||
|
If true, installs a Minikube cluster.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: minikube_version
|
||||||
|
:default: latest
|
||||||
|
|
||||||
|
The version of Minikube to install.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: minikube_dns_resolvers
|
||||||
|
:default: []
|
||||||
|
|
||||||
|
List of dns resolvers to configure in k8s. Use this to override the
|
||||||
|
resolvers that are found by default.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: kubernetes_runtime
|
||||||
|
:default: docker
|
||||||
|
|
||||||
|
Which kubernetes runtime to use; values are ``docker`` or
|
||||||
|
``cri-o``.
|
24
roles/ensure-kubernetes/tasks/main.yaml
Normal file
24
roles/ensure-kubernetes/tasks/main.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
- name: Install apt key
|
||||||
|
become: yes
|
||||||
|
apt_key:
|
||||||
|
url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add kubernetes repo
|
||||||
|
become: yes
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://apt.kubernetes.io/ kubernetes-xenial main
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install kubernetes packages and dependencies
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- conntrack
|
||||||
|
- kubectl
|
||||||
|
- liblz4-tool
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Run cluster tasks
|
||||||
|
include_tasks: minikube.yaml
|
||||||
|
when: install_kubernetes_with_cluster
|
@ -1,25 +1 @@
|
|||||||
An ansible role to install kubernetes.
|
.. warning:: Deprecated, use ensure-kubernetes instead.
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: install_kubernetes_with_cluster
|
|
||||||
:default: True
|
|
||||||
|
|
||||||
If true, installs a Minikube cluster.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: minikube_version
|
|
||||||
:default: latest
|
|
||||||
|
|
||||||
The version of Minikube to install.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: minikube_dns_resolvers
|
|
||||||
:default: []
|
|
||||||
|
|
||||||
List of dns resolvers to configure in k8s. Use this to override the
|
|
||||||
resolvers that are found by default.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: kubernetes_runtime
|
|
||||||
:default: docker
|
|
||||||
|
|
||||||
Which kubernetes runtime to use; values are ``docker`` or
|
|
||||||
``cri-o``.
|
|
||||||
|
@ -1,24 +1,3 @@
|
|||||||
- name: Install apt key
|
- name: Include ensure-kubernetes
|
||||||
become: yes
|
include_role:
|
||||||
apt_key:
|
name: ensure-kubernetes
|
||||||
url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Add kubernetes repo
|
|
||||||
become: yes
|
|
||||||
apt_repository:
|
|
||||||
repo: deb http://apt.kubernetes.io/ kubernetes-xenial main
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Install kubernetes packages and dependencies
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
name:
|
|
||||||
- conntrack
|
|
||||||
- kubectl
|
|
||||||
- liblz4-tool
|
|
||||||
update_cache: yes
|
|
||||||
|
|
||||||
- name: Run cluster tasks
|
|
||||||
include_tasks: minikube.yaml
|
|
||||||
when: install_kubernetes_with_cluster
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: clear-firewall
|
- role: clear-firewall
|
||||||
- role: install-kubernetes
|
- role: ensure-kubernetes
|
||||||
vars:
|
vars:
|
||||||
minikube_dns_resolvers:
|
minikube_dns_resolvers:
|
||||||
- '1.1.1.1'
|
- '1.1.1.1'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: clear-firewall
|
- role: clear-firewall
|
||||||
- role: install-kubernetes
|
- role: ensure-kubernetes
|
||||||
docker_use_buildset_registry: true
|
docker_use_buildset_registry: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Wait for cluster to come up
|
- name: Wait for cluster to come up
|
||||||
|
@ -139,7 +139,7 @@
|
|||||||
- roles/pull-from-intermediate-registry/.*
|
- roles/pull-from-intermediate-registry/.*
|
||||||
- roles/push-to-intermediate-registry/.*
|
- roles/push-to-intermediate-registry/.*
|
||||||
- roles/ensure-docker/.*
|
- roles/ensure-docker/.*
|
||||||
- roles/install-kubernetes/.*
|
- roles/ensure-kubernetes/.*
|
||||||
- roles/build-docker-image/.*
|
- roles/build-docker-image/.*
|
||||||
- roles/run-buildset-registry/.*
|
- roles/run-buildset-registry/.*
|
||||||
- roles/use-buildset-registry/.*
|
- roles/use-buildset-registry/.*
|
||||||
@ -162,7 +162,7 @@
|
|||||||
- roles/pull-from-intermediate-registry/.*
|
- roles/pull-from-intermediate-registry/.*
|
||||||
- roles/push-to-intermediate-registry/.*
|
- roles/push-to-intermediate-registry/.*
|
||||||
- roles/ensure-docker/.*
|
- roles/ensure-docker/.*
|
||||||
- roles/install-kubernetes/.*
|
- roles/ensure-kubernetes/.*
|
||||||
- roles/build-docker-image/.*
|
- roles/build-docker-image/.*
|
||||||
- roles/run-buildset-registry/.*
|
- roles/run-buildset-registry/.*
|
||||||
- roles/use-buildset-registry/.*
|
- roles/use-buildset-registry/.*
|
||||||
@ -186,7 +186,7 @@
|
|||||||
- roles/pull-from-intermediate-registry/.*
|
- roles/pull-from-intermediate-registry/.*
|
||||||
- roles/push-to-intermediate-registry/.*
|
- roles/push-to-intermediate-registry/.*
|
||||||
- roles/ensure-docker/.*
|
- roles/ensure-docker/.*
|
||||||
- roles/install-kubernetes/.*
|
- roles/ensure-kubernetes/.*
|
||||||
- roles/build-docker-image/.*
|
- roles/build-docker-image/.*
|
||||||
- roles/run-buildset-registry/.*
|
- roles/run-buildset-registry/.*
|
||||||
- roles/use-buildset-registry/.*
|
- roles/use-buildset-registry/.*
|
||||||
@ -226,34 +226,34 @@
|
|||||||
label: centos-7
|
label: centos-7
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-install-kubernetes-docker
|
name: zuul-jobs-test-ensure-kubernetes-docker
|
||||||
description: |
|
description: |
|
||||||
Test the install-kubernetes role with docker
|
Test the ensure-kubernetes role with docker
|
||||||
|
|
||||||
This job tests changes to the install-kubernetes roles. It
|
This job tests changes to the ensure-kubernetes roles. It
|
||||||
is not meant to be used directly but rather run on changes to
|
is not meant to be used directly but rather run on changes to
|
||||||
roles in the zuul-jobs repo.
|
roles in the zuul-jobs repo.
|
||||||
files:
|
files:
|
||||||
- roles/ensure-docker/.*
|
- roles/ensure-docker/.*
|
||||||
- roles/install-kubernetes/.*
|
- roles/ensure-kubernetes/.*
|
||||||
- test-playbooks/install-kubernetes/.*
|
- test-playbooks/ensure-kubernetes/.*
|
||||||
run: test-playbooks/install-kubernetes/docker.yaml
|
run: test-playbooks/ensure-kubernetes/docker.yaml
|
||||||
post-run: test-playbooks/install-kubernetes/post.yaml
|
post-run: test-playbooks/ensure-kubernetes/post.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-install-kubernetes-crio
|
name: zuul-jobs-test-ensure-kubernetes-crio
|
||||||
description: |
|
description: |
|
||||||
Test the install-kubernetes role with crio-o
|
Test the ensure-kubernetes role with crio-o
|
||||||
|
|
||||||
This job tests changes to the install-kubernetes roles. It
|
This job tests changes to the ensure-kubernetes roles. It
|
||||||
is not meant to be used directly but rather run on changes to
|
is not meant to be used directly but rather run on changes to
|
||||||
roles in the zuul-jobs repo.
|
roles in the zuul-jobs repo.
|
||||||
files:
|
files:
|
||||||
- roles/ensure-docker/.*
|
- roles/ensure-docker/.*
|
||||||
- roles/install-kubernetes/.*
|
- roles/ensure-kubernetes/.*
|
||||||
- test-playbooks/install-kubernetes/.*
|
- test-playbooks/ensure-kubernetes/.*
|
||||||
run: test-playbooks/install-kubernetes/crio.yaml
|
run: test-playbooks/ensure-kubernetes/crio.yaml
|
||||||
post-run: test-playbooks/install-kubernetes/post.yaml
|
post-run: test-playbooks/ensure-kubernetes/post.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-install-podman
|
name: zuul-jobs-test-install-podman
|
||||||
@ -288,8 +288,8 @@
|
|||||||
- zuul-jobs-test-registry-buildset-registry-k8s-docker
|
- zuul-jobs-test-registry-buildset-registry-k8s-docker
|
||||||
- zuul-jobs-test-registry-buildset-registry-k8s-crio
|
- zuul-jobs-test-registry-buildset-registry-k8s-crio
|
||||||
- zuul-jobs-test-registry-buildset-registry-openshift-docker
|
- zuul-jobs-test-registry-buildset-registry-openshift-docker
|
||||||
- zuul-jobs-test-install-kubernetes-docker
|
- zuul-jobs-test-ensure-kubernetes-docker
|
||||||
- zuul-jobs-test-install-kubernetes-crio
|
- zuul-jobs-test-ensure-kubernetes-crio
|
||||||
- zuul-jobs-test-install-podman
|
- zuul-jobs-test-install-podman
|
||||||
gate:
|
gate:
|
||||||
jobs: *id001
|
jobs: *id001
|
||||||
|
Loading…
Reference in New Issue
Block a user