open-nomad/e2e/terraform/packer
Daniel Bennett e58ba84a9e
e2e: fix windows client docker (#17572)
the windows docker install script stopped working.

after trying various things to fix the script,
I opted instead for a base image that comes with
docker already installed.

error output during build was:
  Installing Docker.
  WARNING: Cannot find path 'C:\Users\Administrator\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because it does not exist.
  WARNING: Cannot bind argument to parameter 'downloadURL' because it is an empty string.
  WARNING: The property 'AbsoluteUri' cannot be found on this object. Verify that the property exists.
  WARNING: The property 'RequestMessage' cannot be found on this object. Verify that the property exists.
  Failed to install Docker.
  Install-Package : No match was found for the specified search criteria and package name 'docker'.
2023-06-20 10:17:16 -05:00
..
ubuntu-jammy-amd64 e2e: cleanup podman installation in jammy image (#17558) 2023-06-15 18:17:31 -05:00
windows-2016-amd64 e2e: fix windows client docker (#17572) 2023-06-20 10:17:16 -05:00
README.md e2e: swap bionic image for jammy (#15220) 2022-11-16 10:37:18 -06:00
build e2e: swap bionic image for jammy (#15220) 2022-11-16 10:37:18 -06:00
ubuntu-jammy-amd64.pkr.hcl [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
windows-2016-amd64.pkr.hcl e2e: fix windows client docker (#17572) 2023-06-20 10:17:16 -05:00

README.md

Packer Builds

These builds are run as-needed to update the AMIs used by the end-to-end test infrastructure.

What goes here?

  • steps that aren't specific to a given Nomad build: ex. all Linux instances need jq and awscli.
  • steps that aren't specific to a given EC2 instance: nothing that includes an IP address.
  • steps that infrequently change: the version of Consul or Vault we ship.

Running Packer builds

$ packer --version
1.6.4

# build Ubuntu Jammy AMI
$ ./build ubuntu-jammy-amd64

# build Windows AMI
$ ./build windows-2016-amd64

Debugging Packer Builds

To debug a Packer build you'll need to pass the -debug and -on-error flags. You can then ssh into the instance using the ec2_amazon-ebs.pem file that Packer drops in this directory.

Packer doesn't have a cleanup command if you've run -on-error=abort. So when you're done, clean up the machine by looking for "Packer" in the AWS console: