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

roachprod: upgrade TF and add arm64 AMIs #103236

Merged

Conversation

srosenberg
Copy link
Member

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

@srosenberg srosenberg requested a review from a team as a code owner May 12, 2023 20:58
@srosenberg srosenberg requested review from smg260, renatolabs and rail and removed request for a team May 12, 2023 20:58
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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] cockroachdb#36418
[2] cockroachdb#99224

Epic: none
Release note: None
@srosenberg srosenberg force-pushed the sr/roachprod_upgrade_tf_and_add_arm64_ami branch from bb9153e to dd13d60 Compare May 12, 2023 21:05
srosenberg added a commit to srosenberg/cockroach that referenced this pull request May 13, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

LGTM, :shipit:

@srosenberg
Copy link
Member Author

TFTR!

bors r=rail

@craig
Copy link
Contributor

craig bot commented May 16, 2023

Build succeeded:

@craig craig bot merged commit 108eaa1 into cockroachdb:master May 16, 2023
srosenberg added a commit to srosenberg/cockroach that referenced this pull request May 17, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
srosenberg added a commit to srosenberg/cockroach that referenced this pull request May 18, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
srosenberg added a commit to srosenberg/cockroach that referenced this pull request May 19, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin, as well as FIPS-enabled
binary built for amd64.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
craig bot pushed a commit that referenced this pull request May 19, 2023
103243: roachprod: stage arm64 binary r=rail,herkolategan,smg260 a=srosenberg

Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] #103236

Epic: none
Release note: None

Co-authored-by: Stan Rosenberg <[email protected]>
srosenberg added a commit to srosenberg/cockroach that referenced this pull request Jun 9, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin, as well as FIPS-enabled
binary built for amd64.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
srosenberg added a commit to srosenberg/cockroach that referenced this pull request Jun 9, 2023
Add `--arch` to override binary's architecture and refactor.
As of this change, `roachprod stage` is able to stage both
amd64 and arm64 on linux and darwin, as well as FIPS-enabled
binary built for amd64.
In conjunction with the previous change [1], roachprod
now uses arm64-based AMI for graviton2/graviton3 machines.

Below is an example of how to create a VM with graviton3,
```
roachprod create -n1 --clouds aws --aws-machine-type m7g.2xlarge --local-ssd=false $CRL_USERNAME-test
roachprod stage --arch arm64 $CRL_USERNAME-test release v23.1.0-rc.2
roachprod start $CRL_USERNAME-test
```

[1] cockroachdb#103236

Epic: none
Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants