Blue-green deployments with Terraform

Thursday, 24 December 2020, 13:29

Blue-green deployments are not always easy, but cloud environments and tools that manage them make it much easier. One of the leading tools in the DevOps world designed to help you manage your resources in infrastructure-as-code manner is Terraform. This tool is just brilliant and at the same time easy to use. Still, when working exclusively with AWS cloud, I use CloudFormation considering it to be just better choice (for various reasons), and when it comes to serverless architecture I hardly can find anything simpler. But yes, this time I will use Terraform and the solution, even though using AWS resources for exemplar cases, should be portable to any infrastructure provider you would like to use. In most guides and articles on the web, which I've found infrastructure code was used to orchestrate entire landscape as one codebase - meaning you would need to modify your code reflect current stage of deployment process. This however doesn't play well with another aspect of dev-ops, which is automation usually done via CI/CD pipeline. I tried to describe blue-green deployment more like a process that allows you to decouple each step and place it within your pipeline.

Tags: , , ,

» Komentarze

Variables namespaces in CodePipeline for multi-stage deployment pipelines

Thursday, 16 July 2020, 22:26

In November 2019 AWS CodePipeline introduced variables namespaces to allow passing outcomes of one pipeline action into another. Previously passing values between stages was very tricky and required involving of additional services (eg. S3 or DynamoDB). Things worked however little different if you were provisioning your pipeline with CloudFormation - since your pipeline definition was wrapped in a template you had a chance to inject deployment-time values into it via templating functions. To make things even more usable, but also complex, if you were defining CloudFormation step in CodePipeline you had an option to use Fn::GetParam function (which you couldn't use anywhere else, it was it's sole purpose). Now, with variables namespaces in CodePipeline and support for this feature in CloudFormation building more dynamic pipelines that manage your AWS resources in infrastructure-as-a-code approach and vice-versa became much simpler and robust!

Tags: , , , , ,

» Komentarze

Bootstrapping AWS account with CloudFormation and CodePipeline

Saturday, 09 June 2018, 08:45

Yes, I love CloudFormation when working with AWS. With all of it's limitations and quirks, it's a really simple and extensible tool, that allows you fully manage your resources in an automated Infrastructure-as-a-code approach. If you create a project from scratch you probably want to automate as much as possible - if you decide on CloudFormation you probably want to figure out how to provision as much as possible from your AWS cloud with it? The thing is: you can manage everything - by using just a single command it's possible to bootstrap your account in a fully automated manner.

Tags: , , , ,

» Komentarze

Continuous Delivery with CodePipeline, CodeBuild and Maven

Saturday, 02 December 2017, 21:47

Neue Arbeit, neue Stadt, neue Blog Post. My adventure in HRS has finished. Time for the next step, but next step starts next Monday, so I have some time to spend with family and update my blog a little. As recently I was mainly involved into managing infrastructure of various projects on AWS and picked CloudFormation as a tool to manage all of the resources, I discovered a lot of quirks, sometimes undocumented behaviors, but mostly just built simple stuff from simple pieces that are working great with a minimum effort. Want to share some of my knowledge here, especially that AWS documentation is usually very fragmented, unclear or missing; which doesn't change the fact, that still - it provides all you need to build the stuff you want, managing most of them for you.

Tags: , , , , , , ,

» Komentarze