- single stage build Docker image
- go to directory
java-simple-single-stage-build
- try to run
docker build -t java-simple-single-stage:latest .
- check image size
docker images java-simple-single-stage
- try to run container
docker run java-simple-single-stage
- go to directory
- multi stage build Docker image
- go to directory
java-simple-multi-stage-build
- try to run
docker build -f Dockerfile.multi -t java-simple-multi-stage:latest .
- check image size
docker images java-simple-multi-stage
- try to run container
docker run java-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_test
- 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 get token to config
TF_API_TOKEN
environment on Github Action. - go to AWS Web Console >
Security credentials
- config secret
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
as 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-javaa-example
- check
.github/cicd.yml
- add remote repository
- push
- Config Github Action Secret
PAT
(Personel Access Token) and make sureSONAR_TOKEN
andSONAR_HOST_URL
was config. devops-java-example
- check
.github/cicd.yml
- uncomment CD block
- add remote repository
- push