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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

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.

@Juanadelacuesta Juanadelacuesta changed the title func: move infra provisionining to a module and remove providers Update e2e infra provision to expect providers Dec 18, 2024
nomad_license = var.nomad_license
consul_license = var.consul_license
nomad_region = var.nomad_region
}
Copy link
Member

Choose a reason for hiding this comment

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

Missing trailing EOL. There's a few of these in this PR.

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.

@@ -0,0 +1,2 @@
# enos scenarios
.enos/
Copy link
Member

Choose a reason for hiding this comment

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

Does this enos/ directory need to be in the root of the repo?

data "aws_kms_alias" "e2e" {
name = "alias/${var.aws_kms_alias}"
}
server_count = var.client_count_linux
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
server_count = var.client_count_linux
server_count = var.server_count

@@ -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?)

@@ -2,7 +2,8 @@
# SPDX-License-Identifier: BUSL-1.1

locals {
ami_prefix = "nomad-e2e-v3"
ami_prefix = "nomad-e2e-v3"
ubuntu_instance_name = "ubuntu-jammy-${var.instance_architecture}"
Copy link
Member

Choose a reason for hiding this comment

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

This is the image (AMI), not the instance, right?

Suggested change
ubuntu_instance_name = "ubuntu-jammy-${var.instance_architecture}"
ubuntu_image_name = "ubuntu-jammy-${var.instance_architecture}"

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.

2 participants