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

VAULT-29583: Modernize default distributions in enos scenarios #28012

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

ryancragun
Copy link
Collaborator

@ryancragun ryancragun commented Aug 7, 2024

Description

Our scenarios have been running the last gen of distributions in CI. This updates our default distributions as follows:

  • Amazon: 2023
  • Leap: 15.6
  • RHEL: 8.10, 9.4
  • SLES: 15.6
  • Ubuntu: 20.04, 24.04

With these changes we also unlock a few new variants combinations:

  • distro:amzn seal:pkcs11
  • arch:arm64 distro:leap

We also normalize our distro key for Amazon Linux to amzn, which matches the uname output on both versions that we've supported.

TODO only if you're a HashiCorp employee

  • Labels: If this PR is the CE portion of an ENT change, and that ENT change is
    getting backported to N-2, use the new style backport/ent/x.x.x+ent labels
    instead of the old style backport/x.x.x labels.
  • Labels: If this PR is a CE only change, it can only be backported to N, so use
    the normal backport/x.x.x label (there should be only 1).
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

@ryancragun ryancragun added pr/no-changelog pr/no-milestone backport/ent/1.15.x+ent Changes are backported to 1.15.x+ent backport/ent/1.16.x+ent Changes are backported to 1.16.x+ent backport/1.17.x labels Aug 7, 2024
@ryancragun ryancragun requested a review from a team as a code owner August 7, 2024 16:51
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 7, 2024
}
}
}
}

data "aws_ami" "ubuntu_2004" {
data "aws_ami" "amzn_2" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for the messy diff here. I reordered the data blocks by name and that resulted in this ugliness.

@@ -31,7 +31,7 @@ if ! out=$(jq -eMc --arg version "$version" '.keys | contains([$version])' <<< "
fi

if ! out=$(jq -eMc --arg version "$version" --arg bd "$VAULT_BUILD_DATE" '.key_info[$version].build_date == $bd' <<< "$vh"); then
fail "cluster version history build date is not the expected date: expected: $VAULT_BUILD_DATE, output: $out"
fail "cluster version history build date is not the expected date: expected: true, expected date: $VAULT_BUILD_DATE, key_info: $(jq -eMc '.key_info' <<< "$vh"), output: $out"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is fairly unrelated but when I was testing a random new SHA I didn't have the build date so this failed initially. This just improves the error message to both help that development case and to also aid any future failure discovery.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet, this error message had room for improvement for sure.

Copy link

github-actions bot commented Aug 7, 2024

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented Aug 7, 2024

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@rebwill rebwill left a comment

Choose a reason for hiding this comment

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

Just one small typo but otherwise this looks awesome and I'm glad to see all our distros coming up to date and expanding coverage of pkcs11 testing!

enos/modules/install_packages/main.tf Outdated Show resolved Hide resolved
@@ -27,6 +27,7 @@ variable "token_base64" {
locals {
// The user/group name for softhsm
softhsm_groups = {
"amzn" = "ods"
Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet to see amzn finally working with the softhsm/pkcs11 stuff 🙌

@@ -37,14 +37,51 @@ variable "timeout" {
}

locals {
packages = var.include_tools ? ["softhsm", "opensc"] : ["softhsm"]
packages = var.include_tools ? {
Copy link
Contributor

Choose a reason for hiding this comment

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

Packages are pain 🩸 but this is a more clear way to define them.

@@ -31,7 +31,7 @@ if ! out=$(jq -eMc --arg version "$version" '.keys | contains([$version])' <<< "
fi

if ! out=$(jq -eMc --arg version "$version" --arg bd "$VAULT_BUILD_DATE" '.key_info[$version].build_date == $bd' <<< "$vh"); then
fail "cluster version history build date is not the expected date: expected: $VAULT_BUILD_DATE, output: $out"
fail "cluster version history build date is not the expected date: expected: true, expected date: $VAULT_BUILD_DATE, key_info: $(jq -eMc '.key_info' <<< "$vh"), output: $out"
Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet, this error message had room for improvement for sure.

@ryancragun
Copy link
Collaborator Author

Our scenarios have been running the last gen of distributions in CI.
This updates our default distributions as follows:
  - Amazon: 2023
  - Leap:   15.6
  - RHEL:   8.10, 9.4
  - SLES:   15.6
  - Ubuntu: 20.04, 24.04

With these changes we also unlock a few new variants combinations:
  - `distro:amzn seal:pkcs11`
  - `arch:arm64 distro:leap`

We also normalize our distro key for Amazon Linux to `amzn`, which
matches the uname output on both versions that we've supported.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Signed-off-by: Ryan Cragun <me@ryan.ec>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.15.x+ent Changes are backported to 1.15.x+ent backport/ent/1.16.x+ent Changes are backported to 1.16.x+ent backport/1.17.x hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants