Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ensure that spot instances are used for packer builds #598

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Apr 12, 2023

As per jenkins-infra/helpdesk#3502 and jenkins-infra/helpdesk#3485, cloud cost control is important for us.

The goal of this PR is to ensure that packer VM used to build VM templates are always using Spot prices on both AWS EC2 and Azure.

smerle33

This comment was marked as outdated.

Copy link
Contributor

@smerle33 smerle33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an error with the spot

@dduportal dduportal marked this pull request as draft April 13, 2023 07:17
@dduportal dduportal self-assigned this Apr 13, 2023
@dduportal
Copy link
Contributor Author

Weird, it points to the spot = true in the azure-arm source, which I got from https://developer.hashicorp.com/packer/plugins/builders/azure/arm#spot .

I might be mis-reading the doc, lemme try locally

@dduportal
Copy link
Contributor Author

@dduportal
Copy link
Contributor Author

Opened a PR on their doc: hashicorp/packer-plugin-azure#293

@dduportal dduportal marked this pull request as ready for review April 13, 2023 08:06
@dduportal
Copy link
Contributor Author

Still in error: it's for the AWS build this time

==> amazon-ebs.ubuntu: Error launching source instance: InvalidParameterValue: Invalid value '' for InstanceType.

@dduportal
Copy link
Contributor Author

@dduportal
Copy link
Contributor Author

I'm force merging under the following assumptions:

  • It can't spin up an ARM64 VM (in EC2) for the ARM64 Docker build, because I might have been too "hasty" in cleaning up AMIs in EC2 (error com.amazonaws.AmazonClientException: Unable to find image for request {ExecutableUsers: [],Filters: [],ImageIds: [ami-0a0af3a09497058f7],Owners: [200564066411],} in infra.ci logs)
    => 1.1.1 release is needed

  • The EC2 and Azure VM builds worked well which validate this PR

@dduportal dduportal merged commit 0dfab89 into jenkins-infra:main Apr 13, 2023
@dduportal dduportal deleted the chore/use-spot-instances branch April 13, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants