Skip to content

ik-vms-dockers/packer-aws-ansible

Repository files navigation

Packer AWS Ansbile

Create AWS AMI with packer

Currently installed tooling

What this project is used for

  • Create AWS AMI on-demand self-hosted AWS EC2 runner forGitHub Actions
  • Create AWS AMI for general purpose


governance


Contents


Prerequisits

brew tap hashicorp/tap
brew install hashicorp/tap/packer
brew install packer
brew install ansible

Commands

Commands

Usage

aws-vault exec $AWS_PROFILE -- packer init aws-ubuntu.pkr.hcl
aws-vault exec $AWS_PROFILE -- packer build aws-ubuntu.pkr.hcl

Vagrant

vagrant provision
vagrant up
vagrant status
vagrant halt packer
vagrant ssh packer
vagrant destroy packer --force

Use cases

Access private resources in your VPC

The action can start the EC2 runner in any subnet of your VPC that you need - public or private. In this way, you can easily access any private resources in your VPC from your GitHub Actions workflow.

For example, you can access your database in the private subnet to run the database migration.

Resources

Create

Create a repository using this template →