- Build the containers. Example:
docker build -t tomerplayground.azurecr.io/webstore:latest .
- Provision Azure Container Registry & Azure Storage
- Setup ACR in the K8S cluster
kubectl create secret docker-registry acr-auth --docker-server <acr-login-server> --docker-username <service-principal-ID> --docker-password <service-principal-password> --docker-email <email-address>
- Push the containers into ACR
- Get Azure storage connection string
- Insert the connection string in secret.yaml
to prepare secret, we need to encode it to Base64
echo -n "admin" | base64 ` or use `https://www.base64encode.org/
- Edit the relevant YAML files and deploy the micro-services application in K8S.
kubectl create -f . --save-config
- Update printer.cs Line 61 with a new version.
- Build and push the container
docker build -t tomerplayground.azurecr.io/printingservice:latest .
docker push tomerplayground.azurecr.io/printingservice:latest
- Apply the printing.yaml file.
kubectl apply -f printing.yaml
Remove the previous webstore deployment
kubectl delete deployment webstore-deployment
- Create Helm chart for Webstore. Example
helm create stickerstore
- Install Stickerstore chart
helm upgrade --install stickerstore ./stickerstore
- Change a value like replicaCount and upgrade
helm upgrade --install stickerstore ./stickerstore
--set replicaCount=3
- Install Brigade
helm repo add brigade https://azure.github.io/brigade
helm install -n brigade brigade/brigade
- Create a Github token Here
- Create a Github webhook and connect it with brigade. Instructions
- Edit values.yaml and install the brigade project
helm install brigade/brigade-project -n stickerstore-project -f values.yaml
- Commit an edit to
index.html
in Webstore and watch Brigade
kubectl get pods
kubectl logs <pod-name>
Follow the Jenkins readme file instructions