This is a demo deployment that showcases the following
- terraform deploy required resources to azure
- docker build and push a demo app (a simple game written with gdscript in godot) pushes to azure container registry deployed on step 1
- deploy manifest via argocd instance in cluster
- collect logs and metrics using loki, prometheus and grapana
Link | username | password |
---|---|---|
game | ||
argocd | admin | *** |
grafana | admin | *** |
note that argocd and grafana uses its generated credentials this will be a short lived deploy for demonstration purposes.
/
|-> iac
| |-> azure # main terraform code to manage the infrastructure
|
|-> manifests
| |-> argocd-project.yaml # argocd repo setup
| |-> folder/application.yaml # argocd application
| |-> folder/base # kubernetes manifests to be deployed via argocd
|
|-> src/folder # source code and docker files
|
|-> ci.sh # bash script that contains all the ci instructions, this can also be ran locally
Ci is handled by a single bash script called ci.sh in the root of the repo
this scripts executes the following in this order
- checks that dependencies is installed
- log into azure
- check terraform code for issues
- deploy infrastructure via terraform
- docker build and push apps in this case the game
- setup argocd repo using kubectl
- deploy argocd apps using kubectl
Cd is handled by Argocd, it checks the manifests directory for changes on the main branch and deploys to same cluster its hosted in
simple ultimate knots and crosses game built using the Godot frame work and exported to web (wasm)
see for details about the rules https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe
SSO to Azure AD Create helm charts for apps so that Argocd can template them
Install basic tempting tool like gomplate on argocd to replace values in manifests based on env vars or
Install external secrets (can pull in secrets from a keyvault) (skipped to save some costs)
Enable Workload identities (allows pods and other k8s resources to access azure resources based on role assistants)
Add Alets and triggers based on log and metrics events
Potentials swap out Loki-stack for pure azure container insights and azure log analytics
Split single file into workflow with dependant steps
Add Static code analysts, unit tests before build
Add web test after deploy to verify services are running correctly