Add E2E infra framework and test runner #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3 commits adding the initial infra + runner for LM e2es.
Still to come in other PRs are:
Also will require liquidmetal-dev/cluster-api-provider-microvm#203 to be merged before this can start running automatically.
For now you can run this like so:
feat: Add terraform to create test infra
This commit duplicates some of the tf setup I had in my demo env. This
is fine for now, I will modularise this later so we don't have almost
the same thing twice but my priority right now is getting this merged
and running in CI.
The
./scripts/tf.sh
has 3 options.-v
will produce a vars.json for subsequent terraform commands touse. It will check for a metro with capacity as well as some other
validation.
-u
(up) will runterraform apply
with--auto-approve
.-d
(down) will runterraform destroy
with--auto-approve
.The infra which is created on Equinix is almost the same as that which I
use for my demos. The main change is that there is no VPN set up. This
is because the VPN I used required a manual step (clicking a button in
Tailscale to approve subnet routes) which would not work here as we want
everything automated. The VPN was needed in my demo so that CAPMVM
clusters could be created from a local workstation without a) exposing
the infra publicly, and b) without having to reserve a public address to
serve as workload clusters' VIP LB address.
There are likely other, automatable ways to do this here, but I decided
not to get into that right now. So the tests which will eventually be
run against these Equinix hosts will be running within an Equinix
machine themselves for the immediate future.
feat: Add tool to run E2Es on TF infra
This introduces a simple binary intended to be run after the terraform
infra has been provisioned which will:
SSH...
Hopefully in the future it will be possible to run the e2es locally
while pointing at flintlocks running in Equinix, but I am punting that
networking stuff for a later date.
feat: Add Makefile
This adds a Makefile which ties it all together.
You can either run
make all
which will set-up, test, teardown allin one, or you can
make tf-up; make e2e; make tf-down
separately (thisis useful if you want to reuse the same fl hosts between runs).