95b7837c9f
* README.md + update list of modern instance types + add caveat regarding linux-vanilla vs. linux-virt * alpine-ami.yaml + build instance type is always t3.nano + block device where we build is always /dev/xvdf + add optional AMI encryption + always enable AMI SR-IOV flag (vanilla & virt both have the necessary driver) + no need to pass volume_name to make_ami.sh * make_ami.sh + replace hard tabs with 4 spaces + always set up edge repositories + no need to add mkinitfs package, it's a dependency of linux-* + fix update of /etc/inittab + fix configuration of NTP + declare local vars in main() + device is always /dev/xvdf * variables.json-default/example + improve comment for kernel_flavor + default add_repos is now empty + remove acct & e2fsprogs-extra from add_pkgs + add optional AMI encryption + remove sriov_enable, build_instance_type, and volume_name vars
61 lines
2.0 KiB
YAML
61 lines
2.0 KiB
YAML
variables:
|
|
|
|
# NOTE: Configuration is done with a `variables.json` file.
|
|
# To use default values, simply `cp variables.json-default variables.json`.
|
|
# See `variables.json-example` for full configuration variable descriptions.
|
|
|
|
# NOTE: Changing alpine_release requires modifying `make_ami.sh` -- don't
|
|
# override this in `variables.json`!
|
|
alpine_release: "3.8"
|
|
|
|
|
|
builders:
|
|
- type: "amazon-ebssurrogate"
|
|
|
|
### Builder Instance Details
|
|
|
|
vpc_id: "{{user `vpc`}}"
|
|
subnet_id: "{{user `subnet`}}"
|
|
security_group_id: "{{user `security_group`}}"
|
|
instance_type: "t3.nano"
|
|
associate_public_ip_address: "{{user `public_ip`}}"
|
|
launch_block_device_mappings:
|
|
- volume_type: "gp2"
|
|
device_name: "/dev/xvdf"
|
|
delete_on_termination: "true"
|
|
volume_size: "{{user `volume_size`}}"
|
|
ssh_username: "ec2-user"
|
|
source_ami_filter:
|
|
# use the latest Amazon Linux AMI
|
|
filters:
|
|
virtualization-type: "hvm"
|
|
root-device-type: "ebs"
|
|
architecture: "x86_64"
|
|
name: "amzn-ami-hvm-*-x86_64-gp2"
|
|
owners:
|
|
- "137112412989"
|
|
most_recent: "true"
|
|
|
|
### Built AMI Details
|
|
|
|
ami_name: "{{user `ami_name_prefix`}}{{user `alpine_release`}}-r{{user `ami_release`}}{{user `ami_name_suffix`}}"
|
|
ami_description: "{{user `ami_desc_prefix`}}{{user `alpine_release`}}-r{{user `ami_release`}}{{user `ami_desc_suffix`}}"
|
|
ami_virtualization_type: "hvm"
|
|
ami_root_device:
|
|
source_device_name: "/dev/xvdf"
|
|
device_name: "/dev/xvda"
|
|
delete_on_termination: "true"
|
|
volume_size: "{{user `volume_size`}}"
|
|
volume_type: "gp2"
|
|
encrypt_boot: "{{user `encrypt_ami`}}"
|
|
ena_support: "{{user `ena_enable`}}"
|
|
sriov_support: "true"
|
|
ami_groups: "{{user `ami_access`}}"
|
|
ami_regions: "{{user `deploy_regions`}}"
|
|
|
|
|
|
provisioners:
|
|
- type: "shell"
|
|
script: "make_ami.sh"
|
|
execute_command: 'sudo sh -c "{{ .Vars }} {{ .Path }} {{user `kernel_flavor`}} ''{{user `add_repos`}}'' ''{{user `add_pkgs`}}''"'
|