-
Notifications
You must be signed in to change notification settings - Fork 82
50 lines (49 loc) · 2.35 KB
/
pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
- pull_request
jobs:
job1:
runs-on: ubuntu-latest
name: Deploy to minikube
steps:
- uses: actions/checkout@v2
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Try the cluster !
run: kubectl get pods -A
- name: Deploy KubePlus to minikube
run: |
export SHELL=/bin/bash
wget https://get.helm.sh/helm-v3.12.1-linux-amd64.tar.gz
gunzip helm-v3.12.1-linux-amd64.tar.gz
tar -xvf helm-v3.12.1-linux-amd64.tar
sudo mv linux-amd64/helm /usr/local/bin/.
export KUBEPLUS_HOME=`pwd`
export PATH=$KUBEPLUS_HOME/plugins:$PATH
echo "PATH:$PATH"
echo "KUBEPLUS_HOME:$KUBEPLUS_HOME"
kubectl kubeplus commands
export KUBEPLUS_NS=default
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
apiserver=`kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'`
echo "API_SERVER_URL:$apiserver"
python3 provider-kubeconfig.py -s $apiserver create $KUBEPLUS_NS
deactivate
helm install kubeplus ./deploy/kubeplus-chart --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
until kubectl get pods -A | grep kubeplus | grep Running; do echo "Waiting for KubePlus to start.."; sleep 1; done
- name: Deploy WordPress application
run: |
kubectl upload chart wordpress-chart-0.0.3.tgz kubeplus-saas-provider.json
kubectl create -f ./examples/multitenancy/application-hosting/wordpress/wordpress-service-composition-localchart.yaml --kubeconfig=kubeplus-saas-provider.json
kubectl get resourcecompositions
kubectl describe resourcecomposition wordpress-service-composition
until kubectl get crds | grep wordpressservices.platformapi.kubeplus; do echo "Waiting for CRD to be registered.."; sleep 1; done
kubectl create -f ./examples/multitenancy/application-hosting/wordpress/tenant1.yaml --kubeconfig=kubeplus-saas-provider.json
kubectl appresources WordpressService wp-tenant1 –k kubeplus-saas-provider.json
kubectl metrics WordpressService wp-tenant1 $KUBEPLUS_NS -k kubeplus-saas-provider.json
#eval $(minikube -p minikube docker-env)
#docker build -f ./Dockerfile -t local/example .
#echo -n "verifying images:"
#docker images