Giter VIP home page Giter VIP logo

amazon-eks-argo-rollouts's Introduction

Progressive Delivery in Amazon EKS using Argo Rollouts

Prerequisites

  • 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

Setup

Create EKS Cluster and its dependencies (VPC etc)

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

Set your local environment variables

export CLUSTER_NAME=eks-argo-rollouts
export AWS_REGION=ap-southeast-1
export ACCOUNT_ID=REPLACE_ME

Create the App Mesh and namespace

kubectl apply -f examples/mesh.yaml

Create the virtual gateway expose the API endpoint outside the cluster

kubectl apply -f examples/virtual_gateway.yaml

Install Appmesh Prometheus

helm repo add eks https://aws.github.io/eks-charts

helm upgrade -i appmesh-prometheus eks/appmesh-prometheus \
--namespace appmesh-system

Setup Grafana

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

Build Docker image and push to ECR

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

Blue/Green Deployment

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

Canary Deployment

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

Clean up

terraform destroy -auto-approve

This should take up to 10 minutes.


Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

amazon-eks-argo-rollouts's People

Contributors

amazon-auto avatar bmutziu avatar farhanangullia avatar zeagord avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.