Auto Deploy to ECS (via Auto DevOps)
### Problem to solve <!-- What problem do we solve? --> After we deliver https://gitlab.com/gitlab-org/gitlab/issues/207962, it would make it easier for us to apply this template for users deploying to AWS. ### Intended users <!-- Who will use this feature? If known, include any of the following: types of users (e.g. Developer), personas, or specific company roles (e.g. Release Manager). It's okay to write "Unknown" and fill this field in later. * [Rachel (Release Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#rachel-release-manager) * [Parker (Product Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#parker-product-manager) * [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead) * [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer) * [Presley (Product Designer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#presley-product-designer) * [Devon (DevOps Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#devon-devops-engineer) * [Sidney (Systems Administrator)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sidney-systems-administrator) * [Sam (Security Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sam-security-analyst) * [Dana (Data Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#dana-data-analyst) Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ --> Users deploying to AWS ECS ### Further details <!-- Include use cases, benefits, and/or goals (contributes to our vision?) --> 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 <!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey --> If a user has defined the following CI/CD variables * AWS_ACCESS_KEY_ID * AWS_ACCOUNT_ID * AWS_REGION then the [autoDeploy template](https://gitlab.com/gitlab-org/gitlab/issues/207962) 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 <!-- What permissions are required to perform the described actions? Are they consistent with the existing permissions as documented for users, groups, and projects as appropriate? Is the proposed behavior consistent between the UI, API, and other access methods (e.g. email replies)?--> ### Documentation <!-- See the Feature Change Documentation Workflow https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html Add all known Documentation Requirements here, per https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#documentation-requirements If this feature requires changing permissions, this document https://docs.gitlab.com/ee/user/permissions.html must be updated accordingly. --> ### Availability & Testing <!-- This section needs to be retained and filled in during the workflow planning breakdown phase of this feature proposal, if not earlier. What risks does this change pose to our availability? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? Please list the test areas (unit, integration and end-to-end) that needs to be added or updated to ensure that this feature will work as intended. Please use the list below as guidance. * Unit test changes * Integration test changes * End-to-end test change See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance: https://about.gitlab.com/handbook/engineering/quality/test-engineering/#test-planning --> ### What does success look like, and how can we measure that? <!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. --> ### What is the type of buyer? <!-- Which leads to: in which enterprise tier should this feature go? See https://about.gitlab.com/handbook/product/pricing/#four-tiers --> ### Links / references
issue