From 5da259bf8f07889c8d7fcda9ae51a69181760c3f Mon Sep 17 00:00:00 2001 From: James Nesbitt Date: Thu, 28 Nov 2024 16:56:36 +0200 Subject: [PATCH] PRODENG-2805 clean up examples and tests (#524) - drop examples that are no longer supported - drop tests that are no longer supported - point smoke tests to moved examples Signed-off-by: James Nesbitt --- examples/footloose/.gitignore | 1 - examples/footloose/README.md | 14 -- .../footloose/cluster_custom_imagerepo.yaml | 22 --- examples/footloose/footloose.yaml | 46 ------ examples/footloose/launchpad.example.yaml | 33 ---- examples/multipass/README.md | 7 - examples/multipass/cloud-init.yaml | 3 - examples/multipass/launchpad.yml | 21 --- examples/multipass/startup.sh | 14 -- .../aws-complete}/.gitignore | 0 .../aws-complete}/.terraform.lock.hcl | 0 .../aws-complete}/README.md | 0 .../aws-complete}/iam.tf | 0 .../aws-complete}/infra.tfvars.template | 0 .../aws-complete}/k8s.tf | 0 .../aws-complete}/key.tf | 0 .../aws-complete}/launchpad.tf | 0 .../aws-complete}/main.tf | 0 .../aws-complete}/mke.tf | 0 .../aws-complete}/modules/aws-ccm/iam.tf | 0 .../aws-complete}/modules/aws-ccm/main.tf | 0 .../aws-complete}/modules/aws-ccm/values.yaml | 0 .../modules/aws-ccm/variables.tf | 0 .../modules/ebs-csi-driver/iam.tf | 0 .../modules/ebs-csi-driver/main.tf | 0 .../modules/ebs-csi-driver/variables.tf | 0 .../aws-complete}/output.tf | 0 .../aws-complete}/platform.tf | 0 .../aws-complete}/provision.tf | 0 .../aws-complete}/sg.tf | 0 .../aws-complete}/system.tf | 0 .../aws-complete}/test.tf | 0 .../aws-complete}/variables.tf | 0 .../aws-complete}/versions.tf | 0 .../aws-simple}/.gitignore | 0 .../aws-simple}/.terraform.lock.hcl | 0 .../aws-simple}/README.md | 0 .../launchpad => terraform/aws-simple}/key.tf | 0 .../aws-simple}/launchpad.tf | 0 .../aws-simple}/main.tf | 0 .../aws-simple}/output.tf | 0 .../aws-simple}/platform.tf | 0 .../aws-simple}/provision.tf | 0 .../aws-simple}/system.tf | 0 .../aws-simple}/terraform.tfvars.template | 0 .../aws-simple}/variables.tf | 0 .../aws-simple}/versions.tf | 0 examples/tf-aws/archive/.gitignore | 5 - examples/tf-aws/archive/Makefile | 9 - examples/tf-aws/archive/README.md | 12 -- examples/tf-aws/archive/main.tf | 113 ------------- .../tf-aws/archive/modules/common/main.tf | 144 ---------------- .../tf-aws/archive/modules/common/outputs.tf | 28 ---- .../archive/modules/common/variables.tf | 3 - .../tf-aws/archive/modules/master/main.tf | 127 -------------- .../tf-aws/archive/modules/master/outputs.tf | 15 -- .../archive/modules/master/variables.tf | 31 ---- examples/tf-aws/archive/modules/vpc/main.tf | 53 ------ .../tf-aws/archive/modules/vpc/outputs.tf | 7 - .../tf-aws/archive/modules/vpc/variables.tf | 6 - .../archive/modules/windows_worker/main.tf | 105 ------------ .../archive/modules/windows_worker/outputs.tf | 6 - .../modules/windows_worker/variables.tf | 30 ---- .../tf-aws/archive/modules/worker/main.tf | 45 ----- .../tf-aws/archive/modules/worker/outputs.tf | 6 - .../archive/modules/worker/variables.tf | 31 ---- examples/tf-aws/archive/ssh_keys/.gitkeep | 0 .../tf-aws/archive/terraform.tfvars.example | 5 - examples/tf-aws/archive/variables.tf | 48 ------ examples/tf-aws/archive/versions.tf | 4 - examples/tf-hetzner/.gitignore | 5 - examples/tf-hetzner/README.md | 12 -- examples/tf-hetzner/main.tf | 85 ---------- examples/tf-hetzner/terraform.tfvars.example | 9 - test/archive/footloose-bastion.yaml.tpl | 70 -------- test/archive/footloose-local.yaml.tpl | 54 ------ test/archive/footloose-localrepo.yaml.tpl | 25 --- test/archive/footloose-msr.yaml.tpl | 73 --------- test/archive/footloose-prune.yaml.tpl | 50 ------ test/archive/footloose.yaml.tpl | 50 ------ test/archive/fucktest.sh | 13 -- test/archive/launchpad-bastion.yaml | 33 ---- test/archive/launchpad-forward.yaml | 25 --- test/archive/launchpad-local.yaml | 26 --- test/archive/launchpad-msr-beta.yaml | 64 -------- test/archive/launchpad-msr.yaml | 59 ------- test/archive/launchpad-prune.yaml | 47 ------ test/archive/launchpad-upload.yaml | 32 ---- test/archive/launchpad-v1beta1.yaml.tpl | 26 --- test/archive/launchpad-vxlan.yaml | 35 ---- test/archive/launchpad.yaml | 39 ----- test/archive/smoke.common.sh | 155 ------------------ test/archive/smoke_apply.sh | 48 ------ test/archive/smoke_apply_bastion.sh | 24 --- test/archive/smoke_apply_forward.sh | 23 --- test/archive/smoke_apply_local.sh | 23 --- test/archive/smoke_cleanup.sh | 8 - test/archive/smoke_localrepo.sh | 18 -- test/archive/smoke_localrepo_reset.sh | 18 -- test/archive/smoke_prune.sh | 40 ----- test/archive/smoke_register.sh | 20 --- test/archive/smoke_reset.sh | 15 -- test/archive/smoke_upgrade.sh | 30 ---- test/archive/smoke_upload.sh | 25 --- test/integration/integration_test.go | 2 +- test/smoke/smoke_test.go | 4 +- 106 files changed, 3 insertions(+), 2276 deletions(-) delete mode 100644 examples/footloose/.gitignore delete mode 100644 examples/footloose/README.md delete mode 100644 examples/footloose/cluster_custom_imagerepo.yaml delete mode 100644 examples/footloose/footloose.yaml delete mode 100644 examples/footloose/launchpad.example.yaml delete mode 100644 examples/multipass/README.md delete mode 100644 examples/multipass/cloud-init.yaml delete mode 100644 examples/multipass/launchpad.yml delete mode 100755 examples/multipass/startup.sh rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/.gitignore (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/.terraform.lock.hcl (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/README.md (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/iam.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/infra.tfvars.template (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/k8s.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/key.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/launchpad.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/main.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/mke.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/aws-ccm/iam.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/aws-ccm/main.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/aws-ccm/values.yaml (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/aws-ccm/variables.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/ebs-csi-driver/iam.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/ebs-csi-driver/main.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/modules/ebs-csi-driver/variables.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/output.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/platform.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/provision.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/sg.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/system.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/test.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/variables.tf (100%) rename examples/{tf-aws/launchpad-101 => terraform/aws-complete}/versions.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/.gitignore (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/.terraform.lock.hcl (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/README.md (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/key.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/launchpad.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/main.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/output.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/platform.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/provision.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/system.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/terraform.tfvars.template (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/variables.tf (100%) rename examples/{tf-aws/launchpad => terraform/aws-simple}/versions.tf (100%) delete mode 100644 examples/tf-aws/archive/.gitignore delete mode 100644 examples/tf-aws/archive/Makefile delete mode 100644 examples/tf-aws/archive/README.md delete mode 100644 examples/tf-aws/archive/main.tf delete mode 100644 examples/tf-aws/archive/modules/common/main.tf delete mode 100644 examples/tf-aws/archive/modules/common/outputs.tf delete mode 100644 examples/tf-aws/archive/modules/common/variables.tf delete mode 100644 examples/tf-aws/archive/modules/master/main.tf delete mode 100644 examples/tf-aws/archive/modules/master/outputs.tf delete mode 100644 examples/tf-aws/archive/modules/master/variables.tf delete mode 100644 examples/tf-aws/archive/modules/vpc/main.tf delete mode 100644 examples/tf-aws/archive/modules/vpc/outputs.tf delete mode 100644 examples/tf-aws/archive/modules/vpc/variables.tf delete mode 100644 examples/tf-aws/archive/modules/windows_worker/main.tf delete mode 100644 examples/tf-aws/archive/modules/windows_worker/outputs.tf delete mode 100644 examples/tf-aws/archive/modules/windows_worker/variables.tf delete mode 100644 examples/tf-aws/archive/modules/worker/main.tf delete mode 100644 examples/tf-aws/archive/modules/worker/outputs.tf delete mode 100644 examples/tf-aws/archive/modules/worker/variables.tf delete mode 100644 examples/tf-aws/archive/ssh_keys/.gitkeep delete mode 100644 examples/tf-aws/archive/terraform.tfvars.example delete mode 100644 examples/tf-aws/archive/variables.tf delete mode 100644 examples/tf-aws/archive/versions.tf delete mode 100644 examples/tf-hetzner/.gitignore delete mode 100644 examples/tf-hetzner/README.md delete mode 100644 examples/tf-hetzner/main.tf delete mode 100644 examples/tf-hetzner/terraform.tfvars.example delete mode 100644 test/archive/footloose-bastion.yaml.tpl delete mode 100644 test/archive/footloose-local.yaml.tpl delete mode 100644 test/archive/footloose-localrepo.yaml.tpl delete mode 100644 test/archive/footloose-msr.yaml.tpl delete mode 100644 test/archive/footloose-prune.yaml.tpl delete mode 100644 test/archive/footloose.yaml.tpl delete mode 100755 test/archive/fucktest.sh delete mode 100644 test/archive/launchpad-bastion.yaml delete mode 100644 test/archive/launchpad-forward.yaml delete mode 100644 test/archive/launchpad-local.yaml delete mode 100644 test/archive/launchpad-msr-beta.yaml delete mode 100644 test/archive/launchpad-msr.yaml delete mode 100644 test/archive/launchpad-prune.yaml delete mode 100644 test/archive/launchpad-upload.yaml delete mode 100644 test/archive/launchpad-v1beta1.yaml.tpl delete mode 100644 test/archive/launchpad-vxlan.yaml delete mode 100644 test/archive/launchpad.yaml delete mode 100644 test/archive/smoke.common.sh delete mode 100755 test/archive/smoke_apply.sh delete mode 100755 test/archive/smoke_apply_bastion.sh delete mode 100755 test/archive/smoke_apply_forward.sh delete mode 100755 test/archive/smoke_apply_local.sh delete mode 100755 test/archive/smoke_cleanup.sh delete mode 100755 test/archive/smoke_localrepo.sh delete mode 100755 test/archive/smoke_localrepo_reset.sh delete mode 100755 test/archive/smoke_prune.sh delete mode 100755 test/archive/smoke_register.sh delete mode 100755 test/archive/smoke_reset.sh delete mode 100755 test/archive/smoke_upgrade.sh delete mode 100755 test/archive/smoke_upload.sh diff --git a/examples/footloose/.gitignore b/examples/footloose/.gitignore deleted file mode 100644 index 36ec3c1d2..000000000 --- a/examples/footloose/.gitignore +++ /dev/null @@ -1 +0,0 @@ -launchpad.yaml diff --git a/examples/footloose/README.md b/examples/footloose/README.md deleted file mode 100644 index ba215180a..000000000 --- a/examples/footloose/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Testing launchpad with footloose - -[Footloose](https://github.com/weaveworks/footloose) creates containers that look like virtual machines. - -## Steps - -1. `footloose create` -2. `launchpad apply` -3. Profit :) - -## Note -If you are using Docker Desktop make sure that the Kubernetes feature is OFF. -When `footloose` spins up your MKE cluster it will automatically forward port 6443 on your host to port 6443 on your MKE manager. -If you are running Kubernetes locally via Docker Desktop this will fail, because port 6443 is already in use. diff --git a/examples/footloose/cluster_custom_imagerepo.yaml b/examples/footloose/cluster_custom_imagerepo.yaml deleted file mode 100644 index 110de9e2a..000000000 --- a/examples/footloose/cluster_custom_imagerepo.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: "launchpad.mirantis.com/mke/v1.2" -kind: mke -spec: - hosts: - - address: "127.0.0.1" - ssh: - port: 9022 - user: "root" - role: "manager" - - address: "127.0.0.1" - ssh: - port: 9023 - user: "root" - role: "worker" - mke: - version: 3.3.0-rc4 - # Use custom image repo, remember to set the REGISTRY_USERNAME & REGISTRY_PASSWORD envs - imageRepo: docker.io/dockereng - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - - --default-node-orchestrator=kubernetes diff --git a/examples/footloose/footloose.yaml b/examples/footloose/footloose.yaml deleted file mode 100644 index 0dbaad22b..000000000 --- a/examples/footloose/footloose.yaml +++ /dev/null @@ -1,46 +0,0 @@ -cluster: - name: mke - privateKey: ~/.ssh/id_rsa -machines: -- count: 1 - backend: docker - spec: - image: quay.io/footloose/ubuntu18.04 - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 443 - hostPort: 443 - - containerPort: 6443 - hostPort: 6443 -- count: 1 - backend: docker - spec: - image: quay.io/footloose/ubuntu18.04 - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - portMappings: - - containerPort: 22 - hostPort: 9022 diff --git a/examples/footloose/launchpad.example.yaml b/examples/footloose/launchpad.example.yaml deleted file mode 100644 index 69f929a2e..000000000 --- a/examples/footloose/launchpad.example.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: "launchpad.mirantis.com/mke/v1.4" -kind: mke+msr -spec: - hosts: - - role: "manager" - ssh: - address: "127.0.0.1" - port: 9022 - user: "root" - mcrConfig: &linuxEngineConfig - debug: true - log-opts: - max-size: 10m - max-file: "3" - hooks: - apply: - before: - - echo hello > foo.txt - after: - - rm foo.txt - - role: "msr" - ssh: - address: "127.0.0.1" - port: 9023 - user: "root" - mcrConfig: *linuxEngineConfig - mke: - adminUsername: admin - adminPassword: orcaorcaorca - installFlags: - - --default-node-orchestrator=kubernetes - msr: - version: 2.3.4 diff --git a/examples/multipass/README.md b/examples/multipass/README.md deleted file mode 100644 index a9407257c..000000000 --- a/examples/multipass/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Bootstrapping MKE cluster with Multipass - -This directory provides an example flow with Launchpad tool together with [Multipass](http://multipass.run/). - -## Steps - -1. Run `startup.sh` and the rest will happen on its own diff --git a/examples/multipass/cloud-init.yaml b/examples/multipass/cloud-init.yaml deleted file mode 100644 index c07c9d04f..000000000 --- a/examples/multipass/cloud-init.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -#cloud-config -ssh_authorized_keys: diff --git a/examples/multipass/launchpad.yml b/examples/multipass/launchpad.yml deleted file mode 100644 index 96349b58f..000000000 --- a/examples/multipass/launchpad.yml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: "launchpad.mirantis.com/mke/v1.2" -kind: mke -spec: - hosts: - - address: "192.168.64.10" - ssh: - user: "ubuntu" - role: "manager" - privateInterface: enp0s2 - - address: "192.168.64.11" - role: "worker" - ssh: - user: "ubuntu" - privateInterface: enp0s2 - mke: - adminUsername: admin - adminPassword: v3ryS3cret - installFlags: - - --default-node-orchestrator=kubernetes - - --force-minimums - - --pod-cidr=10.32.0.0/16 diff --git a/examples/multipass/startup.sh b/examples/multipass/startup.sh deleted file mode 100755 index 831f05c30..000000000 --- a/examples/multipass/startup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -echo "Spinning machines" -mykey=`cat ~/.ssh/id_rsa.pub` -echo " - " $mykey >> cloud-init.yaml -multipass launch 18.04 -n manager --mem 4G --disk 10G --cloud-init cloud-init.yaml -multipass launch 18.04 -n worker --mem 4G --disk 10G --cloud-init cloud-init.yaml -manager=`multipass info manager --format json | jq .info.manager.ipv4[0]` -sed -i "s/\"192.168.64.10\"/$manager/g" launchpad.yml - -worker=`multipass info worker --format json | jq .info.worker.ipv4[0]` -sed -i "s/\"192.168.64.11\"/$worker/g" launchpad.yml - -# make build -C ../../ - ../../bin/launchpad apply -c ./launchpad.yml diff --git a/examples/tf-aws/launchpad-101/.gitignore b/examples/terraform/aws-complete/.gitignore similarity index 100% rename from examples/tf-aws/launchpad-101/.gitignore rename to examples/terraform/aws-complete/.gitignore diff --git a/examples/tf-aws/launchpad-101/.terraform.lock.hcl b/examples/terraform/aws-complete/.terraform.lock.hcl similarity index 100% rename from examples/tf-aws/launchpad-101/.terraform.lock.hcl rename to examples/terraform/aws-complete/.terraform.lock.hcl diff --git a/examples/tf-aws/launchpad-101/README.md b/examples/terraform/aws-complete/README.md similarity index 100% rename from examples/tf-aws/launchpad-101/README.md rename to examples/terraform/aws-complete/README.md diff --git a/examples/tf-aws/launchpad-101/iam.tf b/examples/terraform/aws-complete/iam.tf similarity index 100% rename from examples/tf-aws/launchpad-101/iam.tf rename to examples/terraform/aws-complete/iam.tf diff --git a/examples/tf-aws/launchpad-101/infra.tfvars.template b/examples/terraform/aws-complete/infra.tfvars.template similarity index 100% rename from examples/tf-aws/launchpad-101/infra.tfvars.template rename to examples/terraform/aws-complete/infra.tfvars.template diff --git a/examples/tf-aws/launchpad-101/k8s.tf b/examples/terraform/aws-complete/k8s.tf similarity index 100% rename from examples/tf-aws/launchpad-101/k8s.tf rename to examples/terraform/aws-complete/k8s.tf diff --git a/examples/tf-aws/launchpad-101/key.tf b/examples/terraform/aws-complete/key.tf similarity index 100% rename from examples/tf-aws/launchpad-101/key.tf rename to examples/terraform/aws-complete/key.tf diff --git a/examples/tf-aws/launchpad-101/launchpad.tf b/examples/terraform/aws-complete/launchpad.tf similarity index 100% rename from examples/tf-aws/launchpad-101/launchpad.tf rename to examples/terraform/aws-complete/launchpad.tf diff --git a/examples/tf-aws/launchpad-101/main.tf b/examples/terraform/aws-complete/main.tf similarity index 100% rename from examples/tf-aws/launchpad-101/main.tf rename to examples/terraform/aws-complete/main.tf diff --git a/examples/tf-aws/launchpad-101/mke.tf b/examples/terraform/aws-complete/mke.tf similarity index 100% rename from examples/tf-aws/launchpad-101/mke.tf rename to examples/terraform/aws-complete/mke.tf diff --git a/examples/tf-aws/launchpad-101/modules/aws-ccm/iam.tf b/examples/terraform/aws-complete/modules/aws-ccm/iam.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/aws-ccm/iam.tf rename to examples/terraform/aws-complete/modules/aws-ccm/iam.tf diff --git a/examples/tf-aws/launchpad-101/modules/aws-ccm/main.tf b/examples/terraform/aws-complete/modules/aws-ccm/main.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/aws-ccm/main.tf rename to examples/terraform/aws-complete/modules/aws-ccm/main.tf diff --git a/examples/tf-aws/launchpad-101/modules/aws-ccm/values.yaml b/examples/terraform/aws-complete/modules/aws-ccm/values.yaml similarity index 100% rename from examples/tf-aws/launchpad-101/modules/aws-ccm/values.yaml rename to examples/terraform/aws-complete/modules/aws-ccm/values.yaml diff --git a/examples/tf-aws/launchpad-101/modules/aws-ccm/variables.tf b/examples/terraform/aws-complete/modules/aws-ccm/variables.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/aws-ccm/variables.tf rename to examples/terraform/aws-complete/modules/aws-ccm/variables.tf diff --git a/examples/tf-aws/launchpad-101/modules/ebs-csi-driver/iam.tf b/examples/terraform/aws-complete/modules/ebs-csi-driver/iam.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/ebs-csi-driver/iam.tf rename to examples/terraform/aws-complete/modules/ebs-csi-driver/iam.tf diff --git a/examples/tf-aws/launchpad-101/modules/ebs-csi-driver/main.tf b/examples/terraform/aws-complete/modules/ebs-csi-driver/main.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/ebs-csi-driver/main.tf rename to examples/terraform/aws-complete/modules/ebs-csi-driver/main.tf diff --git a/examples/tf-aws/launchpad-101/modules/ebs-csi-driver/variables.tf b/examples/terraform/aws-complete/modules/ebs-csi-driver/variables.tf similarity index 100% rename from examples/tf-aws/launchpad-101/modules/ebs-csi-driver/variables.tf rename to examples/terraform/aws-complete/modules/ebs-csi-driver/variables.tf diff --git a/examples/tf-aws/launchpad-101/output.tf b/examples/terraform/aws-complete/output.tf similarity index 100% rename from examples/tf-aws/launchpad-101/output.tf rename to examples/terraform/aws-complete/output.tf diff --git a/examples/tf-aws/launchpad-101/platform.tf b/examples/terraform/aws-complete/platform.tf similarity index 100% rename from examples/tf-aws/launchpad-101/platform.tf rename to examples/terraform/aws-complete/platform.tf diff --git a/examples/tf-aws/launchpad-101/provision.tf b/examples/terraform/aws-complete/provision.tf similarity index 100% rename from examples/tf-aws/launchpad-101/provision.tf rename to examples/terraform/aws-complete/provision.tf diff --git a/examples/tf-aws/launchpad-101/sg.tf b/examples/terraform/aws-complete/sg.tf similarity index 100% rename from examples/tf-aws/launchpad-101/sg.tf rename to examples/terraform/aws-complete/sg.tf diff --git a/examples/tf-aws/launchpad-101/system.tf b/examples/terraform/aws-complete/system.tf similarity index 100% rename from examples/tf-aws/launchpad-101/system.tf rename to examples/terraform/aws-complete/system.tf diff --git a/examples/tf-aws/launchpad-101/test.tf b/examples/terraform/aws-complete/test.tf similarity index 100% rename from examples/tf-aws/launchpad-101/test.tf rename to examples/terraform/aws-complete/test.tf diff --git a/examples/tf-aws/launchpad-101/variables.tf b/examples/terraform/aws-complete/variables.tf similarity index 100% rename from examples/tf-aws/launchpad-101/variables.tf rename to examples/terraform/aws-complete/variables.tf diff --git a/examples/tf-aws/launchpad-101/versions.tf b/examples/terraform/aws-complete/versions.tf similarity index 100% rename from examples/tf-aws/launchpad-101/versions.tf rename to examples/terraform/aws-complete/versions.tf diff --git a/examples/tf-aws/launchpad/.gitignore b/examples/terraform/aws-simple/.gitignore similarity index 100% rename from examples/tf-aws/launchpad/.gitignore rename to examples/terraform/aws-simple/.gitignore diff --git a/examples/tf-aws/launchpad/.terraform.lock.hcl b/examples/terraform/aws-simple/.terraform.lock.hcl similarity index 100% rename from examples/tf-aws/launchpad/.terraform.lock.hcl rename to examples/terraform/aws-simple/.terraform.lock.hcl diff --git a/examples/tf-aws/launchpad/README.md b/examples/terraform/aws-simple/README.md similarity index 100% rename from examples/tf-aws/launchpad/README.md rename to examples/terraform/aws-simple/README.md diff --git a/examples/tf-aws/launchpad/key.tf b/examples/terraform/aws-simple/key.tf similarity index 100% rename from examples/tf-aws/launchpad/key.tf rename to examples/terraform/aws-simple/key.tf diff --git a/examples/tf-aws/launchpad/launchpad.tf b/examples/terraform/aws-simple/launchpad.tf similarity index 100% rename from examples/tf-aws/launchpad/launchpad.tf rename to examples/terraform/aws-simple/launchpad.tf diff --git a/examples/tf-aws/launchpad/main.tf b/examples/terraform/aws-simple/main.tf similarity index 100% rename from examples/tf-aws/launchpad/main.tf rename to examples/terraform/aws-simple/main.tf diff --git a/examples/tf-aws/launchpad/output.tf b/examples/terraform/aws-simple/output.tf similarity index 100% rename from examples/tf-aws/launchpad/output.tf rename to examples/terraform/aws-simple/output.tf diff --git a/examples/tf-aws/launchpad/platform.tf b/examples/terraform/aws-simple/platform.tf similarity index 100% rename from examples/tf-aws/launchpad/platform.tf rename to examples/terraform/aws-simple/platform.tf diff --git a/examples/tf-aws/launchpad/provision.tf b/examples/terraform/aws-simple/provision.tf similarity index 100% rename from examples/tf-aws/launchpad/provision.tf rename to examples/terraform/aws-simple/provision.tf diff --git a/examples/tf-aws/launchpad/system.tf b/examples/terraform/aws-simple/system.tf similarity index 100% rename from examples/tf-aws/launchpad/system.tf rename to examples/terraform/aws-simple/system.tf diff --git a/examples/tf-aws/launchpad/terraform.tfvars.template b/examples/terraform/aws-simple/terraform.tfvars.template similarity index 100% rename from examples/tf-aws/launchpad/terraform.tfvars.template rename to examples/terraform/aws-simple/terraform.tfvars.template diff --git a/examples/tf-aws/launchpad/variables.tf b/examples/terraform/aws-simple/variables.tf similarity index 100% rename from examples/tf-aws/launchpad/variables.tf rename to examples/terraform/aws-simple/variables.tf diff --git a/examples/tf-aws/launchpad/versions.tf b/examples/terraform/aws-simple/versions.tf similarity index 100% rename from examples/tf-aws/launchpad/versions.tf rename to examples/terraform/aws-simple/versions.tf diff --git a/examples/tf-aws/archive/.gitignore b/examples/tf-aws/archive/.gitignore deleted file mode 100644 index 874888b5e..000000000 --- a/examples/tf-aws/archive/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -ssh_keys/*.pem -.terraform/ -cluster.yaml -*terraform.tfstate* -terraform.tfvars diff --git a/examples/tf-aws/archive/Makefile b/examples/tf-aws/archive/Makefile deleted file mode 100644 index 23d02bbf9..000000000 --- a/examples/tf-aws/archive/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - -build-infra: - terraform init - terraform apply -auto-approve - terraform output -json | yq r --prettyPrint - ucp_cluster.value > launchpad.yaml - cat launchpad.yaml -teardown-infra: - terraform destroy - rm launchpad.yaml diff --git a/examples/tf-aws/archive/README.md b/examples/tf-aws/archive/README.md deleted file mode 100644 index 91c31938e..000000000 --- a/examples/tf-aws/archive/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Bootstrapping MKE cluster on AWS - -This directory provides an example flow with Launchpad tool together with Terraform. - -## Steps - -1. Create terraform.tfvars file with needed details. You can use the provided terraform.tfvars.example as a baseline. -2. `terraform init` -3. `terraform apply` -4. `terraform output mke_cluster | launchpad apply` -5. Profit! :) - diff --git a/examples/tf-aws/archive/main.tf b/examples/tf-aws/archive/main.tf deleted file mode 100644 index 4e2893b76..000000000 --- a/examples/tf-aws/archive/main.tf +++ /dev/null @@ -1,113 +0,0 @@ -provider "aws" { - region = var.aws_region -} - -module "vpc" { - source = "./modules/vpc" - cluster_name = var.cluster_name - host_cidr = var.vpc_cidr -} - -module "common" { - source = "./modules/common" - cluster_name = var.cluster_name - vpc_id = module.vpc.id -} - -module "masters" { - source = "./modules/master" - master_count = var.master_count - vpc_id = module.vpc.id - cluster_name = var.cluster_name - subnet_ids = module.vpc.public_subnet_ids - security_group_id = module.common.security_group_id - image_id = module.common.image_id - kube_cluster_tag = module.common.kube_cluster_tag - ssh_key = var.cluster_name - instance_profile_name = module.common.instance_profile_name -} - -module "workers" { - source = "./modules/worker" - worker_count = var.worker_count - vpc_id = module.vpc.id - cluster_name = var.cluster_name - subnet_ids = module.vpc.public_subnet_ids - security_group_id = module.common.security_group_id - image_id = module.common.image_id - kube_cluster_tag = module.common.kube_cluster_tag - ssh_key = var.cluster_name - instance_profile_name = module.common.instance_profile_name - worker_type = var.worker_type -} - -module "windows_workers" { - source = "./modules/windows_worker" - worker_count = var.windows_worker_count - vpc_id = module.vpc.id - cluster_name = var.cluster_name - subnet_ids = module.vpc.public_subnet_ids - security_group_id = module.common.security_group_id - image_id = module.common.windows_2019_image_id - kube_cluster_tag = module.common.kube_cluster_tag - instance_profile_name = module.common.instance_profile_name - worker_type = var.worker_type - windows_administrator_password = var.windows_administrator_password -} - -locals { - managers = [ - for host in module.masters.machines : { - address = host.public_ip - ssh = { - user = "ubuntu" - keyPath = "./ssh_keys/${var.cluster_name}.pem" - } - role = host.tags["Role"] - privateInterface = "ens5" - } - ] - workers = [ - for host in module.workers.machines : { - address = host.public_ip - ssh = { - user = "ubuntu" - keyPath = "./ssh_keys/${var.cluster_name}.pem" - } - role = host.tags["Role"] - privateInterface = "ens5" - } - ] - windows_workers = [ - for host in module.windows_workers.machines : { - address = host.public_ip - winRM = { - user = "Administrator" - password = var.windows_administrator_password - useHTTPS = true - insecure = true - } - role = host.tags["Role"] - privateInterface = "Ethernet 2" - } - ] -} - - -output "ucp_cluster" { - value = { - apiVersion = "launchpad.mirantis.com/mke/v1.2" - kind = "mke" - spec = { - ucp = { - installFlags: [ - "--admin-username=admin", - "--admin-password=${var.admin_password}", - "--default-node-orchestrator=kubernetes", - "--san=${module.masters.lb_dns_name}", - ] - } - hosts = concat(local.managers, local.workers, local.windows_workers) - } - } -} diff --git a/examples/tf-aws/archive/modules/common/main.tf b/examples/tf-aws/archive/modules/common/main.tf deleted file mode 100644 index fd202e00c..000000000 --- a/examples/tf-aws/archive/modules/common/main.tf +++ /dev/null @@ -1,144 +0,0 @@ - -data "aws_availability_zones" "available" {} - -resource "tls_private_key" "ssh_key" { - algorithm = "RSA" - rsa_bits = "4096" -} - -resource "local_file" "ssh_public_key" { - content = tls_private_key.ssh_key.private_key_pem - filename = "ssh_keys/${var.cluster_name}.pem" - provisioner "local-exec" { - command = "chmod 0600 ${local_file.ssh_public_key.filename}" - } -} - -resource "aws_key_pair" "key" { - key_name = var.cluster_name - public_key = tls_private_key.ssh_key.public_key_openssh -} - -data "aws_ami" "ubuntu" { - most_recent = true - - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } - - owners = ["099720109477"] # Canonical -} - -data "aws_ami" "windows_2019" { - most_recent = true - - filter { - name = "name" - values = ["Windows_Server-2019-English-Core-ContainersLatest-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } - - owners = ["801119661308"] # Amazon -} - -resource "aws_security_group" "common" { - name = "${var.cluster_name}-common" - description = "ucp cluster common rules" - vpc_id = var.vpc_id - - ingress { - from_port = 0 - to_port = 0 - protocol = "-1" - self = true - } - - ingress { - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_iam_role" "role" { - name = "${var.cluster_name}_host" - - assume_role_policy = < /etc/hostname -sed -i "s|\(127\.0\..\.. *\)localhost|\1$HOSTNAME|" /etc/hosts -hostname $HOSTNAME -EOF - - lifecycle { - ignore_changes = [ami] - } - - root_block_device { - volume_type = "gp2" - volume_size = var.master_volume_size - } -} - -resource "aws_lb" "ucp_master" { - name = "${var.cluster_name}-master-lb" - internal = false - load_balancer_type = "network" - subnets = var.subnet_ids - - tags = { - Cluster = var.cluster_name - } -} - -resource "aws_lb_target_group" "ucp_master_api" { - name = "${var.cluster_name}-api" - port = 443 - protocol = "TCP" - vpc_id = var.vpc_id -} - -resource "aws_lb_listener" "ucp_master_api" { - load_balancer_arn = aws_lb.ucp_master.arn - port = 443 - protocol = "TCP" - - default_action { - target_group_arn = aws_lb_target_group.ucp_master_api.arn - type = "forward" - } -} - -resource "aws_lb_target_group_attachment" "ucp_master_api" { - count = var.master_count - target_group_arn = aws_lb_target_group.ucp_master_api.arn - target_id = aws_instance.ucp_master[count.index].id - port = 443 -} - -resource "aws_lb_target_group" "ucp_kube_api" { - name = "${var.cluster_name}-kube-api" - port = 6443 - protocol = "TCP" - vpc_id = var.vpc_id -} - -resource "aws_lb_listener" "ucp_kube_api" { - load_balancer_arn = aws_lb.ucp_master.arn - port = 6443 - protocol = "TCP" - - default_action { - target_group_arn = aws_lb_target_group.ucp_kube_api.arn - type = "forward" - } -} - -resource "aws_lb_target_group_attachment" "ucp_kube_api" { - count = var.master_count - target_group_arn = aws_lb_target_group.ucp_kube_api.arn - target_id = aws_instance.ucp_master[count.index].id - port = 6443 -} diff --git a/examples/tf-aws/archive/modules/master/outputs.tf b/examples/tf-aws/archive/modules/master/outputs.tf deleted file mode 100644 index cdc5a3451..000000000 --- a/examples/tf-aws/archive/modules/master/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "lb_dns_name" { - value = aws_lb.ucp_master.dns_name -} - -output "public_ips" { - value = aws_instance.ucp_master.*.public_ip -} - -output "private_ips" { - value = aws_instance.ucp_master.*.private_ip -} - -output "machines" { - value = aws_instance.ucp_master -} diff --git a/examples/tf-aws/archive/modules/master/variables.tf b/examples/tf-aws/archive/modules/master/variables.tf deleted file mode 100644 index 05c60639a..000000000 --- a/examples/tf-aws/archive/modules/master/variables.tf +++ /dev/null @@ -1,31 +0,0 @@ -variable "cluster_name" {} - -variable "vpc_id" {} - -variable "instance_profile_name" {} - -variable "security_group_id" {} - -variable "subnet_ids" { - type = list(string) -} - -variable "image_id" {} - -variable "kube_cluster_tag" {} - -variable "ssh_key" { - description = "SSH key name" -} - -variable "master_count" { - default = 3 -} - -variable "master_type" { - default = "m5.large" -} - -variable "master_volume_size" { - default = 100 -} diff --git a/examples/tf-aws/archive/modules/vpc/main.tf b/examples/tf-aws/archive/modules/vpc/main.tf deleted file mode 100644 index 96be07aa8..000000000 --- a/examples/tf-aws/archive/modules/vpc/main.tf +++ /dev/null @@ -1,53 +0,0 @@ -data "aws_availability_zones" "all" {} - -# Network VPC, gateway, and routes - -resource "aws_vpc" "network" { - cidr_block = var.host_cidr - assign_generated_ipv6_cidr_block = true - enable_dns_support = true - enable_dns_hostnames = true - - tags = map("Name", "${var.cluster_name}") -} - -resource "aws_internet_gateway" "gateway" { - vpc_id = aws_vpc.network.id - - tags = map("Name", "${var.cluster_name}") -} - -resource "aws_route_table" "default" { - vpc_id = aws_vpc.network.id - - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.gateway.id - } - - tags = map("Name", "${var.cluster_name}") -} - -locals { - kube_cluster_tag = "kubernetes.io/cluster/${var.cluster_name}" -} - - -# Subnets (one per availability zone) -resource "aws_subnet" "public" { - count = 2 - - vpc_id = aws_vpc.network.id - availability_zone = data.aws_availability_zones.all.names[count.index] - - cidr_block = cidrsubnet(var.host_cidr, 8, count.index) - map_public_ip_on_launch = true - - tags = map(local.kube_cluster_tag, "true") -} - -resource "aws_route_table_association" "public" { - count = length(aws_subnet.public) - route_table_id = aws_route_table.default.id - subnet_id = element(aws_subnet.public.*.id, count.index) -} diff --git a/examples/tf-aws/archive/modules/vpc/outputs.tf b/examples/tf-aws/archive/modules/vpc/outputs.tf deleted file mode 100644 index 024cfd3a4..000000000 --- a/examples/tf-aws/archive/modules/vpc/outputs.tf +++ /dev/null @@ -1,7 +0,0 @@ -output "id" { - value = aws_vpc.network.id -} - -output "public_subnet_ids" { - value = aws_subnet.public.*.id -} diff --git a/examples/tf-aws/archive/modules/vpc/variables.tf b/examples/tf-aws/archive/modules/vpc/variables.tf deleted file mode 100644 index 9d6f930ef..000000000 --- a/examples/tf-aws/archive/modules/vpc/variables.tf +++ /dev/null @@ -1,6 +0,0 @@ -variable "cluster_name" {} - -variable "host_cidr" { - description = "CIDR IPv4 range to assign to EC2 nodes" - default = "172.31.0.0/16" -} diff --git a/examples/tf-aws/archive/modules/windows_worker/main.tf b/examples/tf-aws/archive/modules/windows_worker/main.tf deleted file mode 100644 index b4059d6f6..000000000 --- a/examples/tf-aws/archive/modules/windows_worker/main.tf +++ /dev/null @@ -1,105 +0,0 @@ -resource "aws_security_group" "worker" { - name = "${var.cluster_name}-win-workers" - description = "ucp cluster windows workers" - vpc_id = var.vpc_id - - ingress { - from_port = 5985 - to_port = 5986 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } -} - -locals { - subnet_count = length(var.subnet_ids) -} - -resource "aws_instance" "ucp_worker" { - count = var.worker_count - - tags = map( - "Name", "${var.cluster_name}-win-worker-${count.index + 1}", - "Role", "worker", - "${var.kube_cluster_tag}", "shared" - ) - - instance_type = var.worker_type - iam_instance_profile = var.instance_profile_name - ami = var.image_id - vpc_security_group_ids = [var.security_group_id, aws_security_group.worker.id] - subnet_id = var.subnet_ids[count.index % local.subnet_count] - ebs_optimized = true - user_data = < -$admin = [adsi]("WinNT://./administrator, user") -$admin.psbase.invoke("SetPassword", "${var.windows_administrator_password}") - -# Snippet to enable WinRM over HTTPS with a self-signed certificate -# from https://gist.github.com/TechIsCool/d65017b8427cfa49d579a6d7b6e03c93 -Write-Output "Disabling WinRM over HTTP..." -Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -Get-ChildItem WSMan:\Localhost\listener | Remove-Item -Recurse - -Write-Output "Configuring WinRM for HTTPS..." -Set-Item -Path WSMan:\LocalHost\MaxTimeoutms -Value '1800000' -Set-Item -Path WSMan:\LocalHost\Shell\MaxMemoryPerShellMB -Value '1024' -Set-Item -Path WSMan:\LocalHost\Service\AllowUnencrypted -Value 'false' -Set-Item -Path WSMan:\LocalHost\Service\Auth\Basic -Value 'true' -Set-Item -Path WSMan:\LocalHost\Service\Auth\CredSSP -Value 'true' - -New-NetFirewallRule -Name "WINRM-HTTPS-In-TCP" ` - -DisplayName "Windows Remote Management (HTTPS-In)" ` - -Description "Inbound rule for Windows Remote Management via WS-Management. [TCP 5986]" ` - -Group "Windows Remote Management" ` - -Program "System" ` - -Protocol TCP ` - -LocalPort "5986" ` - -Action Allow ` - -Profile Domain,Private - -New-NetFirewallRule -Name "WINRM-HTTPS-In-TCP-PUBLIC" ` - -DisplayName "Windows Remote Management (HTTPS-In)" ` - -Description "Inbound rule for Windows Remote Management via WS-Management. [TCP 5986]" ` - -Group "Windows Remote Management" ` - -Program "System" ` - -Protocol TCP ` - -LocalPort "5986" ` - -Action Allow ` - -Profile Public - -$Hostname = [System.Net.Dns]::GetHostByName((hostname)).HostName.ToUpper() -$pfx = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName $Hostname -$certThumbprint = $pfx.Thumbprint -$certSubjectName = $pfx.SubjectName.Name.TrimStart("CN = ").Trim() - -New-Item -Path WSMan:\LocalHost\Listener -Address * -Transport HTTPS -Hostname $certSubjectName -CertificateThumbPrint $certThumbprint -Port "5986" -force - -Write-Output "Restarting WinRM Service..." -Stop-Service WinRM -Set-Service WinRM -StartupType "Automatic" -Start-Service WinRM - -EOF - - - lifecycle { - ignore_changes = [ami] - } - - root_block_device { - volume_type = "gp2" - volume_size = var.worker_volume_size - } - - connection { - type = "winrm" - user = "Administrator" - password = var.administrator_password - timeout = "10m" - https = "true" - insecure = "true" - port=5986 - } -} diff --git a/examples/tf-aws/archive/modules/windows_worker/outputs.tf b/examples/tf-aws/archive/modules/windows_worker/outputs.tf deleted file mode 100644 index 0eccfe6dd..000000000 --- a/examples/tf-aws/archive/modules/windows_worker/outputs.tf +++ /dev/null @@ -1,6 +0,0 @@ -output "private_ips" { - value = aws_instance.ucp_worker.*.private_ip -} -output "machines" { - value = aws_instance.ucp_worker.* -} diff --git a/examples/tf-aws/archive/modules/windows_worker/variables.tf b/examples/tf-aws/archive/modules/windows_worker/variables.tf deleted file mode 100644 index 910fbcd57..000000000 --- a/examples/tf-aws/archive/modules/windows_worker/variables.tf +++ /dev/null @@ -1,30 +0,0 @@ -variable "cluster_name" {} - -variable "vpc_id" {} - -variable "instance_profile_name" {} - -variable "security_group_id" {} - -variable "subnet_ids" { - type = list(string) -} - -variable "image_id" {} - -variable "kube_cluster_tag" {} - -variable "worker_count" { - default = 0 -} - -variable "worker_type" { - default = "m5.large" -} - -variable "worker_volume_size" { - default = 100 -} - -variable "windows_administrator_password" { -} diff --git a/examples/tf-aws/archive/modules/worker/main.tf b/examples/tf-aws/archive/modules/worker/main.tf deleted file mode 100644 index 14b04ff37..000000000 --- a/examples/tf-aws/archive/modules/worker/main.tf +++ /dev/null @@ -1,45 +0,0 @@ -resource "aws_security_group" "worker" { - name = "${var.cluster_name}-workers" - description = "ucp cluster workers" - vpc_id = var.vpc_id -} - -locals { - subnet_count = length(var.subnet_ids) -} - - -resource "aws_instance" "ucp_worker" { - count = var.worker_count - - tags = map( - "Name", "${var.cluster_name}-worker-${count.index + 1}", - "Role", "worker", - "${var.kube_cluster_tag}", "shared" - ) - - instance_type = var.worker_type - iam_instance_profile = var.instance_profile_name - ami = var.image_id - key_name = var.ssh_key - vpc_security_group_ids = [var.security_group_id, aws_security_group.worker.id] - subnet_id = var.subnet_ids[count.index % local.subnet_count] - ebs_optimized = true - user_data = < /etc/hostname -sed -i "s|\(127\.0\..\.. *\)localhost|\1$HOSTNAME|" /etc/hosts -hostname $HOSTNAME -EOF - - lifecycle { - ignore_changes = [ami] - } - - root_block_device { - volume_type = "gp2" - volume_size = var.worker_volume_size - } -} diff --git a/examples/tf-aws/archive/modules/worker/outputs.tf b/examples/tf-aws/archive/modules/worker/outputs.tf deleted file mode 100644 index 0eccfe6dd..000000000 --- a/examples/tf-aws/archive/modules/worker/outputs.tf +++ /dev/null @@ -1,6 +0,0 @@ -output "private_ips" { - value = aws_instance.ucp_worker.*.private_ip -} -output "machines" { - value = aws_instance.ucp_worker.* -} diff --git a/examples/tf-aws/archive/modules/worker/variables.tf b/examples/tf-aws/archive/modules/worker/variables.tf deleted file mode 100644 index c7adf2371..000000000 --- a/examples/tf-aws/archive/modules/worker/variables.tf +++ /dev/null @@ -1,31 +0,0 @@ -variable "cluster_name" {} - -variable "vpc_id" {} - -variable "instance_profile_name" {} - -variable "security_group_id" {} - -variable "subnet_ids" { - type = list(string) -} - -variable "image_id" {} - -variable "kube_cluster_tag" {} - -variable "ssh_key" { - description = "SSH key name" -} - -variable "worker_count" { - default = 3 -} - -variable "worker_type" { - default = "m5.large" -} - -variable "worker_volume_size" { - default = 100 -} diff --git a/examples/tf-aws/archive/ssh_keys/.gitkeep b/examples/tf-aws/archive/ssh_keys/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/tf-aws/archive/terraform.tfvars.example b/examples/tf-aws/archive/terraform.tfvars.example deleted file mode 100644 index 7e1847e7a..000000000 --- a/examples/tf-aws/archive/terraform.tfvars.example +++ /dev/null @@ -1,5 +0,0 @@ -cluster_name = "my-ucp-cluster" -master_count = 1 -worker_count = 3 -windows_worker_count = 0 -admin_password = "orcaorcaorca" diff --git a/examples/tf-aws/archive/variables.tf b/examples/tf-aws/archive/variables.tf deleted file mode 100644 index bd433e492..000000000 --- a/examples/tf-aws/archive/variables.tf +++ /dev/null @@ -1,48 +0,0 @@ -variable "cluster_name" { - default = "ucp" -} - -variable "aws_region" { - default = "eu-north-1" -} - -variable "vpc_cidr" { - default = "172.31.0.0/16" -} - -variable "admin_password" { - default = "ucp-ftw!!!" -} - - -variable "master_count" { - default = 1 -} - -variable "worker_count" { - default = 3 -} - -variable "windows_worker_count" { - default = 0 -} - -variable "master_type" { - default = "m5.large" -} - -variable "worker_type" { - default = "m5.large" -} - -variable "master_volume_size" { - default = 100 -} - -variable "worker_volume_size" { - default = 100 -} - -variable "windows_administrator_password" { -} - diff --git a/examples/tf-aws/archive/versions.tf b/examples/tf-aws/archive/versions.tf deleted file mode 100644 index ac97c6ac8..000000000 --- a/examples/tf-aws/archive/versions.tf +++ /dev/null @@ -1,4 +0,0 @@ - -terraform { - required_version = ">= 0.12" -} diff --git a/examples/tf-hetzner/.gitignore b/examples/tf-hetzner/.gitignore deleted file mode 100644 index 5ae5c7d1a..000000000 --- a/examples/tf-hetzner/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.terraform/ -terraform.tfvars -terraform.tfstate -terraform.tfstate.backup -cluster.yaml diff --git a/examples/tf-hetzner/README.md b/examples/tf-hetzner/README.md deleted file mode 100644 index 6e1f62253..000000000 --- a/examples/tf-hetzner/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Bootstrapping MKE cluster on Hetzner - -This directory provides an example flow with Launchpad tool together with Terraform. - -## Steps - -1. Create terraform.tfvars file with needed details. You can use the provided terraform.tfvars.example as a baseline. -2. `terraform init` -3. `terraform apply` -4. `terraform output mke_cluster | launchpad apply` -5. Profit! :) - diff --git a/examples/tf-hetzner/main.tf b/examples/tf-hetzner/main.tf deleted file mode 100644 index 24d80989f..000000000 --- a/examples/tf-hetzner/main.tf +++ /dev/null @@ -1,85 +0,0 @@ -variable "hcloud_token" { - description = "Hetzner API token" -} - -provider "hcloud" { - token = "${var.hcloud_token}" -} - -variable "ssh_keys" { - default = [] -} - -variable "ssh_user" { - default = "root" -} - -variable "cluster_name" { - default = "ucp" -} - -variable "location" { - default = "hel1" -} - -variable "image" { - default = "ubuntu-18.04" -} - -variable "master_type" { - default = "cx31" -} - -variable "worker_count" { - default = 1 -} - -variable "master_count" { - default = 1 -} - -variable "worker_type" { - default = "cx31" -} - -resource "hcloud_server" "master" { - count = "${var.master_count}" - name = "${var.cluster_name}-master-${count.index}" - image = "${var.image}" - server_type = "${var.master_type}" - ssh_keys = "${var.ssh_keys}" - location = "${var.location}" - labels = { - role = "manager" - } -} - -resource "hcloud_server" "worker" { - count = "${var.worker_count}" - name = "${var.cluster_name}-worker-${count.index}" - image = "${var.image}" - server_type = "${var.worker_type}" - ssh_keys = "${var.ssh_keys}" - location = "${var.location}" - labels = { - role = "worker" - } -} - -output "ucp_cluster" { - value = { - apiVersion = "launchpad.mirantis.com/mke/v1.2" - kind = "mke" - spec = { - hosts = [ - for host in concat(hcloud_server.master, hcloud_server.worker) : { - address = host.ipv4_address - ssh = { - user = var.ssh_user - } - role = host.labels.role - } - ] - } - } -} diff --git a/examples/tf-hetzner/terraform.tfvars.example b/examples/tf-hetzner/terraform.tfvars.example deleted file mode 100644 index f1f92b658..000000000 --- a/examples/tf-hetzner/terraform.tfvars.example +++ /dev/null @@ -1,9 +0,0 @@ -ssh_keys = ["you@domain.com"] -hcloud_token = "your-api-token" -cluster_name = "ucp" -location = "hel1" -image = "ubuntu-18.04" -master_type = "cx31" -master_count = 3 -worker_type = "cx31" -worker_count = 3 \ No newline at end of file diff --git a/test/archive/footloose-bastion.yaml.tpl b/test/archive/footloose-bastion.yaml.tpl deleted file mode 100644 index f558e5572..000000000 --- a/test/archive/footloose-bastion.yaml.tpl +++ /dev/null @@ -1,70 +0,0 @@ -cluster: - name: mke - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9122 -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9122 -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: bastion%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: bind - source: $SMOKE_DIR - destination: /launchpad - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 diff --git a/test/archive/footloose-local.yaml.tpl b/test/archive/footloose-local.yaml.tpl deleted file mode 100644 index 8b60747ec..000000000 --- a/test/archive/footloose-local.yaml.tpl +++ /dev/null @@ -1,54 +0,0 @@ -cluster: - name: mke - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: bind - source: $SMOKE_DIR - destination: /launchpad - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 443 - hostPort: 443 - - containerPort: 6443 - hostPort: 6443 -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - diff --git a/test/archive/footloose-localrepo.yaml.tpl b/test/archive/footloose-localrepo.yaml.tpl deleted file mode 100644 index e1807f99c..000000000 --- a/test/archive/footloose-localrepo.yaml.tpl +++ /dev/null @@ -1,25 +0,0 @@ -cluster: - name: pusher - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: pusher%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9122 diff --git a/test/archive/footloose-msr.yaml.tpl b/test/archive/footloose-msr.yaml.tpl deleted file mode 100644 index 794c29655..000000000 --- a/test/archive/footloose-msr.yaml.tpl +++ /dev/null @@ -1,73 +0,0 @@ -cluster: - name: mke - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 443 - hostPort: 443 - - containerPort: 6443 - hostPort: 6443 -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 -- count: 2 - backend: docker - spec: - image: $LINUX_IMAGE - name: msr%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 444 - hostPort: 442 diff --git a/test/archive/footloose-prune.yaml.tpl b/test/archive/footloose-prune.yaml.tpl deleted file mode 100644 index a26a8aa0e..000000000 --- a/test/archive/footloose-prune.yaml.tpl +++ /dev/null @@ -1,50 +0,0 @@ -cluster: - name: mke - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 443 - hostPort: 443 - - containerPort: 6443 - hostPort: 6443 -- count: 2 - backend: docker - spec: - image: $LINUX_IMAGE - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 diff --git a/test/archive/footloose.yaml.tpl b/test/archive/footloose.yaml.tpl deleted file mode 100644 index 0d055b2d1..000000000 --- a/test/archive/footloose.yaml.tpl +++ /dev/null @@ -1,50 +0,0 @@ -cluster: - name: mke - privateKey: ./id_rsa_launchpad -machines: -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: manager%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 - - containerPort: 443 - hostPort: 443 - - containerPort: 6443 - hostPort: 6443 -- count: 1 - backend: docker - spec: - image: $LINUX_IMAGE - name: worker%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: volume - destination: /var/lib/containerd - - type: volume - destination: /var/lib/docker - - type: volume - destination: /var/lib/kubelet - networks: - - footloose-cluster - portMappings: - - containerPort: 22 - hostPort: 9022 diff --git a/test/archive/fucktest.sh b/test/archive/fucktest.sh deleted file mode 100755 index b41e9cfe8..000000000 --- a/test/archive/fucktest.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -export LINUX_IMAGE=${LINUX_IMAGE:-"quay.io/footloose/ubuntu18.04"} -echo "Setting up a temporary footloose machine for pushing images" -envsubst < footloose-localrepo.yaml.tpl > footloose-localrepo.yaml -FLOPT="--config footloose-localrepo.yaml" -footloose create $FLOPT -footloose ssh $FLOPT root@pusher0 -- \ - 'apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils && \ - curl -fsSL https://get.docker.com | DEBIAN_FRONTEND=noninteractive bash -s && \ - mkdir -p /etc/docker && \ - echo "{ \"insecure-registries\":[\"172.16.86.100:5000\"] }" > /etc/docker/daemon.json && \ - service docker restart' - diff --git a/test/archive/launchpad-bastion.yaml b/test/archive/launchpad-bastion.yaml deleted file mode 100644 index 814552360..000000000 --- a/test/archive/launchpad-bastion.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.4 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - ssh: - address: "$MANAGER_IP" - keyPath: "./id_rsa_launchpad" - user: launchpad - bastion: &bastion - address: 127.0.0.1 - keyPath: "./id_rsa_launchpad" - port: "$BASTION_PORT" - role: "manager" - - ssh: - address: "$WORKER_IP" - keyPath: "./id_rsa_launchpad" - user: launchpad - bastion: - *bastion - role: "worker" - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION diff --git a/test/archive/launchpad-forward.yaml b/test/archive/launchpad-forward.yaml deleted file mode 100644 index 57d24706b..000000000 --- a/test/archive/launchpad-forward.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.4 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - role: manager - ssh: - address: "$MANAGER_IP" - user: launchpad - - role: worker - ssh: - address: "$WORKER_IP" - user: launchpad - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION diff --git a/test/archive/launchpad-local.yaml b/test/archive/launchpad-local.yaml deleted file mode 100644 index 7a50a8bb5..000000000 --- a/test/archive/launchpad-local.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.2 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - localhost: true - role: "manager" - - address: "$WORKER_IP" - ssh: - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION - diff --git a/test/archive/launchpad-msr-beta.yaml b/test/archive/launchpad-msr-beta.yaml deleted file mode 100644 index 386573c1c..000000000 --- a/test/archive/launchpad-msr-beta.yaml +++ /dev/null @@ -1,64 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.4 -kind: mke+msr -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - ssh: - address: 127.0.0.1 - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - mcrConfig: &engineCfg - "insecure-registries": - - 172.16.86.100:5000 - - ssh: - address: 127.0.0.1 - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - mcrConfig: *engineCfg - - ssh: - address: 127.0.0.1 - port: 9024 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "msr" - mcrConfig: *engineCfg - - ssh: - address: 127.0.0.1 - port: 9025 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "msr" - mcrConfig: *engineCfg - cluster: - prune: false - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - enable_admin_ucp_scheduling = true - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - upgradeFlags: - - --force-minimums - - --force-recent-backup - mcr: - version: $MCR_VERSION - msr: - version: $MSR_VERSION - imageRepo: $MSR_IMAGE_REPO - installFlags: - - --ucp-url $MKE_MANAGER_IP - - --ucp-insecure-tls - - --replica-http-port 81 - - --replica-https-port 444 - upgradeFlags: - - --debug - replicaIDs: sequential diff --git a/test/archive/launchpad-msr.yaml b/test/archive/launchpad-msr.yaml deleted file mode 100644 index df6bef882..000000000 --- a/test/archive/launchpad-msr.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.2 -kind: mke+msr -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - ssh: - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - mcrConfig: &engineCfg - "insecure-registries": - - 172.16.86.100:5000 - - address: "127.0.0.1" - ssh: - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - mcrConfig: *engineCfg - - address: "127.0.0.1" - ssh: - port: 9024 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "msr" - mcrConfig: *engineCfg - - address: "127.0.0.1" - ssh: - port: 9025 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "msr" - mcrConfig: *engineCfg - cluster: - prune: false - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - enable_admin_ucp_scheduling = true - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION - msr: - version: $MSR_VERSION - imageRepo: $MSR_IMAGE_REPO - installFlags: - - --ucp-url $MKE_MANAGER_IP - - --ucp-insecure-tls - - --replica-http-port 81 - - --replica-https-port 444 - replicaIDs: sequential diff --git a/test/archive/launchpad-prune.yaml b/test/archive/launchpad-prune.yaml deleted file mode 100644 index 68380e47d..000000000 --- a/test/archive/launchpad-prune.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.4 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - ssh: - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - address: 127.0.0.1 - role: "manager" - mcrConfig: &engineCfg - "insecure-registries": - - 172.16.86.100:5000 - hooks: - apply: - before: - - echo "hello" > test.txt - after: - - rm test.txt - - ssh: - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - address: 127.0.0.1 - role: "worker" - mcrConfig: &engineCfg - - ssh: # REMOVE_THIS - port: 9024 # REMOVE_THIS - keyPath: "./id_rsa_launchpad" # REMOVE_THIS - user: "launchpad" # REMOVE_THIS - address: 127.0.0.1 # REMOVE_THIS - role: "worker" # REMOVE_THIS - mcrConfig: &engineCfg # REMOVE_THIS - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION - diff --git a/test/archive/launchpad-upload.yaml b/test/archive/launchpad-upload.yaml deleted file mode 100644 index 401a86a8d..000000000 --- a/test/archive/launchpad-upload.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.2 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - ssh: - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - imageDir: ./images/ - - address: "127.0.0.1" - ssh: - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - imageDir: ./images/ - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION - diff --git a/test/archive/launchpad-v1beta1.yaml.tpl b/test/archive/launchpad-v1beta1.yaml.tpl deleted file mode 100644 index f7f9d4fdc..000000000 --- a/test/archive/launchpad-v1beta1.yaml.tpl +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: launchpad.mirantis.com/v1beta1 -kind: UCP -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - sshPort: 9022 - sshKeyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - - address: "127.0.0.1" - sshPort: 9023 - sshKeyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - ucp: - version: $MKE_VERSION - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - engine: - version: $MCR_VERSION diff --git a/test/archive/launchpad-vxlan.yaml b/test/archive/launchpad-vxlan.yaml deleted file mode 100644 index 8c086440a..000000000 --- a/test/archive/launchpad-vxlan.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.2 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - ssh: - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - mcrConfig: &engineCfg - "insecure-registries": - - 172.16.86.100:5000 - - address: "127.0.0.1" - ssh: - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - mcrConfig: *engineCfg - mke: - version: $MKE_VERSION - adminUsername: admin - adminPassword: orcaorcaorca - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --calico-vxlan=$CALICO_VXLAN - mcr: - version: $MCR_VERSION - diff --git a/test/archive/launchpad.yaml b/test/archive/launchpad.yaml deleted file mode 100644 index 71946fab3..000000000 --- a/test/archive/launchpad.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: launchpad.mirantis.com/mke/v1.2 -kind: mke -metadata: - name: $CLUSTER_NAME -spec: - hosts: - - address: "127.0.0.1" - ssh: - port: 9022 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "manager" - mcrConfig: &engineCfg - "insecure-registries": - - 172.16.86.100:5000 - hooks: - apply: - before: - - echo "hello" > test.txt - after: - - rm test.txt - - address: "127.0.0.1" - ssh: - port: 9023 - keyPath: "./id_rsa_launchpad" - user: "launchpad" - role: "worker" - mcrConfig: &engineCfg - mke: - version: $MKE_VERSION - imageRepo: $MKE_IMAGE_REPO - configData: |- - [scheduling_configuration] - default_node_orchestrator = "kubernetes" - installFlags: - - --admin-username=admin - - --admin-password=orcaorcaorca - mcr: - version: $MCR_VERSION diff --git a/test/archive/smoke.common.sh b/test/archive/smoke.common.sh deleted file mode 100644 index e1666bed2..000000000 --- a/test/archive/smoke.common.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash - -FOOTLOOSE_TEMPLATE=${FOOTLOOSE_TEMPLATE:-"footloose.yaml.tpl"} -LAUNCHPAD_CONFIG=${LAUNCHPAD_CONFIG:-"launchpad.yaml"} -LAUNCHPAD="../bin/launchpad" - -export LINUX_IMAGE=${LINUX_IMAGE:-"quay.io/footloose/ubuntu18.04"} -export MKE_VERSION=${MKE_VERSION:-"3.3.3"} -export MKE_IMAGE_REPO=${MKE_IMAGE_REPO:-"docker.io/mirantis"} -export MSR_VERSION=${MSR_VERSION:-"2.8.3"} -export MSR_IMAGE_REPO=${MSR_IMAGE_REPO:-"docker.io/mirantis"} -export MCR_VERSION=${MCR_VERSION:-"19.03.12"} -export PRESERVE_CLUSTER=${PRESERVE_CLUSTER:-""} -export REUSE_CLUSTER=${REUSE_CLUSTER:-""} -export CLUSTER_NAME=${BUILD_TAG:-"local"} -export DISABLE_TELEMETRY="true" -export ACCEPT_LICENSE="true" - -function cleanup() { - echo -e "Cleaning up..." - unset DOCKER_HOST - unset DOCKER_CERT_PATH - unset DOCKER_TLS_VERIFY - - if [ -z "${PRESERVE_CLUSTER}" ]; then - deleteCluster - docker network rm footloose-cluster 2> /dev/null || true - ## Clean the local state - rm -rf ~/.mirantis-launchpad/cluster/$CLUSTER_NAME || true - rm -f ./kubectl || true - rm -f ./footloose || true - fi -} - -function downloadFootloose() { - if [ ! -f footloose ]; then - echo -e "Downloading footloose" - OS=$(uname) - if [ "$OS" == "Darwin" ]; then - curl -L https://github.com/weaveworks/footloose/releases/download/0.6.3/footloose-0.6.3-darwin-x86_64.tar.gz > ./footloose.tar.gz - tar -xvf footloose.tar.gz - else - curl -L https://github.com/weaveworks/footloose/releases/download/0.6.3/footloose-0.6.3-linux-x86_64 > ./footloose - fi - chmod +x ./footloose - ./footloose version - fi - echo -e "Creating footloose-cluster network..." - docker network inspect footloose-cluster || docker network create footloose-cluster --subnet 172.16.86.0/24 --gateway 172.16.86.1 --attachable 2> /dev/null -} - -function downloadTools() { - downloadFootloose - - echo -e "Downloading tools for test..." - OS=$(uname) - if [ "$OS" == "Darwin" ]; then - [ -f kubectl ] || (curl -L https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/darwin/amd64/kubectl > ./kubectl && chmod +x ./kubectl) - else - [ -f kubectl ] || (curl -L https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl > ./kubectl && chmod +x ./kubectl) - fi - ./kubectl version --client=true -} - -function generateKey() { - rm -f ./id_rsa_launchpad - ssh-keygen -t rsa -f ./id_rsa_launchpad -N "" -} - -function deleteCluster() { - # cleanup any existing cluster - envsubst < "${FOOTLOOSE_TEMPLATE}" > footloose.yaml - ./footloose delete && docker volume prune -f -} - -function createCluster() { - envsubst < "${FOOTLOOSE_TEMPLATE}" > footloose.yaml - ./footloose create -} - -function createUsers() { - envsubst < "${FOOTLOOSE_TEMPLATE}" > footloose.yaml - for h in $(./footloose show -o json|grep '"hostname"'|cut -d'"' -f 4); do - ./footloose ssh root@${h} "useradd -m launchpad" - ./footloose ssh root@${h} "mkdir ~launchpad/.ssh && chown launchpad:launchpad ~launchpad/.ssh && chmod 0755 ~launchpad/.ssh" - ./footloose ssh root@${h} "cat > ~launchpad/.ssh/authorized_keys" < id_rsa_launchpad.pub - ./footloose ssh root@${h} "chmod 0644 ~launchpad/.ssh/authorized_keys" - ./footloose ssh root@${h} "echo \"launchpad ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers" - ./footloose ssh launchpad@${h} "pwd" - done -} - -function setup() { - if [ -z "${REUSE_CLUSTER}" ]; then - generateKey - downloadFootloose - deleteCluster - createCluster - createUsers - fi - export MKE_MANAGER_IP=$(docker inspect mke-manager0 --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}') - if [ ! -z "${CONFIG_TEMPLATE}" ]; then - export LAUNCHPAD_CONFIG="${CONFIG_TEMPLATE%.tpl}" - envsubst < ${CONFIG_TEMPLATE} > ${LAUNCHPAD_CONFIG} - fi -} - -function cloneImages() { - echo "Setting up a temporary footloose machine for pushing images" - envsubst < footloose-localrepo.yaml.tpl > footloose-localrepo.yaml - FLOPT="--config footloose-localrepo.yaml" - ./footloose delete $FLOPT || true - ./footloose create $FLOPT - ./footloose ssh $FLOPT root@pusher0 -- \ - 'apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils && \ - curl -fsSL https://get.docker.com | DEBIAN_FRONTEND=noninteractive bash -s && \ - mkdir -p /etc/docker && \ - echo "{ \"insecure-registries\":[\"172.16.86.100:5000\"] }" > /etc/docker/daemon.json && \ - service docker restart' - - docker rm --force /registry || true - docker run --name registry -d --network footloose-cluster --expose 5000 --ip 172.16.86.100 registry:latest - - echo "Pulling + pushing MKE images..." - - docker pull $MKE_IMAGE_REPO/ucp:$MKE_VERSION - for image in $(docker run --rm ${MKE_IMAGE_REPO}/ucp:${MKE_VERSION} images --list | sort | uniq); do - imagebase=$(basename ${image}) - imagebase=${imagebase%:*} - fullimage="$MKE_IMAGE_REPO/$imagebase:$MKE_VERSION" - ./footloose ssh $FLOPT root@pusher0 -- \ - "docker pull ${fullimage} && \ - docker tag ${fullimage} 172.16.86.100:5000/test/$imagebase:$MKE_VERSION && \ - docker push 172.16.86.100:5000/test/$imagebase:$MKE_VERSION" - done - - echo "Pulling + pushing MSR images..." - - docker pull $MSR_IMAGE_REPO/dtr:$MSR_VERSION - for image in $(docker run --rm ${MSR_IMAGE_REPO}/dtr:${MSR_VERSION} images | sort | uniq); do - imagebase=$(basename ${image}) - imagebase=${imagebase%:*} - fullimage="$MSR_IMAGE_REPO/$imagebase:$MSR_VERSION" - ./footloose ssh $FLOPT root@pusher0 -- \ - "docker pull ${fullimage} && \ - docker tag ${fullimage} 172.16.86.100:5000/test/$imagebase:$MSR_VERSION && \ - docker push 172.16.86.100:5000/test/$imagebase:$MSR_VERSION" - done - - ./footloose delete $FLOPT - - export MKE_IMAGE_REPO=172.16.86.100:5000/test - export MSR_IMAGE_REPO=172.16.86.100:5000/test -} - diff --git a/test/archive/smoke_apply.sh b/test/archive/smoke_apply.sh deleted file mode 100755 index 11d7444bb..000000000 --- a/test/archive/smoke_apply.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup && downloadTools - -set +e -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} -RES=$? -set -e - -if [ "$RES" -eq 0 ] && [ ! -z "$MUST_FAIL" ]; then - echo "Command succeeded, but was expected to fail, exiting with error" - exit 1 -fi - -if [ "$RES" -ne 0 ]; then - if [ -z "$MUST_FAIL" ]; then - exit $RES - else - echo "Command failed with $RES and MUST_FAIL set, returning success" - exit 0 - fi -fi - -echo "Testing exec" -${LAUNCHPAD} exec --debug -r manager echo hello from manager -${LAUNCHPAD} exec --debug --role worker echo hello from worker -${LAUNCHPAD} exec --debug --first echo hello from first host - -echo "Apply succeeded, downloading bundle" -${LAUNCHPAD} client-config --config ${LAUNCHPAD_CONFIG} - -# to source the env file succesfully we must be in the same directory -pushd ~/.mirantis-launchpad/cluster/$CLUSTER_NAME/bundle/admin/ -source env.sh -popd - -docker ps -docker ps --filter name=dtr -./kubectl get pods --all-namespaces -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} hosts -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} mke -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} msr diff --git a/test/archive/smoke_apply_bastion.sh b/test/archive/smoke_apply_bastion.sh deleted file mode 100755 index d12939c6c..000000000 --- a/test/archive/smoke_apply_bastion.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -e - -export SMOKE_DIR="$( pwd -P )" - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup && downloadTools - -BASTION_PORT=$(docker inspect mke-bastion0|grep -A3 22/tcp|grep HostPort|head -1|cut -d\" -f4) -MANAGER_IP=$(./footloose status manager0 -o json | grep "\"ip\": \"172" | head -1 |cut -d\" -f4) -WORKER_IP=$(./footloose status worker0 -o json | grep "\"ip\": \"172" | head -1 |cut -d\" -f4) -export MANAGER_IP -export WORKER_IP -export BASTION_PORT -echo "bastion port: $BASTION_PORT" - -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -echo "Testing exec" -${LAUNCHPAD} exec --debug --all --parallel --config ${LAUNCHPAD_CONFIG} hostname diff --git a/test/archive/smoke_apply_forward.sh b/test/archive/smoke_apply_forward.sh deleted file mode 100755 index a14ac1ca8..000000000 --- a/test/archive/smoke_apply_forward.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -e - -export SMOKE_DIR="$( pwd -P )" - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup && downloadTools - -MANAGER_IP=$(./footloose status manager0 -o json | grep "\"ip\": \"172" | head -1 |cut -d\" -f4) -WORKER_IP=$(./footloose status worker0 -o json | grep "\"ip\": \"172" | head -1 |cut -d\" -f4) -export MANAGER_IP -export WORKER_IP - -BASTION_PORT=$(docker inspect mke-bastion0|grep -A3 22/tcp|grep HostPort|head -1|cut -d\" -f4) - -eval $(ssh-agent -s) -ssh-add ./id_rsa_launchpad -ssh -o StrictHostKeyChecking=no -A -i ./id_rsa_launchpad -p ${BASTION_PORT} root@localhost "cd /launchpad/test; MANAGER_IP=${MANAGER_IP} WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad apply --debug --config ${LAUNCHPAD_CONFIG}" -ssh -o StrictHostKeyChecking=no -A -i ./id_rsa_launchpad -p ${BASTION_PORT} root@localhost "cd /launchpad/test; MANAGER_IP=${MANAGER_IP} WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad exec --debug --config ${LAUNCHPAD_CONFIG} --all --parallel hostname" diff --git a/test/archive/smoke_apply_local.sh b/test/archive/smoke_apply_local.sh deleted file mode 100755 index c8b5b81b3..000000000 --- a/test/archive/smoke_apply_local.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -ex - -export SMOKE_DIR="$( pwd -P )" - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup - -WORKER_IP=$(./footloose status worker0 -o json | grep "\"ip\": \"172" | head -1 |cut -d\" -f4) -echo WORKER_IP: $WORKER_IP - -# Pre-create the docker group and add the user to it - it does not seem possible to refresh the -# group memberships when running on the localhost connection like it is by reconnecting when using ssh. -./footloose ssh launchpad@manager0 "sudo groupadd -f -g 999 docker && sudo usermod -aG docker launchpad" - -./footloose ssh launchpad@manager0 "cd /launchpad/test; WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad apply --debug --config ${LAUNCHPAD_CONFIG}" -./footloose ssh launchpad@manager0 "cd /launchpad/test; WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad describe --debug --config ${LAUNCHPAD_CONFIG} hosts" -./footloose ssh launchpad@manager0 "cd /launchpad/test; WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad describe --debug --config ${LAUNCHPAD_CONFIG} msr" -./footloose ssh launchpad@manager0 "cd /launchpad/test; WORKER_IP=${WORKER_IP} CLUSTER_NAME=${CLUSTER_NAME} MKE_VERSION=${MKE_VERSION} MKE_IMAGE_REPO=${MKE_IMAGE_REPO} MCR_VERSION=${MCR_VERSION} DISABLE_TELEMETRY=true ACCEPT_LICENSE=true ../bin/launchpad describe --debug --config ${LAUNCHPAD_CONFIG} mke" diff --git a/test/archive/smoke_cleanup.sh b/test/archive/smoke_cleanup.sh deleted file mode 100755 index c4c753274..000000000 --- a/test/archive/smoke_cleanup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -unset PRESERVE_CLUSTER -cleanup diff --git a/test/archive/smoke_localrepo.sh b/test/archive/smoke_localrepo.sh deleted file mode 100755 index 6ced2bf9a..000000000 --- a/test/archive/smoke_localrepo.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh - -function registrycleanup() { - docker kill /registry || true - docker rm --force /registry || true - ./footloose delete --config footloose-localrepo.yaml || true - cleanup -} -trap registrycleanup EXIT - -setup && downloadTools && cloneImages - -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} diff --git a/test/archive/smoke_localrepo_reset.sh b/test/archive/smoke_localrepo_reset.sh deleted file mode 100755 index 3ee16daff..000000000 --- a/test/archive/smoke_localrepo_reset.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh - -function registrycleanup() { - docker kill /registry || true - docker rm --force /registry || true - ./footloose delete --config footloose-localrepo.yaml || true - cleanup -} -trap registrycleanup EXIT - -setup && downloadTools && cloneImages - -${LAUNCHPAD} reset --debug --config ${LAUNCHPAD_CONFIG} --force diff --git a/test/archive/smoke_prune.sh b/test/archive/smoke_prune.sh deleted file mode 100755 index 0389bc7a7..000000000 --- a/test/archive/smoke_prune.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup - -[ "${REUSE_CLUSTER}" = "" ] && ${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -UNAME=$(uname) -if [ "${UNAME}" = "Darwin" ]; then - SEDOPTS="-i -e" -else - SEDOPTS="-i" -fi - -# Remove a node from the launchpad.yaml -echo -e "Removing one MSR node from launchpad.yaml..." -sed $SEDOPTS '/REMOVE_THIS/d' ${LAUNCHPAD_CONFIG} -cat ${LAUNCHPAD_CONFIG} - -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} hosts - -echo "Running with prune: false" -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -# Flip prune to true -echo -e "Changing prune: false to prune: true..." -sed $SEDOPTS 's/prune: false/prune: true/' ${LAUNCHPAD_CONFIG} -cat ${LAUNCHPAD_CONFIG} - -echo "Running with prune: true" -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} hosts -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} mke -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} msr diff --git a/test/archive/smoke_register.sh b/test/archive/smoke_register.sh deleted file mode 100755 index a8b6b9102..000000000 --- a/test/archive/smoke_register.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh - -function cleanupuserfile() { - rm -f ~/.mirantis-lanchpad/user.yaml -} - -trap cleanupuserfile EXIT - -unset ACCEPT_LICENSE -${LAUNCHPAD} register --name "Automation" --company "Test" --email "testing@example.com" --accept-license - -grep -q "name: Automation" ~/.mirantis-launchpad/user.yaml -grep -q "company: Test" ~/.mirantis-launchpad/user.yaml -grep -q "email: testing@example.com" ~/.mirantis-launchpad/user.yaml -grep -q "eula: true" ~/.mirantis-launchpad/user.yaml diff --git a/test/archive/smoke_reset.sh b/test/archive/smoke_reset.sh deleted file mode 100755 index a6052c453..000000000 --- a/test/archive/smoke_reset.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup - -[ "${REUSE_CLUSTER}" = "" ] && ${LAUNCHPAD} apply --debug --config - < ${LAUNCHPAD_CONFIG} -${LAUNCHPAD} reset --debug --config ${LAUNCHPAD_CONFIG} --force -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} hosts -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} mke -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} msr diff --git a/test/archive/smoke_upgrade.sh b/test/archive/smoke_upgrade.sh deleted file mode 100755 index d02fed56f..000000000 --- a/test/archive/smoke_upgrade.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup - -[ "${REUSE_CLUSTER}" = "" ] && ${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -../bin/launchpad describe --debug hosts -../bin/launchpad describe --debug mke -../bin/launchpad describe --debug msr - -export MKE_VERSION=$MKE_UPGRADE_VERSION:-"3.3.3"} -export MKE_IMAGE_REPO=${MKE_UPGRADE_IMAGE_REPO:-"docker.io/mirantis"} -export MCR_VERSION=${MCR_UPGRADE_VERSION:-"19.03.12"} -export MSR_VERSION=${MSR_UPGRADE_VERSION:"2.8.3"} - -generateYaml - -cat launchpad.yaml - -${LAUNCHPAD} apply --debug --config ${LAUNCHPAD_CONFIG} - -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} hosts -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} mke -${LAUNCHPAD} describe --debug --config ${LAUNCHPAD_CONFIG} msr diff --git a/test/archive/smoke_upload.sh b/test/archive/smoke_upload.sh deleted file mode 100755 index 76f96cd6b..000000000 --- a/test/archive/smoke_upload.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -cd test -. ./smoke.common.sh -trap cleanup EXIT - -setup && downloadTools - -mkdir -p images -docker pull docker.io/mirantis/ucp:3.3.3 -for image in $(docker run --rm ${MKE_IMAGE_REPO}/ucp:${MKE_VERSION} images --list | sort | uniq); do - docker pull docker.io/$image - fn=${image//\//-} - fn=${fn//:/} - docker save $image | gzip > images/$fn.tar.gz -done - -${LAUNCHPAD} apply --debug - -rm -rf images - -${LAUNCHPAD} describe --debug hosts -${LAUNCHPAD} describe --debug mke diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go index 4def4f4b0..c17a32cec 100644 --- a/test/integration/integration_test.go +++ b/test/integration/integration_test.go @@ -66,7 +66,7 @@ func TestMain(m *testing.M) { options := terraform.Options{ // The path to where the Terraform tf chart is located - TerraformDir: "../../examples/tf-aws/launchpad", + TerraformDir: "../../examples/terraform/aws-simple", Vars: map[string]interface{}{ "name": name, "aws": AWS, diff --git a/test/smoke/smoke_test.go b/test/smoke/smoke_test.go index 1c0b0e708..f38eff339 100644 --- a/test/smoke/smoke_test.go +++ b/test/smoke/smoke_test.go @@ -64,7 +64,7 @@ func TestSmallCluster(t *testing.T) { options := terraform.Options{ // The path to where the Terraform tf chart is located - TerraformDir: "../../examples/tf-aws/launchpad", + TerraformDir: "../../examples/terraform/aws-simple", Vars: map[string]interface{}{ "name": name, "aws": AWS, @@ -133,7 +133,7 @@ func TestSupportedMatrixCluster(t *testing.T) { options := terraform.Options{ // The path to where the Terraform tf chart is located - TerraformDir: "../../examples/tf-aws/launchpad", + TerraformDir: "../../examples/terraform/aws-simple", Vars: map[string]interface{}{ "name": name, "aws": AWS,