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:
parent
0a6701e090
commit
3ffe68732b
2
Makefile
2
Makefile
@ -47,9 +47,7 @@ uninstall: manifests
|
|||||||
|
|
||||||
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
|
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
|
||||||
deploy: manifests
|
deploy: manifests
|
||||||
cd config/manager && kustomize edit set image controller=${IMG}
|
|
||||||
kustomize build config/default | kubectl apply -f -
|
kustomize build config/default | kubectl apply -f -
|
||||||
|
|
||||||
# Generate manifests e.g. CRD, RBAC etc.
|
# Generate manifests e.g. CRD, RBAC etc.
|
||||||
manifests: controller-gen
|
manifests: controller-gen
|
||||||
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
|
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
|
||||||
|
23
playbooks/deploy-k8s.yaml
Normal file
23
playbooks/deploy-k8s.yaml
Normal 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
11
tools/deployment/deploy-vino.sh
Executable 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
|
@ -8,3 +8,8 @@
|
|||||||
- name: git_mirror_credentials
|
- name: git_mirror_credentials
|
||||||
secret: airship_vino_airshipit_github_secret
|
secret: airship_vino_airshipit_github_secret
|
||||||
pass-to-parent: true
|
pass-to-parent: true
|
||||||
|
- job:
|
||||||
|
name: airship-deploy-vino
|
||||||
|
run: playbooks/deploy-k8s.yaml
|
||||||
|
description: Deploys kubernetes and vino
|
||||||
|
timeout: 9600
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- noop
|
- airship-deploy-vino
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- noop
|
- airship-deploy-vino
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- airship-vino-upload-git-mirror
|
- airship-vino-upload-git-mirror
|
||||||
|
- airship-deploy-vino
|
||||||
|
Loading…
Reference in New Issue
Block a user