Differences
This shows you the differences between two versions of the page.
linux_wiki:ec2_create_ami_templates [2018/03/23 15:19] billdozor [Create Image] |
linux_wiki:ec2_create_ami_templates [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== EC2: Create AMI Templates ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Custom Amazon Machine Images (VM Templates). | ||
- | |||
- | **Checklist** | ||
- | * AWS Account | ||
- | |||
- | ---- | ||
- | |||
- | ====== General AMI Creation Instructions ====== | ||
- | |||
- | ===== Launch a normal EC2 instance ===== | ||
- | |||
- | * **Choose AMI**: **This matters** | ||
- | * Select the OS that you want the image to be modeled after | ||
- | * Instance type: | ||
- | * This does not matter for the template, as the instance type is prompted every time. | ||
- | * Configure Instance: | ||
- | * Launch somewhere you get login and customize the instance for template creation. | ||
- | * **Add Storage**: **This matters** | ||
- | * Select the disk you want to be selected by default for the template. | ||
- | * This is also prompted every time, but will retain the template selections by default. | ||
- | * Add Tags: | ||
- | * This does not matter and is prompted every time. | ||
- | * Configure Security Group: | ||
- | * This does not matter and is prompted every time. | ||
- | * **Review**: **This matters** | ||
- | * Select the SSH Key when launching that will end up baked into the template. | ||
- | * Launch Instance, Login, Customize (install/ | ||
- | |||
- | ===== Create Image ===== | ||
- | * In AWS Console, select the instance | ||
- | * Click " | ||
- | * Type an Image name | ||
- | * Type an Image description | ||
- | * Click " | ||
- | |||
- | ---- | ||
- | |||
- | ===== Customization Examples ===== | ||
- | |||
- | Customization examples that could be baked into an EC2 instance template. | ||
- | |||
- | Create an auto updating instance | ||
- | <code bash> | ||
- | #!/bin/bash | ||
- | |||
- | # Update right after launch | ||
- | yum -y update | ||
- | |||
- | # Install bash-completion and yum-cron | ||
- | yum -y install bash-completion vim yum-cron | ||
- | |||
- | # Set to auto update daily | ||
- | sed -i ' | ||
- | |||
- | # Reboot instance | ||
- | reboot | ||
- | </ | ||
- | |||
- | ---- | ||