Skip to content

Commit

Permalink
CI: cleanup '-scale' tests infra
Browse files Browse the repository at this point in the history
There is actually no test using this since ad6fece,
so there is no reason to keep that infra in our tests scripts.
  • Loading branch information
VannTen committed Sep 14, 2024
1 parent d54cfba commit 954a1f1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
7 changes: 1 addition & 6 deletions docs/developers/test_cases.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Node Layouts

There are six node layout types: `default`, `separate`, `ha`, `scale`, `all-in-one`, and `node-etcd-client`.
There are five node layout types: `default`, `separate`, `ha`, `all-in-one`, and `node-etcd-client`.

`default` is a non-HA two nodes setup with one separate `kube_node`
and the `etcd` group merged with the `kube_control_plane`.
Expand All @@ -11,11 +11,6 @@ and the `etcd` group merged with the `kube_control_plane`.
`ha` layout consists of two etcd nodes, two control planes and a single worker node,
with role intersection.

`scale` layout can be combined with above layouts (`ha-scale`, `separate-scale`). It includes 200 fake hosts
in the Ansible inventory. This helps test TLS certificate generation at scale
to prevent regressions and profile certain long-running tasks. These nodes are
never actually deployed, but certificates are generated for them.

`all-in-one` layout use a single node for with `kube_control_plane`, `etcd` and `kube_node` merged.

`node-etcd-client` layout consists of a 4 nodes cluster, all of them in `kube_node`, first 3 in `etcd` and only one `kube_control_plane`.
Expand Down
6 changes: 2 additions & 4 deletions tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
instance-{{ loop.index }} ansible_host={{instance.stdout}}
{% endfor %}

{% if mode is defined and mode in ["separate", "separate-scale"] %}
{% if mode == "separate" %}
[kube_control_plane]
instance-1

Expand All @@ -12,7 +12,7 @@ instance-2

[etcd]
instance-3
{% elif mode is defined and mode in ["ha", "ha-scale"] %}
{% elif mode == "ha" %}
[kube_control_plane]
instance-1
instance-2
Expand Down Expand Up @@ -103,5 +103,3 @@ kube_control_plane
calico_rr

[calico_rr]

[fake_hosts]
2 changes: 0 additions & 2 deletions tests/cloud_playbooks/roles/packet-ci/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
_vm_count_dict:
separate: 3
separate-scale: 3
ha: 3
ha-scale: 3
ha-recover: 3
ha-recover-noquorum: 3
all-in-one: 1
Expand Down
6 changes: 3 additions & 3 deletions tests/scripts/testcases_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ run_playbook () {
playbook=$1
shift
# We can set --limit here and still pass it as supplemental args because `--limit` is a 'last one wins' option
ansible-playbook --limit "all:!fake_hosts" \
ansible-playbook \
$ANSIBLE_LOG_LEVEL \
-e @${CI_TEST_SETTING} \
-e @${CI_TEST_REGISTRY_MIRROR} \
Expand Down Expand Up @@ -85,8 +85,8 @@ fi

# Test control plane recovery
if [ "${RECOVER_CONTROL_PLANE_TEST}" != "false" ]; then
run_playbook reset.yml --limit "${RECOVER_CONTROL_PLANE_TEST_GROUPS}:!fake_hosts" -e reset_confirmation=yes
run_playbook recover-control-plane.yml -e etcd_retries=10 --limit "etcd:kube_control_plane:!fake_hosts"
run_playbook reset.yml --limit "${RECOVER_CONTROL_PLANE_TEST_GROUPS}" -e reset_confirmation=yes
run_playbook recover-control-plane.yml -e etcd_retries=10 --limit "etcd:kube_control_plane"
fi

# Test collection build and install by installing our collection, emptying our repository, adding
Expand Down
3 changes: 0 additions & 3 deletions tests/templates/fake_hosts.yml.j2

This file was deleted.

0 comments on commit 954a1f1

Please sign in to comment.