7 ms·
AWS Publishes Reference Architecture, Implementations for Deployment Pipelines
- xenophonf 4y agoIt's nice to see something like this. I maintain a reference implementation of some open-source software on AWS, but that was pieced together over the years from other people's work, now deleted blog posts (God bless the Internet Archive), and unmaintained sample code on GitHub. Hopefully, a fully worked example like this will fill in a lot of the blanks in my understanding, like how to best implement blue/green deployments (the CodeDeploy hook for CloudFormation has a lot of weird limitations), unit test automation, and monitoring. Edit: It's blog spam, sadly. Here are direct links to the actual blog posts and tools. https://aws.amazon.com/blogs/aws/new_deployment_pipelines_reference_architecture_and_-reference_implementations/ https://aws.amazon.com/blogs/aws/new_deployment_pipelines_re... https://pipelines.devops.aws.dev/ https://pipelines.devops.aws.dev/ https://github.com/aws-samples/aws-deployment-pipeline-reference-architecture/blob/main/examples/cdk-application-pipeline/README.md https://github.com/aws-samples/aws-deployment-pipeline-refer... https://aws.amazon.com/builders-library/automating-safe-hands-off-deployments/ https://aws.amazon.com/builders-library/automating-safe-hand...
- voytec 4y agoAWS blog post: https://aws.amazon.com/blogs/aws/new_deployment_pipelines_reference_architecture_and_-reference_implementations/ https://aws.amazon.com/blogs/aws/new_deployment_pipelines_re...
- ldjkfkdsjnv 4y agoThis looks similar to the internal pipelines framework that all of amazon uses to deploy code. Funny to see truly how much value amazon has gotten out of developing frameworks for the retail business, and then making those frameworks available publicly. The abstractions work because they have already been vetted across amazon for a decade
- faizshah 4y agoI think the last missing piece is getting reproducible builds which I think you can get from buildpacks [0], NixOS [1], or Bazel [2] running in your CodeBuild. [0]: https://buildpacks.io/docs/features/reproducibility/ https://buildpacks.io/docs/features/reproducibility/ [1]: https://nixos.org/ https://nixos.org/ [2]: https://testdriven.io/blog/bazel-builds/ https://testdriven.io/blog/bazel-builds/
- ldjkfkdsjnv 4y agoFor all its complexity, brazil is amazing
- fcarraldo 4y agoIt’s Terry Gilliam’s best work.
- lkschubert8 4y agoWhat am I missing that makes you feel that way about Brazil?
- faizshah 4y agoThere’s no equivalent OSS implementation of a multi language lock file like Brazil’s. You have to build your own or go with a monorepo tool like bazel. Amazonians take reproducibility for granted because of Brazil.
- slowmovintarget 4y agoYou're talking "Bazel" right? No "r" pronounced like the herb "basil." Or is there some other framework named "Brazil?" Autocorrect gone viral?
- jcparkyn 4y agoBrazil is an internal tool used at Amazon.
- faizshah 4y agoI also found this post on Cell based architectures this morning, I didn’t know this was public: https://aws.amazon.com/solutions/guidance/cell-based-architecture-on-aws/ https://aws.amazon.com/solutions/guidance/cell-based-archite... And a talk on what a cell based architecture is here: https://youtube.com/watch?v=HUwz8uko7HY https://youtube.com/watch?v=HUwz8uko7HY Cells are basically subsets or shards of customer resources with infrastructure isolated from other cells. The reference deployment pipeline in the blog post [0] would deploy to each cell individually in different waves depending on how your team configures the waves ultimately limiting the blast radius of a deployment to a smaller subset of customers. [0]: https://aws.amazon.com/blogs/aws/new_deployment_pipelines_reference_architecture_and_-reference_implementations/ https://aws.amazon.com/blogs/aws/new_deployment_pipelines_re...
- Spivak 4y agoMy only nit with their build stages is I don’t see them mentioning that the pipeline stages they outline are logical. When it comes to how the real pipeline actually runs you should ignore the stages and just specify the minimal dependency graph and let everything that can be run in parallel run. This usually means produce your build artifact first and then run everything immediately after. If you’re feeling fancy you can have the steps remember the logical stage they’re in and bail out of later stages on failure.
- jvanderbot 4y agoNot necessarily. You could do staged deployment or a release train built around beta vs gamma testing before prod.
- nimbius 4y agoI've always seen AWS as a rather expensive answer to the build. Any other vps provider or even dedicated Colo is likely much cheaper and less locked-in than the amazon ecosystem. That having been said, the "reference architecture" being offered just feels like a slow day in the AWS marketing department during a recession. Nothing really special about it unless I've completely missed something?
- deleted 4y ago[deleted]
- jiggawatts 4y agoI don't see why you're being voted down. At $dayjob, AWS consultants regularly "assist" with architectures where the final solution is invariably draped across every one of the AWS proprietary offerings. Whether on purpose or not, the result is that customers are locked in and the budgets are often a "surprise!".
- borissk 4y agoIn my experience when negotiating any discounts the Amazon sales guys are very aware exactly how locked in the customer is. If they use a ton of proprietary AWS features Amazon may offer 5% discount, on the other hand if the customer uses Kubernetes and other stuff that is easy to move to another cloud they may offer 50% off.
- jamesfinlayson 4y agoYep, I've seen this at a previous job too - a 30 person team just dealing with the AWS knot.
- brodouevencode 4y agoBecause it's easier to downvote than it is to write a thoughtful disagreement.
- not_kurt_godel 4y agoI'm just curious, have you actually built and operated a feature-equivalent build/deploy system on VPSes? If so, color me impressed, I'd love to see some source code or other artifacts if you're willing to share.
- Dowwie 4y agoHow much of this is really meant for AWS sized problems?
- twblalock 4y agoIf you deploy to multiple regions or datacenters it doesn't matter how big you are -- you should orchestrate deployments so you don't deploy to all of them at the same time. If something breaks, you'd rather break a subset of regions than all of them. You should also deploy new code to some kind of non-production environment before going to prod. Even companies with the best possible canarying in prod will still do that. Some of the technology involved is definitely AWS-scale, but the principles of software rollout are broadly applicable.
- faizshah 4y agoEven small companies deploy to staging environments before production. Your deployment pipeline most likely looks like: - Build your language artifacts - Build a container - Deploy that container somewhere - Run approvals like integ tests, unit tests etc. and monitor metrics to decide whether to deploy to your next environment or rollback. This is just a structured way of building these CD pipelines you could also use Jenkins or Google started building something called Skaffold for Google Cloud Deploy: https://skaffold.dev/docs/ https://skaffold.dev/docs/ As your company gets larger you'll want to limit the blast radius of new changes so that you can meet your SLAs and you'll want to use multiple AZs and cloud regions for HA. That's where the idea of waves and cells comes from.
- birdymcbird 4y agothats true. even if not amazon scale.. lets say you building multi tenant SaaS product. cell-architecture provide strong tenant isolation avoid noisy neighbor problem. other benefits like deploy changes to one cell so tenant may request delaying upgrade if they need to do pre-req work before hand. for ordinary service use case or web site.. most probability do not need this. over engineering infrastructure when should focus on customer and problem domain..thing that increase top or bottom line. source: principal SDE who launched several services at amazon using cell architecture.
- 4y ago
- bobnamob 4y agoNot mentioned in the article but I’d recommend an end to end test pipeline as well. Deploy your tests like they’re your customers, independent and “adversarial”. Also, one-box/one-cell deployment stage before your production stage. Beta/gamma are well and good, but they’ll never perfectly replicate an actual prod deployment
- ris 4y agoHope you like CloudFormation
- klysm 4y agoSeems pretty easy to substitute that out with whatever IaC tool you want
- justin_oaks 4y agoI tried to like it, but when it'd get stuck for a long time at a step with no good way to get information or control what was going on... I moved on to Terraform and have been relatively happy ever since.
- makestuff 4y agoCDK largely fixed the issues I had with cloud formation. Obviously that locks you into AWS even more so I get why people go for terraform.
- rswail 4y agoCDK-tf fixes that. CDK is basically a make for makefiles using imperative code. So you can just as easily target terraform with it.
- brodouevencode 4y agoCDK is problematic in that it's just a layer over an already highly abstracted transpiler.
- hourago 4y agoIt is quite weird that "Build" and "Unit Test" are part of the Deployment Pipeline. For me the Deployment Pipeline starts with the Acceptance Tests that ensures business quality running over already created artifacts. There are advantages to this approach, as different deployment pipelines may be required to deploy to different platforms even if all artifacts are generated by one build pipeline. AWS seems to mix the concepts of Build Pipeline with Deployment Pipeline. Deployment has had historically a meaning in software development, I do not understand why to change it now.
- deleted 4y ago[deleted]
- borissk 4y ago>> AWS seems to mix the concepts of Build Pipeline with Deployment Pipeline. >> Deployment has had historically a meaning in software development, I do not understand why to change it now. Maybe because traditionally software shops would run a build server on premise, and a deployment on AWS. Now Amazon want's to move the build process on AWS as well - making them a little bit of extra money.
- klysm 4y agoIs that still a common practice? I figured most companies are running builds in their existing pipelines infrastructure which in my experience is usually GitHub/Travis/GitLab/Azure DevOps/CircleCI/etc.. and then moving it up into AWS
- jrvarela56 4y agoWhat level of usage warrants these kinds of setups? Say, beyond a workflow that runs CI on PR/master off of Github (Actions or CircleCI etc) and deploys to something like Heroku or Vercel. Do companies run apps that get 1k rps on stuff like cell-based-architechture (mentioned in top comment)?
- goostavos 4y agoKinesis? Services operating at massive, hard-to understand scales? FWIW, I work at Amazon, and a lot of things are still solved with "Boring" tech that's not "web scale". Even without our own ranks we've got to remind people that engineering is about fitting the architecture to the requirements and no more. It seems to be lost knowledge these days that an RDBMS gets you really, really far. The vast majority of apps -- even those that appear superficially "large" -- will never see usage patterns that justify anything more than a box and a database. You'd be surprised which systems are just humming along unceremoniously with a humble 3-tier architecture
- bradknowles 4y agoSo, as you scale up and out in size, you stop being able to depend on higher level abstractions from elsewhere. You can't build a Tier-1 service like S3 or EBS on top of RDS. If you need a database solution to help you with building and running tools of that scale, it has to be something else that is a lot less complex and a lot more robust. It's okay for RDS to be dependent on a Tier-1 service like S3 or EBS, but not the reverse. You don't want to get into priority inversion problems here. And when your service has to be in every AZ in every region, and they all have to be kept separately running, then things get even more complex. Then you have to ask yourself what is the bootstrap process for building a new region.
- sandGorgon 4y agovery interestingly, Vercel [1] (which uses AWS for its deployment pipeline), does not use Codepipeline, Codebuild, etc. It uses Fargate for build performance reasons [2] [1] https://vercel.com/blog/behind-the-scenes-of-vercels-infrastructure https://vercel.com/blog/behind-the-scenes-of-vercels-infrast... [2] https://twitter.com/cramforce/status/1619082343259705344 https://twitter.com/cramforce/status/1619082343259705344