Dev, stage and production environments with canary deployment.
- Golang
- Backend: ./app
- frontend: ./app -frontend=true -backend-service=http://backend:8080 -port=8085
- Jenkinsfile
- Kubernetes deployments
Setting kubernetes, helm and jenkins ... more details
We will test using minikube
minikube start
-
Install CI: Jenknis
make jenkins-install
User: admin Password:
printf $(kubectl get secret --namespace ci j-v1-jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo
-
Create Job (future work: Initialize job by groove) Configure a multibranch pipeline
-
Install kubernetes files
$ kubectl create namespace production
$ kubectl create namespace stage
$ kubectl --namespace=production apply -f k8s/production
$ kubectl --namespace=production apply -f k8s/canary
$ kubectl --namespace=production apply -f k8s/services
- Run locally
make backend-local
make frontend-local
kubectl --namespace=production autoscale deployment app-frontend-production --min=1 --max=5 --cpu-percent=80
deployment.apps "app-frontend-production" autoscaled
kubectl --namespace=production get hpa