the system AMIs

Everything is configured, we can now prepare the first steps of our infrastructure

1. Goals

The mission is to create our base Debian system AMIs with Packer.

We are going to create 2 AMIs:

In both cases, basic services and customisations will be made by the Ansible playbooks of the system project.

2. Packer

To create the AMIs, you will need to replace the following Packer command-line parameters:

  • my_ami_region: this is where Packer will work
  • my_ami_regions: this is where Packer will copy all its AMIs

You have to put the regions you have chosen in the previous page.

[workstation] (ansible_virtualenv) ~/demo_big_infra
$ cd system
$ packer build -var "my_ami_seal_type=sealed" -var "my_ami_region=eu-west-3" -var "my_ami_regions=eu-west-3,eu-west-1" AWS.packer
$ packer build -var "my_ami_seal_type=unsealed" -var "my_ami_region=eu-west-3" -var "my_ami_regions=eu-west-3,eu-west-1" AWS.packer
$ cd ..

This could take at least 15 minutes for each host, so first coffee break!

3. Next page!

We are done, let’s create our bastion host!