the system AMIs
Everything is configured, we can now prepare the first steps of our infrastructure
The mission is to create our base Debian system AMIs with Packer.
We are going to create 2 AMIs:
- one “sealed”: this AMI will be ready-to-deploy and only the ansible user will be accessible for provisioning
- one “unsealed”: this AMI should not be startd, it will serve as a basis for the other AMIs we will create
In both cases, basic services and customisations will be made by the Ansible playbooks of the system project.
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!