diff --git a/enos/enos-modules.hcl b/enos/enos-modules.hcl index 4f3f5de3844..1ab66d18740 100644 --- a/enos/enos-modules.hcl +++ b/enos/enos-modules.hcl @@ -6,3 +6,7 @@ module "build_artifactory" { source = "./modules/fetch_artifactory" } + +module "provision_cluster" { + source = "../e2e/terraform" +} \ No newline at end of file diff --git a/enos/enos-quality-upgrade.hcl b/enos/enos-quality-upgrade.hcl deleted file mode 100644 index 050d9e27eec..00000000000 --- a/enos/enos-quality-upgrade.hcl +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -quality "nomad_agent_info" { - description = "A GET call to /v1/agent/members returns the correct number of - running servers and they are all alive" -} - -quality "nomad_agent_info_self" { - description = "A GET call to /v1/agent/self against every server returns the - same last_log_index for all of them." -} - -quality "nomad_nodes_status" { - description = "A GET call to /v1/nodes returns the correct number of clients - and they are all `eligible` and `ready`". -} - -quality "nomad_job_status" { - description = "A GET call to /v1/jobs returns the correct number of jobs and - they are all `running`". -} - -quality "nomad_register_job" { - description = "A POST call to /v1/jobs results in a new job running and - allocations being started accordingly." -} - -quality "nomad_reschedule_alloc" { - description = "A POST / PUT call to /v1/allocation/:alloc_id/stop results in - the stopped allocation being rescheduled" -} - - -quality "nomad_restore_snapshot" { - description = "A node can be restored from a snapshot built on a previous - version" -} - -quality "nomad_allocs_status" { - description = "A GET call to /v1/allocs returns the correct number of - allocations and they are all `running`". -} diff --git a/enos/enos-scenario-upgrade.hcl b/enos/enos-scenario-upgrade.hcl index e127ccd8347..62271891848 100644 --- a/enos/enos-scenario-upgrade.hcl +++ b/enos/enos-scenario-upgrade.hcl @@ -9,34 +9,39 @@ scenario "upgrade" { matrix { arch = ["amd64", "arm64"] - //service_discovery = ["consul", "nomad"] - distro = ["alpine", "fedora", "rhel", "ubuntu"] + service_discovery = ["consul", "nomad"] editions = ["ce", "ent"] - os = ["linux", "darwin", "windows"] + os = ["linux", "windows"] + + exclude { + os = ["windows"] + arch = ["arm64"] + } } step "copy_binary" { description = <<-EOF Determine which Nomad artifact we want to use for the scenario, depending on the - 'arch', 'distro' and 'os' + 'arch', 'edition' and 'os' EOF module = module.build_artifactory variables { - version = global.initial_version - artifactory_path = globals.artifact_path - artifact_token = globals.artifact_token - os = matrix.os - distro = matrix.os != "linux" ? var.distro : null - local_path = var.binary_local_path + artifactory_username = var.artifactory_username + artifactory_token = var.artifact_token + arch = matrix.arch + edition = matrix.edition + product_version = var.product_version + os = matrix.os + local_path = var.binary_local_path } } - /* + step "provision_cluster" { description = <<-EOF Using the binary from the previous step, provision a Nomad cluster using the e2e EOF - module = "build_${matrix.os}_${matrix.distro}" + module = module. variables { name @@ -47,7 +52,7 @@ scenario "upgrade" { // ... } } - + /* step "run_new_workloads" { description = <<-EOF Verify the health of the cluster by running new workloads and stopping random allocs diff --git a/enos/enos-vars.hcl b/enos/enos-vars.hcl index b018229acc9..ca281333881 100644 --- a/enos/enos-vars.hcl +++ b/enos/enos-vars.hcl @@ -18,13 +18,11 @@ variable "artifactory_token" { variable "artifactory_host" { type = string description = "The artifactory host to search for Nomad artifacts" - default = "https://artifactory.hashicorp.engineering/artifactory" } variable "artifactory_repo" { type = string description = "The artifactory repo to search for Nomad artifacts" - default = "hashicorp-crt-stable-local*" } variable "edition" { @@ -32,11 +30,6 @@ variable "edition" { description = "The edition of the binary to search, it can be either CE or ENT" } -variable "revision" { - type = string - description = "The specific commit of the binary" -} - variable "os" { type = string description = "The operative system the binary is needed for" @@ -57,5 +50,4 @@ variable "arch" { variable "binary_path" { description = "The path to donwload and unzip the binary" type = string - default = "/home/ubuntu/nomad" }