Bamboo plan for AWS build part 1


We use both Bamboo and AWS. Making those two work together is really a amazing thing for DevOps. In this blog, I am going to talk about my favorite bamboo plan that supports quick build, hot code deployment and blue/green deployment.

We name such Bamboo plan as AWS pipeline, as it is only used for AWS stack build, code deployment. And it require a bunch of AWS services: Cloudformation, EC2 ( ELB, Autoscaling group, SSM agent), S3, DynamoDB, Router 53.

Let’s start with two terms: Stack and Version. Stack means the infrastructure, from EC2 instance, ELB, autoscaling group to the binaries (kernel and applications). Version is the release number. Both stack and code have versions. You should see one benefit already – binaries and codes are decoupled.

Like other Bamboo plans, AWS pipeline includes build and deployment two sub plans

Build plan is for checking out and building the codes, optionally you can bake a new AMI if you want to create a new stack later in the deployment plan.

pipeline_build

Deployment is for building a new stack, deploying code to stack, updating floating dns (for blue/green deployment), deleting the old stack and promoting release.

Selection_187

With above in mind, now we can have a look at the high level design.

aws_pipeline

  1. The baked AMI is used for creating the new stack.
  2. The new stack get the code release number from the dynamodb.
  3. Download the code from S3 bucket.
  4. (Optional) Update floating dns to point to the new stack.

In the next post, I will explain more about the build plan. Especially, how to quickly bake a AMI.

Advertisement

One thought on “Bamboo plan for AWS build part 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s