Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
103236: roachprod: upgrade TF and add arm64 AMIs r=rail a=srosenberg

As of [1], terraform is used in conjunction with roachprod in AWS. In addition to defining VPCs (and their pair-wise peerings), the generated TF scripts assign `ami_id` for every region. This information is made available to roachprod via config.json, generated from TF and embedded into roachprod binary.

Recently, as of [2], `ami_id_fips` was added. This PR adds `ami_id_arm64` in preparation for arm64-based nightly roachtests. Furthermore, TF is refactored to make it compatible with versions 0.14 and onwards. Both AWS resources and the resulting config.json were generated using TF 1.4.6 (latest at this time).

[1] #36418
[2] #99224

Epic: none
Release note: None

103436: authors:add aq10imran to authors r=aq10imran a=aq10imran

Release note: None
Epic: None

Co-authored-by: Stan Rosenberg <[email protected]>
Co-authored-by: Aqdas Imran <[email protected]>
  • Loading branch information
3 people committed May 16, 2023
3 parents f00b8a0 + dd13d60 + 5ef1e34 commit 108eaa1
Show file tree
Hide file tree
Showing 11 changed files with 775 additions and 732 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Anne Zhu <[email protected]>
Annie Pompa <[email protected]> <[email protected]>
Antoine Grondin <[email protected]>
Anzo Teh <[email protected]> anzoteh96 <[email protected]> <[email protected]>
Aqdas Imran <[email protected]> <[email protected]>
Archer Zhang <[email protected]> azhng <[email protected]>
Arjun Nair <[email protected]> <[email protected]>
Arjun Ravi Narayan <[email protected]> <[email protected]> Arjun Narayan <[email protected]> <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion pkg/roachprod/vm/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ func (p *Provider) runInstance(
return *fl
}

imageID := withFlagOverride(az.region.AMI, &providerOpts.ImageAMI)
imageID := withFlagOverride(az.region.AMI_X86_64, &providerOpts.ImageAMI)
if opts.EnableFIPS {
imageID = withFlagOverride(az.region.AMI_FIPS, &providerOpts.ImageAMI)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/roachprod/vm/aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ type awsConfig struct {
type awsRegion struct {
Name string `json:"region"`
SecurityGroup string `json:"security_group"`
AMI string `json:"ami_id"`
AMI_X86_64 string `json:"ami_id"`
AMI_ARM64 string `json:"ami_id_arm64"`
AMI_FIPS string `json:"ami_id_fips"`
AvailabilityZones availabilityZones `json:"subnets"`
}
Expand Down
Loading

0 comments on commit 108eaa1

Please sign in to comment.