Skip to content

Try a simple aws codebuild + packer = baked AMI chock full o goodness

Notifications You must be signed in to change notification settings

brian-provenzano/aws-codebuild-packer-poc

Repository files navigation

AWS Codebuild + Packer = AMI baked with love (POC)

Quick and dirty project for using AWS codebuild/pipeline for CI / build of a custom AMI. Uses a custom docker build image located here:

Ingredients

Note: You can reuse the json referenced above and in this repo as a template, but you will have to adjust for your aws acct and environment. Use in conjunciton with the following aws cli commands:

CodeBuild

Example of get and update via AWS CLI:

  • aws codebuild update-project --name name_of_your_codebuildprj --profile yourprofile - retrieves codebuild proj as json which you can edit and feed back into the following command.
  • aws codebuild update-project --environment your_jsonsnippet_edited --profile yourprofile - Here we are changing the 'environment'. See example in this Makefile which automates this during docker image creation

Pipeline

Example of get and update via AWS CLI:

  • aws codepipeline get-pipeline --name name_of_your_pipeline --profile yourprofile - retrieves pipeline as json which you can edit and feed back into the following command
  • aws codepipeline update-pipeline --pipeline your_json_edited --profile yourprofile

More examples here in AWS CLI documentation:

Extended Note

This is mainly a re-creation of my jenkins-pipeline-immut project using aws codebuild/pipeline. Learning tool POC mostly. The AWS codebuild/pipeline was created manually in the AWS console. Although currently without IaC provisioning that the jenkins repo contains (using terrafrom) which is a TODO for this project/repo.

TODO

  • Cloudformation or Terraform to:
    • create the codebuild, pipeline itself
    • create infra envs for deployment
  • add deployment (CD) steps for an application
  • automate, automate, automate....

Thanks

Hashicorp AWS

About

Try a simple aws codebuild + packer = baked AMI chock full o goodness

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages