mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
In #20296 we added a Go tool chain to the AMI we use for E2E tests, so that we can build `consul-cni` for tproxy testing. This is intended to be temporary until `consul-k8s` 1.4.2 is officially released. But the Go cache from building `consul-k8s` uses up roughly 1.5GiB of space and the test machines have fairly small disks. This causes the Nomad clients to aggressively GC client allocations that stop, which breaks tests that run batch workloads and then read their logs.
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
jqandawscli. - 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: