Skip to content

An example repository to build and deploy EC2 images using Packer & Terraform

License

Notifications You must be signed in to change notification settings

syntaqx/packer-workflow

Repository files navigation

Packer Deployment Example

This project demonstrates a very simple build and release system that leverages Packer to build immutable artifacts that can easily be deployed on EC2.

Packer

Packer is used to execute the .classic/bootstrap.sh script, which allows full customization of the runtime for a given application. This can be generic and install all packages itself, start Docker, whatever is necessary.

A more complex project likely would want to include a File provisioner to add source code for the runtime, or potentially even start a Docker container so that the operational runtime and app runtimes are separate.

Deployment

Deployment is very simple: Once an AMI is available, Terraform updates the aws_launch_template and applies that update to an aws_autoscaling_group. The Terraform code here is just an example of what an implementation looks like, and likely isn't fully functional, but it's a good marker for what the project should be doing. Additional work around things like VPC, subnets, and target groups is necessary and are codified with placeholder values.

About

An example repository to build and deploy EC2 images using Packer & Terraform

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published