Understanding Packer
Constructs
- FileFormat: JSON
- Builders: Provider/Platform where you want to create image
Points to remember
- Credentials in some way should be provided to packer
- Every builder has a unique type
Basic Packer File
{
"builders": [
{
"type": "name of builder supported by packer"
}
]
}
Building AWS Image. Refer Builder documentation here
{
"builders": [
{
"type": "amazon-ebs"
}
]
}
Find Required Fields in the configuration section
{
"builders": [
{
"type": "amazon-ebs",
"access_key": "",
"ami_name": "",
"instance_type": "",
"region": "",
"secret_key": "",
"source_ami": "",
}
]
}
What is Secret Key and Access Key (Amazon)
- Programmatic Credentials to login into AWS
- Steps to create refer here