Enable CI for Vino

* Install Dependency packages like docker,make,wget,debconf and snapd
   * Deploy Kubernetes and Vino
   * Setup roles for Docker and for firewall

Change-Id: I6734cd86b0560438c5b9caacf2567b0c595558e1
This commit is contained in:
diwrajchitoor 2020-12-11 21:52:40 +00:00 committed by diwakar thyagaraj
parent 0a6701e090
commit 3ffe68732b
5 changed files with 42 additions and 4 deletions

View File

@ -47,9 +47,7 @@ uninstall: manifests
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
deploy: manifests
cd config/manager && kustomize edit set image controller=${IMG}
kustomize build config/default | kubectl apply -f -
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases

23
playbooks/deploy-k8s.yaml Normal file
View File

@ -0,0 +1,23 @@
- hosts: ubuntu-bionic
tasks:
- name: Run ensure-docker
include_role:
name: ensure-docker
- name: Install Dependent Packages
apt:
pkg:
- docker
- debconf
- make
- wget
- snapd
become: yes
- name: Set up requirements for kubernetes
include_role:
name: clear-firewall
- name: Install kubernetes and Deploy Vino
shell: |
set -xe;
./tools/deployment/deploy-vino.sh
args:
chdir: "{{ zuul.project.src_dir }}"

11
tools/deployment/deploy-vino.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -xe
curl -s -L https://opendev.org/airship/charts/raw/branch/master/tools/gate/deploy-k8s.sh | bash
sudo snap install kustomize && sudo snap install go --classic
#Wait for all pods to be ready before starting Vino Image build.
kubectl wait --for=condition=Ready pods --all -A --timeout=180s
make docker-build
kustomize build config/default | kubectl apply -f -
kubectl get po -A
#Wait for vino controller manager Pod.
kubectl wait -n vino-system pod -l control-plane=controller-manager --for=condition=ready --timeout=240s

View File

@ -8,3 +8,8 @@
- name: git_mirror_credentials
secret: airship_vino_airshipit_github_secret
pass-to-parent: true
- job:
name: airship-deploy-vino
run: playbooks/deploy-k8s.yaml
description: Deploys kubernetes and vino
timeout: 9600

View File

@ -1,10 +1,11 @@
- project:
check:
jobs:
- noop
- airship-deploy-vino
gate:
jobs:
- noop
- airship-deploy-vino
post:
jobs:
- airship-vino-upload-git-mirror
- airship-deploy-vino