Skip to content

Github Actions

Github Actions #8

Workflow file for this run

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 and application 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 "https://github.com/cloud-ark/operatorcharts/blob/master/kubeplus-chart-3.0.39.tgz?raw=true" --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
kubectl upload chart ./examples/multitenancy/application-hosting/wordpress/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
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 get resourcecompositions
kubectl describe resourcecomposition wordpress-service-composition
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