Add all regions except eu-west-3

This commit is contained in:
Mike Crute 2017-12-25 05:03:53 +00:00
parent 0a69d4dfe9
commit eb26234ebc
3 changed files with 63 additions and 39 deletions

View File

@ -5,8 +5,8 @@ built and supported.**
This repository contains a packer file and a script to create an EC2 AMI This repository contains a packer file and a script to create an EC2 AMI
containing Alpine Linux. The AMI is designed to work with most EC2 features containing Alpine Linux. The AMI is designed to work with most EC2 features
natively and thus should launch on any instance type. If anything is missing such as Elastic Network Adapters and NVME EBS volumes by default. If anything
please report a bug. is missing please report a bug.
This image can be launched on any modern instance type. Including T2, M5, C5, This image can be launched on any modern instance type. Including T2, M5, C5,
I3, R4, P2, P3, X1, X1e, D2. Other instances may also work but have not been I3, R4, P2, P3, X1, X1e, D2. Other instances may also work but have not been
@ -18,27 +18,27 @@ be configured to use whatever SSH keys you chose when you launched the image.
If user data is specified it must be a shell script that begins with `#!`. If a If user data is specified it must be a shell script that begins with `#!`. If a
script is provided it will be executed as root after the network is configured. script is provided it will be executed as root after the network is configured.
**Note:** The AMI is not yet available in all regions. This file and **Note:** This image will be updated as Alpine Linux changes over time and as
AWS adds regions. This file and
[releases.yaml](https://github.com/mcrute/alpine-ec2-ami/blob/master/releases.yaml) [releases.yaml](https://github.com/mcrute/alpine-ec2-ami/blob/master/releases.yaml)
will be updated as new regions are made available. will be updated as new regions are made available.
| Alpine Version | Region Code | Region Name | AMI ID | | Alpine Version | Region Code | AMI ID |
| -------------- | -------------- | ------------------------- | --------------------------------------------------------------------------------------------- | | -------------- | ----------- | ------ |
| 3.7 | us-east-1 | US East (N. Virginia) | [ami-XXXXXXXX](https://us-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ca-central-1 | [ami-ba3a80de](https://ca-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-ba3a80de) |
| 3.7 | us-east-2 | US East (Ohio) | [ami-XXXXXXXX](https://us-east-2.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | us-west-1 | [ami-971f19f7](https://us-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-971f19f7) |
| 3.7 | us-west-1 | US West (N. California) | [ami-XXXXXXXX](https://us-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | eu-west-2 | [ami-d8b2abbc](https://eu-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-d8b2abbc) |
| 3.7 | us-west-2 | US West (Oregon) | [ami-032b877b](https://us-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-032b877b) | | 3.7 | sa-east-1 | [ami-e233738e](https://sa-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-e233738e) |
| 3.7 | ca-central-1 | Canada (Central) | [ami-XXXXXXXX](https://ca-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | eu-west-1 | [ami-5589062c](https://eu-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-5589062c) |
| 3.7 | eu-central-1 | EU (Frankfurt) | [ami-XXXXXXXX](https://eu-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ap-south-1 | [ami-77a8e218](https://ap-south-1.console.aws.amazon.com/ec2/home#launchAmi=ami-77a8e218) |
| 3.7 | eu-west-1 | EU (Ireland) | [ami-XXXXXXXX](https://eu-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ap-southeast-1 | [ami-4fc8a133](https://ap-southeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-4fc8a133) |
| 3.7 | eu-west-2 | EU (London) | [ami-XXXXXXXX](https://eu-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ap-southeast-2 | [ami-afdb2bcd](https://ap-southeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-afdb2bcd) |
| 3.7 | eu-west-3 | EU (Paris) | [ami-XXXXXXXX](https://eu-west-3.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ap-northeast-1 | [ami-0cd5416a](https://ap-northeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-0cd5416a) |
| 3.7 | ap-northeast-1 | Asia Pacific (Tokyo) | [ami-XXXXXXXX](https://ap-northeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | ap-northeast-2 | [ami-909c3dfe](https://ap-northeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-909c3dfe) |
| 3.7 | ap-northeast-2 | Asia Pacific (Seoul) | [ami-XXXXXXXX](https://ap-northeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | eu-central-1 | [ami-5cb92e33](https://eu-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-5cb92e33) |
| 3.7 | ap-southeast-1 | Asia Pacific (Singapore) | [ami-XXXXXXXX](https://ap-southeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | us-east-1 | [ami-c3dc9ab9](https://us-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-c3dc9ab9) |
| 3.7 | ap-southeast-2 | Asia Pacific (Sydney) | [ami-XXXXXXXX](https://ap-southeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | us-west-2 | [ami-6ac26d12](https://us-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-6ac26d12) |
| 3.7 | ap-south-1 | Asia Pacific (Mumbai) | [ami-XXXXXXXX](https://ap-south-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) | | 3.7 | us-east-2 | [ami-fc8aa299](https://us-east-2.console.aws.amazon.com/ec2/home#launchAmi=ami-fc8aa299) |
| 3.7 | sa-east-1 | South America (São Paulo) | [ami-XXXXXXXX](https://sa-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-XXXXXXXX) |
## Caveats ## Caveats

View File

@ -1,7 +1,16 @@
variables: variables:
security_group: "" security_group: ""
subnet: "" subnet: ""
destination_regions: ""
# Treat this similar to a ABUILD pkgrel variable and increment with every
# release. Packer will notice an exiting AMI at build start and fail unless
# it is rmoved. To prevent a period of time where no Alpine AMI exists,
# create a new variant. Old AMIs should be pruned at some point.
ami_release: "1"
# Overriding this requires validating that the installation script still
# works as expected. It probably does but stuff changes between major
# version.
alpine_release: "3.7" alpine_release: "3.7"
# Don't override this without a good reason and if you do just make sure it # Don't override this without a good reason and if you do just make sure it
@ -21,17 +30,32 @@ builders:
launch_block_device_mappings: launch_block_device_mappings:
- volume_type: "gp2" - volume_type: "gp2"
device_name: "{{user `volume_name`}}" device_name: "{{user `volume_name`}}"
delete_on_termination: false delete_on_termination: true
volume_size: 5 volume_size: 5
# Output AMI Settings # Output AMI Settings
ena_support: true ena_support: true
ami_name: "Alpine-{{user `alpine_release`}}-Hardened-EC2" ami_name: "Alpine-{{user `alpine_release`}}-r{{user `ami_release`}}-Hardened-EC2"
ami_description: "Alpine Linux {{user `alpine_release`}} Release with Hardened Kernel and EC2 Optimizations" ami_description: "Alpine Linux {{user `alpine_release`}}-r{{user `ami_release`}} Release with Hardened Kernel and EC2 Optimizations"
ami_groups: ami_groups:
- "all" - "all"
ami_virtualization_type: "hvm" ami_virtualization_type: "hvm"
ami_regions: "{{user `destination_regions`}}" ami_regions:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- ca-central-1
- eu-central-1
- eu-west-1
- eu-west-2
# - eu-west-3
- ap-northeast-1
- ap-northeast-2
- ap-southeast-1
- ap-southeast-2
- ap-south-1
- sa-east-1
ami_root_device: ami_root_device:
source_device_name: "{{user `volume_name`}}" source_device_name: "{{user `volume_name`}}"
device_name: "/dev/xvda" device_name: "/dev/xvda"

View File

@ -4,18 +4,18 @@ Alpine-3.7-Hardened-EC2:
kernel-flavor: hardened kernel-flavor: hardened
ami-release-date: "2017-12-25 03:02:00" ami-release-date: "2017-12-25 03:02:00"
region-identifiers: region-identifiers:
#us-east-1: ami-XXXXXXXX ap-northeast-1: ami-0cd5416a
#us-east-2: ami-XXXXXXXX ap-northeast-2: ami-909c3dfe
#us-west-1: ami-XXXXXXXX ap-south-1: ami-77a8e218
us-west-2: ami-032b877b ap-southeast-1: ami-4fc8a133
#ca-central-1: ami-XXXXXXXX ap-southeast-2: ami-afdb2bcd
#eu-central-1: ami-XXXXXXXX ca-central-1: ami-ba3a80de
#eu-west-1: ami-XXXXXXXX eu-central-1: ami-5cb92e33
#eu-west-2: ami-XXXXXXXX eu-west-1: ami-5589062c
eu-west-2: ami-d8b2abbc
#eu-west-3: ami-XXXXXXXX #eu-west-3: ami-XXXXXXXX
#ap-northeast-1: ami-XXXXXXXX sa-east-1: ami-e233738e
#ap-northeast-2: ami-XXXXXXXX us-east-1: ami-c3dc9ab9
#ap-southeast-1: ami-XXXXXXXX us-east-2: ami-fc8aa299
#ap-southeast-2: ami-XXXXXXXX us-west-1: ami-971f19f7
#ap-south-1: ami-XXXXXXXX us-west-2: ami-6ac26d12
#sa-east-1: ami-XXXXXXXX