- An active AWS account.
- AWS Command Line Interface (AWS CLI), installed and configured. For more information about this, see Installing, updating, and uninstalling the AWS CLI in the AWS CLI documentation.
- Terraform installed on your local machine. For more information about this, see the Terraform documentation.
- kubectl
- eksctl
- helm
For simplicity, we will not cover basics of best practices when deploying resources via Terraform. Please see check this link for remote state management.
terraform init
terraform plan
terraform apply -auto-approve
export CLUSTER_NAME=eks-argo-rollouts
export AWS_REGION=ap-southeast-1
export ACCOUNT_ID=REPLACE_ME
kubectl apply -f examples/mesh.yaml
kubectl apply -f examples/virtual_gateway.yaml
helm repo add eks https://aws.github.io/eks-charts
helm upgrade -i appmesh-prometheus eks/appmesh-prometheus \
--namespace appmesh-system
Grafana has been installed as part of the Terraform module, so we will need to get the password and import the dashboard.
Get Grafana password:
kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
Launch Grafana UI:
kubectl -n grafana port-forward svc/grafana 3000:80
Login with the below credentials:
Username: admin
Password: Value from previous step
Follow the steps to import sample dashboard
- Import the dashboard provided from monitoring/dashboard.json
- Create Datasource for Appmesh prometheus:
- Click Add data source -> Prometheus
- Set url to: http://appmesh-prometheus.appmesh-system.svc.cluster.local:9090
- Set it to default data source.
- Click save and test.
Login to ECR
aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
Push the stable version of the sample app:
cd app/v1/demo-app
docker build --platform=linux/amd64 -t demo-app .
docker tag demo-app:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v1.0.0
docker push ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v1.0.0
Push the unstable version of the sample app:
cd app/v2/demo-app
docker build --platform=linux/amd64 -t demo-app .
docker tag demo-app:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v2.0.0
docker push ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v2.0.0
Push the fixed version of the sample app:
cd app/v2-fix/demo-app
docker build --platform=linux/amd64 -t demo-app .
docker tag demo-app:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v2.0.1
docker push ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/demo-app:v2.0.1
Create the rollout object
kubectl apply -f examples/blue-green/rollout.yaml
Create the App mesh logical constructs
kubectl apply -f examples/blue-green/meshed_app.yaml
Create the rollout object
kubectl apply -f examples/canary/rollout.yaml
Create the App mesh logical constructs
kubectl apply -f examples/canary/meshed_app.yaml
terraform destroy -auto-approve
This should take up to 10 minutes.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.