diff --git a/.github/workflows/smoke-tests.yaml b/.github/workflows/smoke-tests.yaml index 74515196..eab867c2 100644 --- a/.github/workflows/smoke-tests.yaml +++ b/.github/workflows/smoke-tests.yaml @@ -52,6 +52,23 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: make smoke-legacy + smoke-cutting-edge: + runs-on: ubuntu-latest + if: | + github.event_name == 'push' || + contains(github.event.pull_request.labels.*.name, 'smoke-test') || + contains(github.event.pull_request.labels.*.name, 'smoke-cutting-edge') + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3 + - name: Run cutting-edge smoke test + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: make smoke-cutting-edge + smoke-windows: runs-on: ubuntu-latest if: | diff --git a/Makefile b/Makefile index 8eb84ba7..9a4f34f6 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,10 @@ functional-test: integration-test: go test -v ./test/integration/... -timeout 20m +.PHONY: smoke-cutting-edge +smoke-cutting-edge: + go test -count=1 -v ./test/smoke/... -run TestCuttingEdgeCluster -timeout 50m + .PHONY: smoke-modern smoke-modern: go test -count=1 -v ./test/smoke/... -run TestModernCluster -timeout 50m diff --git a/examples/terraform/aws-simple/platform.tf b/examples/terraform/aws-simple/platform.tf index 9f1f6e7c..0c3dbb49 100644 --- a/examples/terraform/aws-simple/platform.tf +++ b/examples/terraform/aws-simple/platform.tf @@ -33,6 +33,7 @@ locals { module "platform" { count = length(local.upstream_platform_keys) source = "terraform-mirantis-modules/provision-aws/mirantis//modules/platform" + version = ">= 0.1.7" platform_key = local.upstream_platform_keys[count.index] windows_password = var.windows_password diff --git a/examples/terraform/aws-simple/provision.tf b/examples/terraform/aws-simple/provision.tf index 59d67515..23baf97c 100644 --- a/examples/terraform/aws-simple/provision.tf +++ b/examples/terraform/aws-simple/provision.tf @@ -7,6 +7,7 @@ locals { # PROVISION MACHINES/NETWORK module "provision" { source = "terraform-mirantis-modules/provision-aws/mirantis" + version = ">= 0.1.7" name = var.name common_tags = local.tags diff --git a/test/platforms.go b/test/platforms.go index 19eee0cd..25882eed 100644 --- a/test/platforms.go +++ b/test/platforms.go @@ -117,6 +117,20 @@ var Platforms = map[string]Platform{ Public: true, UserData: "sudo firewall-cmd --permanent --add-port=2377/tcp --add-port=7946/tcp --add-port=7946/udp --add-port=4789/udp --add-port=10250/tcp; sudo firewall-cmd --reload", }, + "Rocky10": { + Name: "rocky_10", + Count: 1, + VolumeSize: "100", + Public: true, + UserData: "sudo firewall-cmd --permanent --add-port=2377/tcp --add-port=7946/tcp --add-port=7946/udp --add-port=4789/udp --add-port=10250/tcp; sudo firewall-cmd --reload", + }, + "Rhel10": { + Name: "rhel_10", + Count: 1, + VolumeSize: "100", + Public: true, + UserData: "sudo firewall-cmd --permanent --add-port=2377/tcp --add-port=7946/tcp --add-port=7946/udp --add-port=4789/udp --add-port=10250/tcp; sudo firewall-cmd --reload", + }, "Windows2019": { Name: "windows_2019", Count: 1, diff --git a/test/smoke/smoke_test.go b/test/smoke/smoke_test.go index b396432c..f876b11e 100644 --- a/test/smoke/smoke_test.go +++ b/test/smoke/smoke_test.go @@ -112,7 +112,7 @@ func runSmokeTest(t *testing.T, cfg smokeConfig) { "nodegroups": cfg.Nodegroups, "ssh_key_algorithm": cfg.SSHKeyAlgorithm, "extra_tags": map[string]string{ - "launchpad-smoke-test": "true", + "launchpad-smoke-test": "true", "launchpad-smoke-test-name": cfg.Name, }, } @@ -187,6 +187,33 @@ func TestModernCluster(t *testing.T) { }) } +// TestCuttingEdgeCluster exercises rhel10/rocky10/ubuntu24 managers and workers +// with sles15 as an additional worker, using the latest MCR and MKE versions. +// The rhel_10/rocky_10 platform keys are available in +// terraform-mirantis-provision-aws >= v0.1.7 (pinned in examples/terraform/aws-simple). +func TestCuttingEdgeCluster(t *testing.T) { + runSmokeTest(t, smokeConfig{ + // AWS LB/target-group names are capped at 32 chars: the stack name is + // "smoke-{Name}-{5-char-random}" and Terraform appends suffixes like + // "-mke-kube" (9 chars), capping len(Name) at 11. Hence "cuttingedge" + // rather than "cutting-edge" (12 chars). + Name: "cuttingedge", + MCRChannel: "stable-29.4", + MKEVersion: "3.9.2", + MSRVersion: "3.1.18", + SSHKeyAlgorithm: "ed25519", + Nodegroups: map[string]interface{}{ + "MngrRhel10": test.Platforms["Rhel10"].GetManager(), + "MngrRocky10": test.Platforms["Rocky10"].GetManager(), + "MngrUbuntu24": test.Platforms["Ubuntu24"].GetManager(), + "WrkRhel10": test.Platforms["Rhel10"].GetWorker(), + "WrkRocky10": test.Platforms["Rocky10"].GetWorker(), + "WrkSles15": test.Platforms["Sles15"].GetWorker(), + "WrkUbuntu24": test.Platforms["Ubuntu24"].GetWorker(), + }, + }) +} + // TestLegacyCluster exercises rhel8/rocky8/ubuntu22 managers and workers // with MCR stable-25.0 and MKE 3.8.8. func TestLegacyCluster(t *testing.T) { @@ -224,4 +251,3 @@ func TestWindowsCluster(t *testing.T) { }, }) } -