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

Update e2e infra provision to expect providers #24694

Merged
merged 26 commits into from
Jan 13, 2025
Merged

Conversation

Juanadelacuesta
Copy link
Member

@Juanadelacuesta Juanadelacuesta commented Dec 17, 2024

Description

The e2e/terraform module used to provision the infra for the e2e tests uses an older version of terraform that is incompatible with the directive depends_on. This PR updates it by moving it into its own module and passing the providers from the new main, making it compatible with the current set up an reusable for the upgrade testing pipeline.

It also does some renaming to prepare for clients with a different architecture.

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

e2e/terraform/main.tf Outdated Show resolved Hide resolved
Comment on lines 82 to 86
variable "hcp_consul_cluster_id" {
description = "The ID of the HCP Consul cluster"
type = string
default = "nomad-e2e-shared-hcp-consul"
}
Copy link
Member

Choose a reason for hiding this comment

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

This variable is unused. We moved off the HCP Consul version in #20256, but missed removing this variable then.

enos/.gitignore Show resolved Hide resolved
e2e/terraform/main.tf Outdated Show resolved Hide resolved
@@ -51,7 +51,7 @@ Linux clients or Windows clients.
region = "us-east-1"
instance_type = "t2.medium"
server_count = "3"
client_count_ubuntu_jammy_amd64 = "4"
client_count_linux = "4"
Copy link
Member

Choose a reason for hiding this comment

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

This variable originally included the specific distro and architecture so that we could spin up different hosts in the same test run (although we never got around to doing so). It's not obvious to me how we're planning on feeding in the architecture/platform if not by this variable.

(Or, if we're planning on adding architecture/platform variables later, shouldn't we make the same change to the windows_2026_amd64` var?)

Copy link
Member Author

@Juanadelacuesta Juanadelacuesta Jan 2, 2025

Choose a reason for hiding this comment

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

we are with a different variable for the the arch, so we can reuse this one for multiple archs, or at least that is how I pictured it

e2e/terraform/provision-infra/compute.tf Outdated Show resolved Hide resolved
@@ -26,3 +31,5 @@ nomad acl policy apply \
-description "Anonymous policy (full-access)" \
anonymous \
"${DIR}/anonymous.nomad_policy.hcl"

echo "Nomad successfully bootstraped"
Copy link
Member

Choose a reason for hiding this comment

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

Still got a few files with missing trailing EOL

@tgross tgross requested a review from gulducat January 9, 2025 13:49
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

looks great! thank you!!

@Juanadelacuesta Juanadelacuesta merged commit b29a373 into main Jan 13, 2025
31 checks passed
@Juanadelacuesta Juanadelacuesta deleted the f-NET-11478-module branch January 13, 2025 14:59
tgross added a commit that referenced this pull request Jan 14, 2025
In #24694 we did a major refactoring of the E2E Terraform configuration. After
deploying a cluster this morning, I noticed a few moved/removed files were not
reflected in the .gitignore files. This changeset updates the .gitignore to have
no unstaged files after applying.
tgross added a commit that referenced this pull request Jan 14, 2025
In #24694 we did a major refactoring of the E2E Terraform configuration. After
deploying a cluster this morning, I noticed a few moved/removed files were not
reflected in the .gitignore files. This changeset updates the .gitignore to have
no unstaged files after applying.
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