Skip to content

Auto Deploy to ECS (via Auto DevOps)

Problem to solve

After we deliver #207962 (closed), it would make it easier for us to apply this template for users deploying to AWS.

Intended users

Users deploying to AWS ECS

Further details

Our options are as follows:

  • adding this logic into the existing auto deploy template (which will become very long)
  • Creating a new Auto Deploy to ECS template that will be called from https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml as an include
  • Refactoring the Auto Deploy template - to cut it into a new template called auto deploy to Kubernetes and create an auto deploy to ECS and have both of those called from the auto deploy template with an include (similar to the way Auto-DevOps.gitlab-ci.yml works)

In the future there will also be auto_Deploy to more cloud vendors, so the preferred choice would be to create individual templates that wiykd be called by include from the AutoDeploy template (also avoiding renaming it)

Proposal

If a user has defined the following CI/CD variables

  • AWS_ACCESS_KEY_ID
  • AWS_ACCOUNT_ID
  • AWS_REGION

then the autoDeploy template will be initiated from autoDevOps

In the existing AutoDeploy template there is kubernetes: active we would need to except: kubernetes

Use cases:

  • We need to make sure that if the user is using Kubernetes - the regular auto DevOps template is initiated.
  • If a user is not using Kubernetes, and is deploying to AWS, this new auto-deploy-to-ECS is initiated
  • If a user is not using Kubernetes and not using AWS, both templates are skipped
  • If a user is using Kubernetes and deploying to AWS - Only run the deploy Kubernetes template

This may involve a new behind the scenes type for variables called AWS (we will probably also have in the future GCP, Azure and maybe others)

Note: We may need to change the existing auto DevOps template (for K8s) and make it into Auto_Deploy_Kubernetes. yml that will be called by an include from the auto Deploy yml

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by Orit Golowinski