diff --git a/.circleci/config.yml b/.circleci/config.yml index b5b061df..4b7d77e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ commands: command: | uname -m > /tmp/mod-checksums.txt md5sum ./go.sum >> /tmp/mod-checksums.txt - md5sum tools.mk >> /tmp/mod-checksums.txt + md5sum common.mk >> /tmp/mod-checksums.txt - restore_cache: keys: - v4-go-mod-{{ checksum "/tmp/mod-checksums.txt" }} diff --git a/Makefile b/Makefile index 2d339aba..94adf9f4 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,19 @@ -include tools.mk +include common.mk # Overridable vars DEBUG ?= 0 LOG_LEVEL ?= info DEV_IMAGE_REPO ?= ghcr.io/pgedge CONTROL_PLANE_IMAGE_REPO ?= host.docker.internal:5000/control-plane -CONTROL_PLANE_VERSION ?= $(shell git describe --tags --abbrev=0 --match 'v*') E2E_FIXTURE ?= -E2E_PARALLEL ?= +E2E_PARALLEL ?= 8 E2E_RUN ?= E2E_SKIP_CLEANUP ?= 0 E2E_DEBUG ?= 0 E2E_DEBUG_DIR ?= +FIXTURE_VARIANT ?= large +FIXTURE_CONTROL_PLANE_IMAGE ?= +FIXTURE_EXTRA_VARS ?= CLUSTER_TEST_PARALLEL ?= CLUSTER_TEST_RUN ?= CLUSTER_TEST_SKIP_IMAGE_BUILD ?= 0 @@ -28,7 +30,7 @@ docker_compose_dev=WORKSPACE_DIR=$(shell pwd) \ DEV_IMAGE_REPO=$(DEV_IMAGE_REPO) \ docker compose -f ./docker/control-plane-dev/docker-compose.yaml docker_compose_ci=docker compose -f ./docker/control-plane-ci/docker-compose.yaml -e2e_args=-tags=e2e_test -count=1 -timeout=20m ./e2e/... \ +e2e_args=-tags=e2e_test -count=1 -timeout=45m ./e2e/... \ $(if $(E2E_PARALLEL),-parallel $(E2E_PARALLEL)) \ $(if $(E2E_RUN),-run $(E2E_RUN)) \ -args \ @@ -149,6 +151,83 @@ licenses-ci: licenses .PHONY: ci ci: test-ci lint-ci licenses-ci +################ +# e2e fixtures # +################ + +_fixture_extra_vars=$(if $(FIXTURE_CONTROL_PLANE_IMAGE),external_control_plane_image=$(FIXTURE_CONTROL_PLANE_IMAGE) ,)$(FIXTURE_EXTRA_VARS) + +# Set to 'goreleaser-build' if no external image is specified +_fixture_goreleaser_build=$(if $(findstring external_control_plane_image,$(_fixture_extra_vars)),,goreleaser-build) + +.PHONY: _deploy-%-fixture +_deploy-%-fixture: $(_fixture_goreleaser_build) + VARIANT=$(FIXTURE_VARIANT) \ + EXTRA_VARS='$(_fixture_extra_vars)' \ + $(MAKE) -C e2e/fixtures \ + deploy-$*-machines \ + setup-$*-hosts \ + deploy-$*-control-plane + +.PHONY: deploy-lima-fixture +deploy-lima-fixture: _deploy-lima-fixture + +.PHONY: deploy-ec2-fixture +deploy-ec2-fixture: _deploy-ec2-fixture + +.PHONY: _update-%-fixture +_update-%-fixture: $(_fixture_goreleaser_build) + VARIANT=$(FIXTURE_VARIANT) \ + EXTRA_VARS='$(_fixture_extra_vars)' \ + $(MAKE) -C e2e/fixtures \ + deploy-$*-control-plane + +.PHONY: update-lima-fixture +update-lima-fixture: _update-lima-fixture + +.PHONY: update-ec2-fixture +update-ec2-fixture: _update-ec2-fixture + +.PHONY: _reset-%-fixture +_reset-%-fixture: $(_fixture_goreleaser_build) + VARIANT=$(FIXTURE_VARIANT) \ + EXTRA_VARS='$(_fixture_extra_vars)' \ + $(MAKE) -C e2e/fixtures \ + teardown-$*-control-plane \ + deploy-$*-control-plane + +.PHONY: reset-lima-fixture +reset-lima-fixture: _reset-lima-fixture + +.PHONY: reset-ec2-fixture +reset-ec2-fixture: _reset-ec2-fixture + +.PHONY: _stop-%-fixture +_stop-%-fixture: + VARIANT=$(FIXTURE_VARIANT) \ + EXTRA_VARS='$(_fixture_extra_vars)' \ + $(MAKE) -C e2e/fixtures \ + stop-$*-machines + +.PHONY: stop-lima-fixture +stop-lima-fixture: _stop-lima-fixture + +.PHONY: stop-ec2-fixture +stop-ec2-fixture: _stop-ec2-fixture + +.PHONY: _teardown-%-fixture +_teardown-%-fixture: + VARIANT=$(FIXTURE_VARIANT) \ + EXTRA_VARS='$(_fixture_extra_vars)' \ + $(MAKE) -C e2e/fixtures \ + teardown-$*-machines + +.PHONY: teardown-lima-fixture +teardown-lima-fixture: _teardown-lima-fixture + +.PHONY: teardown-ec2-fixture +teardown-ec2-fixture: _teardown-ec2-fixture + ############### # image build # ############### diff --git a/api/Makefile b/api/Makefile index 206856a5..3292752b 100644 --- a/api/Makefile +++ b/api/Makefile @@ -1,4 +1,4 @@ -include ../tools.mk +include ../common.mk .PHONY: generate-v1 generate-v1: diff --git a/tools.mk b/common.mk similarity index 71% rename from tools.mk rename to common.mk index 75d41710..06187977 100644 --- a/tools.mk +++ b/common.mk @@ -9,6 +9,11 @@ changie=$(gobin)/changie yamlfmt=$(gobin)/yamlfmt go-licenses=$(gobin)/go-licenses +CHANGIE_LATEST = $(shell $(changie) latest) +# deferred simple variable expansion pattern: +# https://make.mad-scientist.net/deferred-simple-variable-expansion/ +CONTROL_PLANE_VERSION ?= $(eval CONTROL_PLANE_VERSION := $$(shell git fetch --quiet && git describe --tags --abbrev=0 --match 'v*' $$(CHANGIE_LATEST)))$(CONTROL_PLANE_VERSION) + .PHONY: install-tools install-tools: go install gotest.tools/gotestsum@v1.13.0 diff --git a/docs/development/e2e-tests.md b/docs/development/e2e-tests.md index 884dc37e..36fac6ab 100644 --- a/docs/development/e2e-tests.md +++ b/docs/development/e2e-tests.md @@ -208,25 +208,27 @@ limactl sudoers | sudo tee /etc/sudoers.d/lima #### Lima test fixture targets ```sh -# Deploy the virtual machines. By default, this will create Rocky 9 VMs with -# Lima. This needs to download a ~500Mb VM image the first time it runs, so it -# may take a while to start the first machine. -make -C e2e/fixtures deploy-lima-machines +# Build and deploy the Control Plane to Lima virtual machines. By default, this +# will create six Rocky 9 VMs with Lima. This needs to download a ~500Mb VM +# image the first time it runs, so it may take a while to start the first +# machine. +make deploy-lima-fixture -# Install prerequisites on VMs -make -C e2e/fixtures setup-lima-hosts +# Rebuild and redeploy the Control Plane to existing Lima virtual machines +make update-lima-fixture -# Build the control-plane binaries -make goreleaser-build +# Teardown, rebuild, and redeploy the Control Plane to existing Lima virtual +# machines +make reset-lima-fixture -# Deploy the control-plane -make -C e2e/fixtures deploy-lima-control-plane +# Teardown the Lima virtual machines +make teardown-lima-fixture ``` -The `deploy-lima-control-plane` target will output a "test config" file that -contains IPs that you can use to contact the virtual machines. This test config -can be used as an input to the end-to-end tests. You can `cat` this file to see -what's in it, for example: +The `{deploy,update,reset}-lima-fixture` targets will output a "test config" +file that contains IPs that you can use to contact the virtual machines. This +test config can be used as an input to the end-to-end tests. You can `cat` this +file to see what's in it, for example: ```sh cat e2e/fixtures/outputs/lima.test_config.yaml @@ -246,82 +248,23 @@ For example: ssh -F /Users/jasonlynch/.lima/host-1/ssh.config lima-host-1 ``` -#### Deploying new code changes - -If you've made new code changes that you'd like to deploy, you can rerun these -steps: - -```sh -# Build the control-plane binaries -make goreleaser-build - -# Deploy the control-plane -make -C e2e/fixtures deploy-lima-control-plane -``` - -#### Testing published releases - -If you'd like to test a published image, for example during pre-release testing, -you can skip the image build and override the deployed control-plane image using -`EXTRA_VARS`, for example: - -```sh -make -C e2e/fixtures deploy-lima-control-plane EXTRA_VARS='external_control_plane_image=ghcr.io/pgedge/control-plane:v0.2.0-rc.3' -``` - -#### Simulating global deployments - -The test fixtures can add latency between specific virtual machines to simulate -global deployments. The simulated region for each virtual machine is set in the -Ansible vars file for each test fixture. The `lima_rocky_global` test fixture -simulates virtual machines in `us-west-1`, `af-south-1`, and `ap-southeast-4`: - -```sh -make -C e2e/fixtures setup-lima-hosts LIMA_VARS_FILE=vars/lima_rocky_global.yaml -``` - -#### Large cluster - -You can deploy a six-host variant of the Lima fixture by using the -`lima_rocky_large.yaml` vars file: - -```sh -make -C e2e/fixtures deploy-lima-machines LIMA_VARS_FILE=vars/lima_rocky_large.yaml -make -C e2e/fixtures setup-lima-hosts LIMA_VARS_FILE=vars/lima_rocky_large.yaml -make goreleaser-build -make -C e2e/fixtures deploy-lima-control-plane LIMA_VARS_FILE=vars/lima_rocky_large.yaml - -# After it's deployed, it's used the same as the normal lima fixture -make test-e2e E2E_PARALLEL=4 E2E_FIXTURE=lima -``` - -#### Huge cluster - -You can deploy a twelve-host variant of the Lima fixture by using the -`lima_rocky_huge.yaml` vars file: - -```sh -make -C e2e/fixtures deploy-lima-machines LIMA_VARS_FILE=vars/lima_rocky_huge.yaml -make -C e2e/fixtures setup-lima-hosts LIMA_VARS_FILE=vars/lima_rocky_huge.yaml -make goreleaser-build -make -C e2e/fixtures deploy-lima-control-plane LIMA_VARS_FILE=vars/lima_rocky_huge.yaml - -# After it's deployed, it's used the same as the normal lima fixture -make test-e2e E2E_PARALLEL=4 E2E_FIXTURE=lima -``` - #### Emulating x86_64 with Lima > [!WARNING] > This is extremely slow, like 10+ minutes to complete a deployment, > and should only be done in the absence of better options. -You can use `EXTRA_VARS` to override the detected architecture: +You can use `FIXTURE_EXTRA_VARS` with the +`{deploy,update,reset,teardown}-lima-fixture` targets to override the detected +architecture: ```sh -make -C e2e/fixtures deploy-lima-machines EXTRA_VARS='architecture=x86_64' -make -C e2e/fixtures setup-lima-hosts EXTRA_VARS='architecture=x86_64' -make -C e2e/fixtures deploy-lima-control-plane EXTRA_VARS='architecture=x86_64' +make deploy-lima-fixture FIXTURE_EXTRA_VARS='architecture=x86_64' + +# It's important to include the architecture with every other target as well: +make update-lima-fixture FIXTURE_EXTRA_VARS='architecture=x86_64' +make reset-lima-fixture FIXTURE_EXTRA_VARS='architecture=x86_64' +make teardown-lima-fixture FIXTURE_EXTRA_VARS='architecture=x86_64' ``` #### Stopping and starting hosts @@ -330,38 +273,13 @@ You can stop the hosts without tearing them down using the `stop-lima-machines` target: ```sh -make -C e2e/fixtures stop-lima-machines +make stop-lima-fixture ``` -You can start them again by re-running the `deploy-lima-machines` target. It's -also recommended to re-run the `deploy-lima-control-plane` target afterwards to -ensure that the test config is up-to-date. - -```sh -make -C e2e/fixtures deploy-lima-machines -make -C e2e/fixtures deploy-lima-control-plane -``` - -#### Cleanup - -##### Tearing down the Control Plane - -You can tear down the Control Plane in the test fixtures as well as any -databases its deployed with this `make` target: +You can start them again by re-running the `deploy-lima-fixture` target. ```sh -make -C e2e/fixtures teardown-lima-control-plane -``` - -This can be a faster alternative to remaking the virtual machines if you're -re-testing the cluster initialization flow. - -##### Tearing down the virtual machines - -To completely remove the virtual machines, do: - -```sh -make -C e2e/fixtures teardown-lima-machines +make deploy-lima-fixture ``` ### EC2 test fixtures @@ -391,24 +309,25 @@ different architecture. #### EC2 test fixture targets ```sh -# Deploy the virtual machines. By default, this will create Rocky 9 VMs with -# x86_64 architecture. -make -C e2e/fixtures deploy-ec2-machines +# Build and deploy the Control Plane to EC2 virtual machines. By default, this +# will create six Rocky 9 VMs with x86_64 architecture. +make deploy-ec2-fixture -# Install prerequisites on VMs -make -C e2e/fixtures setup-ec2-hosts +# Rebuild and redeploy the Control Plane to existing EC2 virtual machines +make update-ec2-fixture -# Build the control-plane binaries -make goreleaser-build +# Teardown, rebuild, and redeploy the Control Plane to existing EC2 virtual +# machines +make reset-ec2-fixture -# Deploy the control-plane -make -C e2e/fixtures deploy-ec2-control-plane +# Teardown the EC2 virtual machines +make teardown-ec2-fixture ``` -The `deploy-ec2-control-plane` target will output a "test config" file that -contains IPs that you can use to contact the virtual machines. This test config -can be used with the end-to-end tests. You can `cat` this file to see what's in -it, for example: +The `{deploy,update,reset}-ec2-fixture` targets will output a "test config" file +that contains IPs that you can use to contact the virtual machines. This test +config can be used with the end-to-end tests. You can `cat` this file to see +what's in it, for example: ```sh cat e2e/fixtures/outputs/ec2.test_config.yaml @@ -428,123 +347,96 @@ For example: ssh -l rocky -i /Users/jasonlynch/workspace/pgEdge/control-plane/e2e/fixtures/outputs/ec2_deploy 3.133.148.76 ``` -#### Deploying new code changes +#### Deploying arm64 instances on EC2 -If you've made new code changes that you'd like to deploy, you can rerun these -steps: +You can use `FIXTURE_EXTRA_VARS` with the +`{deploy,update,reset,teardown}-ec2-fixture` targets to override the default +architecture: ```sh -# Build the control-plane binaries -make goreleaser-build +make deploy-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' -# Deploy the control-plane -make -C e2e/fixtures deploy-ec2-control-plane +# It's important to include the architecture with every other target as well: +make update-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' +make reset-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' +make teardown-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' ``` -#### Large cluster +#### Stopping and starting hosts -You can deploy a six-host variant of the EC2 fixture by using the -`ec2_rocky_large.yaml` vars file: +You can stop the hosts without tearing them down using the `stop-ec2-fixture` +target. Stopped hosts do not incur an instance charge (you're only charged for +the EBS storage) so this is a useful cost-saving measure: ```sh -make -C e2e/fixtures deploy-ec2-machines EC2_VARS_FILE=vars/ec2_rocky_large.yaml -make -C e2e/fixtures setup-ec2-hosts EC2_VARS_FILE=vars/ec2_rocky_large.yaml -make goreleaser-build -make -C e2e/fixtures deploy-ec2-control-plane EC2_VARS_FILE=vars/ec2_rocky_large.yaml +make stop-ec2-fixture -# After it's deployed, it's used the same as the normal ec2 fixture -make test-e2e E2E_PARALLEL=4 E2E_FIXTURE=ec2 +# The architecture is incorporated into the instance's identifier, so it's +# important to include `FIXTURE_EXTRA_VARS` if you've deployed arm64 instances: +make stop-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' ``` -#### Huge cluster - -You can deploy a twelve-host variant of the EC2 fixture by using the -`ec2_rocky_huge.yaml` vars file: +You can start them again by re-running the top-level `deploy-ec2-fixture` +target: ```sh -make -C e2e/fixtures deploy-ec2-machines EC2_VARS_FILE=vars/ec2_rocky_huge.yaml -make -C e2e/fixtures setup-ec2-hosts EC2_VARS_FILE=vars/ec2_rocky_huge.yaml -make goreleaser-build -make -C e2e/fixtures deploy-ec2-control-plane EC2_VARS_FILE=vars/ec2_rocky_huge.yaml +make deploy-ec2-fixture -# After it's deployed, it's used the same as the normal ec2 fixture -make test-e2e E2E_PARALLEL=4 E2E_FIXTURE=ec2 +# Similar to the above, be sure to include the `FIXTURE_EXTRA_VARS` if you've +# deployed arm64 instances: +make deploy-ec2-fixture FIXTURE_EXTRA_VARS='architecture=arm64' ``` -#### Testing published releases +### Testing published releases If you'd like to test a published image, for example during pre-release testing, -you can skip the image build and override the deployed control-plane image using -`EXTRA_VARS`, for example: - -```sh -make -C e2e/fixtures deploy-ec2-control-plane EXTRA_VARS='external_control_plane_image=ghcr.io/pgedge/control-plane:v0.2.0-rc.3' -``` - -#### Deploying arm64 instances on EC2 - -You can use `EXTRA_VARS` to override the detected architecture: +you can skip the image build and override the deployed control-plane image by +specifying `FIXTURE_CONTROL_PLANE_IMAGE` with the +`{deploy,update,reset}-{lima,ec2}-fixture` targets. For example: ```sh -make -C e2e/fixtures deploy-ec2-machines EXTRA_VARS='architecture=arm64' -make -C e2e/fixtures setup-ec2-hosts EXTRA_VARS='architecture=arm64' -make -C e2e/fixtures deploy-ec2-control-plane EXTRA_VARS='architecture=arm64' +make update-lima-fixture FIXTURE_CONTROL_PLANE_IMAGE='ghcr.io/pgedge/control-plane:v0.6.2-rc.1' ``` -#### Stopping and starting hosts - -You can stop the hosts without tearing them down using the `stop-ec2-machines` -target. Stopped hosts do not incur an instance charge (you're only charged for -the EBS storage) so this is a useful cost-saving measure: - -```sh -make -C e2e/fixtures stop-ec2-machines - -# It's important to include the `EXTRA_VARS` if you've deployed arm64 instances: -make -C e2e/fixtures stop-ec2-machines EXTRA_VARS='architecture=arm64' -``` +### Fixture variants -You can start them again by re-running the `deploy-ec2-machines` target. It's -also recommended to re-run the `deploy-ec2-control-plane` target afterwards to -ensure that the test config is up-to-date, because the public IPs can change. +By default, we deploy the `large` fixture variant, which contains six virtual +machines and Control Plane instances, where three are configured to act as Etcd +servers and three are configured to act as clients only. You can specify a +different variant using the `FIXTURE_VARIANT` variable with the +`{deploy,update,reset,teardown}-{lima,ec2}-fixture` targets. For example: ```sh -make -C e2e/fixtures deploy-ec2-machines -make -C e2e/fixtures deploy-ec2-control-plane - -# Like above, be sure to include the `EXTRA_VARS` if you've deployed arm64 -# instances: -make -C e2e/fixtures deploy-ec2-machines EXTRA_VARS='architecture=arm64' -make -C e2e/fixtures deploy-ec2-control-plane EXTRA_VARS='architecture=arm64' -``` +# Deploy the 'small' fixture variant with lima +make deploy-lima-fixture FIXTURE_VARIANT=small -#### Cleanup - -##### Tearing down the Control Plane - -You can tear down the Control Plane in the test fixtures as well as any -databases its deployed with this `make` target: - -```sh -make -C e2e/fixtures teardown-ec2-control-plane +# After it's deployed, it's used the same as the normal lima fixture +make test-e2e E2E_FIXTURE=lima -# It's important to include the `EXTRA_VARS` if you've deployed arm64 instances: -make -C e2e/fixtures teardown-ec2-control-plane EXTRA_VARS='architecture=arm64' +# Make sure to specify the variant with the other targets as well +make update-lima-fixture FIXTURE_VARIANT=small +make reset-lima-fixture FIXTURE_VARIANT=small +make teardown-lima-fixture FIXTURE_VARIANT=small ``` -This can be a faster alternative to remaking the virtual machines if you're -re-testing the cluster initialization flow. +> [!NOTE] +> Make sure to run the `teardown-{lima,ec2}-fixture` before switching variants. -##### Tearing down the virtual machines +#### Available variants -To completely remove the virtual machines, do: +- `small`: Contains three hosts, all with `ETCD_MODE=server` +- `large` (default): Contains six hosts, three with `ETCD_MODE=server` and three + with `ETCD_MODE=client` +- `huge`: Contains twelve hosts, five with `ETCD_MODE=server` and seven with + `ETCD_MODE=client` -```sh -make -C e2e/fixtures teardown-ec2-machines +There are also "global" variants that mirror the above variants but use `tc` to +introduce artificial latency between the hosts that simulates the latencies +between the `us-west-1`, `af-south-1`, and `ap-southeast-4` AWS regions. -# It's important to include the `EXTRA_VARS` if you've deployed arm64 instances: -make -C e2e/fixtures teardown-ec2-machines EXTRA_VARS='architecture=arm64' -``` +- `small_global` +- `large_global` +- `huge_global` ### Custom test fixtures diff --git a/e2e/fixtures/Makefile b/e2e/fixtures/Makefile index 00d848c3..565a337e 100644 --- a/e2e/fixtures/Makefile +++ b/e2e/fixtures/Makefile @@ -1,15 +1,20 @@ +include ../../common.mk + # Overridable vars -CONTROL_PLANE_VERSION ?= $(shell git describe --tags --abbrev=0 --match 'v*') -LIMA_VARS_FILE ?= vars/lima_rocky.yaml -EC2_VARS_FILE ?= vars/ec2_rocky.yaml +LIMA_VARS_FILE ?= vars/lima.yaml +EC2_VARS_FILE ?= vars/ec2.yaml +VARIANT ?= large EXTRA_VARS ?= +variant_vars_file=vars/$(VARIANT).yaml + ################ # Lima targets # ################ ansible_playbook_lima=ansible-playbook \ --extra-vars='@$(LIMA_VARS_FILE)' \ + --extra-vars='@$(variant_vars_file)' \ --extra-vars='$(EXTRA_VARS)' .PHONY: deploy-lima-machines @@ -49,6 +54,7 @@ teardown-lima-control-plane: ansible_playbook_ec2=ansible-playbook \ --extra-vars='@$(EC2_VARS_FILE)' \ + --extra-vars='@$(variant_vars_file)' \ --extra-vars='$(EXTRA_VARS)' .PHONY: deploy-ec2-machines diff --git a/e2e/fixtures/vars/ec2.yaml b/e2e/fixtures/vars/ec2.yaml new file mode 100644 index 00000000..3206fdd7 --- /dev/null +++ b/e2e/fixtures/vars/ec2.yaml @@ -0,0 +1,5 @@ +--- +minio_enabled: false +provider: ec2 +architecture: x86_64 +instance_os: rocky-9 diff --git a/e2e/fixtures/vars/ec2_rocky_huge.yaml b/e2e/fixtures/vars/huge.yaml similarity index 87% rename from e2e/fixtures/vars/ec2_rocky_huge.yaml rename to e2e/fixtures/vars/huge.yaml index 1d6157be..60a3ad87 100644 --- a/e2e/fixtures/vars/ec2_rocky_huge.yaml +++ b/e2e/fixtures/vars/huge.yaml @@ -1,27 +1,23 @@ --- -minio_enabled: false -provider: ec2 -architecture: x86_64 -instance_os: rocky-9 machines: - name: host-1 swarm_manager: true - name: host-2 swarm_manager: true - name: host-3 - swarm_manager: true + swarm_manager: false - name: host-4 - swarm_manager: true + swarm_manager: false - name: host-5 swarm_manager: true - name: host-6 - swarm_manager: false + swarm_manager: true - name: host-7 swarm_manager: false - name: host-8 swarm_manager: false - name: host-9 - swarm_manager: false + swarm_manager: true - name: host-10 swarm_manager: false - name: host-11 diff --git a/e2e/fixtures/vars/lima_rocky_huge.yaml b/e2e/fixtures/vars/huge_global.yaml similarity index 64% rename from e2e/fixtures/vars/lima_rocky_huge.yaml rename to e2e/fixtures/vars/huge_global.yaml index 143465cf..8f397ef9 100644 --- a/e2e/fixtures/vars/lima_rocky_huge.yaml +++ b/e2e/fixtures/vars/huge_global.yaml @@ -1,35 +1,38 @@ --- -minio_enabled: true -provider: lima -architecture: "{{ ansible_facts['architecture'] }}" -template: rocky-9 machines: - name: host-1 swarm_manager: true + region: us-west-1 - name: host-2 swarm_manager: true + region: us-west-1 - name: host-3 - swarm_manager: true + swarm_manager: false + region: us-west-1 - name: host-4 - swarm_manager: true + swarm_manager: false + region: us-west-1 - name: host-5 swarm_manager: true + region: af-south-1 - name: host-6 - swarm_manager: false + swarm_manager: true + region: af-south-1 - name: host-7 swarm_manager: false + region: af-south-1 - name: host-8 swarm_manager: false + region: af-south-1 - name: host-9 - swarm_manager: false + swarm_manager: true + region: ap-southeast-4 - name: host-10 swarm_manager: false + region: ap-southeast-4 - name: host-11 swarm_manager: false + region: ap-southeast-4 - name: host-12 swarm_manager: false -s3_repository: - bucket: backups - access_key_id: minioadmin - secret_access_key: minioadmin - region: us-east-1 + region: ap-southeast-4 diff --git a/e2e/fixtures/vars/ec2_rocky_large.yaml b/e2e/fixtures/vars/large.yaml similarity index 77% rename from e2e/fixtures/vars/ec2_rocky_large.yaml rename to e2e/fixtures/vars/large.yaml index e8c4cae2..6441d6d0 100644 --- a/e2e/fixtures/vars/ec2_rocky_large.yaml +++ b/e2e/fixtures/vars/large.yaml @@ -1,18 +1,14 @@ --- -minio_enabled: false -provider: ec2 -architecture: x86_64 -instance_os: rocky-9 machines: - name: host-1 swarm_manager: true - name: host-2 - swarm_manager: true + swarm_manager: false - name: host-3 swarm_manager: true - name: host-4 swarm_manager: false - name: host-5 - swarm_manager: false + swarm_manager: true - name: host-6 swarm_manager: false diff --git a/e2e/fixtures/vars/lima_rocky_large.yaml b/e2e/fixtures/vars/large_global.yaml similarity index 54% rename from e2e/fixtures/vars/lima_rocky_large.yaml rename to e2e/fixtures/vars/large_global.yaml index 3b696731..b3ad957f 100644 --- a/e2e/fixtures/vars/lima_rocky_large.yaml +++ b/e2e/fixtures/vars/large_global.yaml @@ -1,23 +1,20 @@ --- -minio_enabled: true -provider: lima -architecture: "{{ ansible_facts['architecture'] }}" -template: rocky-9 machines: - name: host-1 swarm_manager: true + region: us-west-1 - name: host-2 - swarm_manager: true + swarm_manager: false + region: us-west-1 - name: host-3 swarm_manager: true + region: af-south-1 - name: host-4 swarm_manager: false + region: af-south-1 - name: host-5 - swarm_manager: false + swarm_manager: true + region: ap-southeast-4 - name: host-6 swarm_manager: false -s3_repository: - bucket: backups - access_key_id: minioadmin - secret_access_key: minioadmin - region: us-east-1 + region: ap-southeast-4 diff --git a/e2e/fixtures/vars/lima_rocky.yaml b/e2e/fixtures/vars/lima.yaml similarity index 62% rename from e2e/fixtures/vars/lima_rocky.yaml rename to e2e/fixtures/vars/lima.yaml index 48c969a2..7fd5e2c5 100644 --- a/e2e/fixtures/vars/lima_rocky.yaml +++ b/e2e/fixtures/vars/lima.yaml @@ -3,13 +3,6 @@ minio_enabled: true provider: lima architecture: "{{ ansible_facts['architecture'] }}" template: rocky-9 -machines: - - name: host-1 - swarm_manager: true - - name: host-2 - swarm_manager: true - - name: host-3 - swarm_manager: true s3_repository: bucket: backups access_key_id: minioadmin diff --git a/e2e/fixtures/vars/lima_rocky_global.yaml b/e2e/fixtures/vars/lima_rocky_global.yaml deleted file mode 100644 index 738ffa66..00000000 --- a/e2e/fixtures/vars/lima_rocky_global.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -minio_enabled: true -provider: lima -architecture: "{{ ansible_facts['architecture'] }}" -template: rocky-9 -machines: - - name: host-1 - swarm_manager: true - region: us-west-1 - - name: host-2 - swarm_manager: true - region: af-south-1 - - name: host-3 - swarm_manager: true - region: ap-southeast-4 -s3_repository: - bucket: backups - access_key_id: minioadmin - secret_access_key: minioadmin - region: us-east-1 diff --git a/e2e/fixtures/vars/ec2_rocky.yaml b/e2e/fixtures/vars/small.yaml similarity index 64% rename from e2e/fixtures/vars/ec2_rocky.yaml rename to e2e/fixtures/vars/small.yaml index a630754b..882ae0c7 100644 --- a/e2e/fixtures/vars/ec2_rocky.yaml +++ b/e2e/fixtures/vars/small.yaml @@ -1,8 +1,4 @@ --- -minio_enabled: false -provider: ec2 -architecture: x86_64 -instance_os: rocky-9 machines: - name: host-1 swarm_manager: true diff --git a/e2e/fixtures/vars/small_global.yaml b/e2e/fixtures/vars/small_global.yaml new file mode 100644 index 00000000..b881f201 --- /dev/null +++ b/e2e/fixtures/vars/small_global.yaml @@ -0,0 +1,11 @@ +--- +machines: + - name: host-1 + swarm_manager: true + region: us-west-1 + - name: host-2 + swarm_manager: true + region: af-south-1 + - name: host-3 + swarm_manager: true + region: ap-southeast-4