简体   繁体   中英

Review application setup in AWS

I am looking for pointers in the right direction with AWS. Previously I have worked with Heroku, which allows users to create review applications of each pull request you create in Github. This has been a wonderful feature as it allows you to create separate environments (Database, Compute Instance / Lambda, URL) to preview the changes. You can ask users to test the feature they've requested via an unique URL such as https://my-test-app-123.domain.com

I am looking for a similar solution using AWS. I am wondering if there is already such a service I am not aware of. I have taken a look at Elastic Beanstalk but I am unsure how to configure it to be aware of all the pull requests I have made in Github.

The ideal setup would be:

Three environments: Review apps (based on branches), QA (based on master branch), Production (based on manual promotion from QA).
- For each pull request, create unique instances of: S3, DynamoDB, Lambda, API Gateway (for unique URL). Run tests against this PR environment. Environment variables for review applications should be copied from QA apart from those pointing to newly created support services such as S3, DynamoDB.
- Whenever there is a commit to master branch, have QA environment update itself to match whatever is in master branch.
- Have a possibility to trigger promotion from QA to Production manually.

Which service(s) should I be looking at? CloudFormation sounds like the right bet but it is very complicated I am not sure where to start.

I will not have answers for all your requirements, but if you ask about a start, I think the following could be worth considering.

  1. Have a CodePipeline with a source action set to GitHub.

  2. CodePipeline can deploy resources by means of CloudFormation. This would produce unique set of the resources you need. There are limits on their number, so can't create hundrets for them for each commit.

  3. CodePipepline also supports Lambda invocation actions and manual approvals, for example to deploy to production. For most complex cases you can design your own custom actions with tailored made job workers for the CodePipeline.

CloudFormation is not perfect by worth spending time learning it.

Hope that this helps you get started. If you want to create different set of resources for each PR/commit, then I would suggest starting with writing a CloudFormation template to deploy a single set of resources you require. Then parametrize it so that you can make multiple sets of resources from the same template. When parametrized, can think of how to plug it into CodePipeline to create the resources based on your GitHub changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM