Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.61 KB

File metadata and controls

35 lines (27 loc) · 1.61 KB

Baking AMIs

Ensure credentials in your default profile are refreshed and ready to go, then bake an AMI with the bake-ami.sh script:

$ ./core-components/bake-ami.sh
Usage:
  bake-ami.sh
    -a : [Required] account name
    -t : [Required] ami type -> cassandra | opscenter
    -i : base ami_id
  • Running with -t cassandra will produce a DSE Cassandra image.
  • Running with -t opscenter will produce a DSE OpsCenter image.
  • In both cases, the base AMI should be Amazon Linux 2.0, and can be provided in one of two ways:
    • With the -i option
    • As PACKER_BASE_AMI_ID in variables.yaml
    • If not specified, the script will simply use awscli to look up the newest amzn2 AMI.
  • Note: the PACKER_SUBNET_ID variable must be a public subnet with a route to an Internet Gateway. Otherwise, Packer will time out while waiting for SSH to become available.

Known issues:

Error launching source instance: PendingVerification: Your request for accessing resources in this region is being validated...

A brand new AWS account will sometimes return this error. Just wait it out and try again later.

404 error while running bake-ami.sh

The script uses curl -s -4 ifconfig.co to get your external IP address (for use in a security group's inbound rules). Sometimes ifconfig doesn't respond. Just run the command again.

Another app is currently holding the yum lock; waiting for it to exit...

This happens (often) at the start of a Packer build. Just wait it out, the yum lock should be cleared after a few seconds.