- single stage build Docker image
- go to directory
go-simple-single-stage-build - try to run
docker build -t go-simple-single-stage:latest . - check image size
docker images go-simple-single-stage - try to run container
docker run go-simple-single-stage
- go to directory
- multi stage build Docker image
- go to directory
go-simple-multi-stage-build - try to run
docker build -t go-simple-multi-stage:latest . - check image size
docker images go-simple-multi-stage - try to run container
docker run go-simple-multi-stage
- go to directory
- go to directory
devops-go-example - explore application
- to run test
docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from it_tests - to tear down
docker-compose -f docker-compose.test.yml down
- use AWS AMI from Bitnami
- make sure to assign public IPv4
- get password by
sudo cat /home/bitnami/bitnami_credentials - login to web console via EC2 public IPv4
- go to
terraform-iac - do
brew install awscli - run
aws configure - run
terraform plan - run
terraform apply - let explore AWS Web Console
- go to cloud https://www.terraform.io
- go to AWS Web Console >
Security credentials - config secret
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYas sensitive environment variable - do provisioning
- Install Kubectl command (
brew install kubectl) - Install AWS CLI
- run
aws configure, if not setting yet. - run
aws eks update-kubeconfig --region ap-southeast-1 --name eks-devops-cluster - try with
kubectl get node
- make sure Kubernetes Cluster is ready to use.
- run
kubectl create namespace argocd - run
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - forward port
kubectl port-forward svc/argocd-server -n argocd 8080:443 - get password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
devops-go-example- check
.github/cicd.yml - add remote repository
- push
- Config Github Action Secret
PAT(Personel Access Token) and make sureSONAR_TOKENandSONAR_HOST_URLwas config. devops-go-example- check
.github/cicd.yml - uncomment CD block
- add remote repository
- push