diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 00000000..e261386a --- /dev/null +++ b/test/Makefile @@ -0,0 +1,12 @@ +.POSIX: + +run: + multipass list | grep homelab \ + || multipass launch \ + --cpus 4 \ + --mem 8G \ + --disk 64G \ + --cloud-init ./multipass-cloud-init.yaml \ + --name homelab \ + release:20.10 + multipass shell homelab diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000..5ce3b8b2 --- /dev/null +++ b/test/README.md @@ -0,0 +1,9 @@ +# Test + +This will create a virtual machine on your laptop to emulate layer 0 (metal). + +You can run anything from layer 1 and up. + +```sh +make +``` diff --git a/test/lxd.yaml b/test/lxd.yaml new file mode 100644 index 00000000..eec75772 --- /dev/null +++ b/test/lxd.yaml @@ -0,0 +1,38 @@ +config: + core.https_address: 192.168.64.5:8443 + core.trust_password: "1" +networks: +- config: + bridge.mode: fan + fan.underlay_subnet: auto + description: "" + name: lxdfan0 + type: "" + project: default +storage_pools: +- config: + size: 50GB + description: "" + name: local + driver: zfs +profiles: +- config: {} + description: "" + devices: + eth0: + name: eth0 + network: lxdfan0 + type: nic + root: + path: / + pool: local + type: disk + name: default +cluster: + server_name: metal0 + enabled: true + member_config: [] + cluster_address: "" + cluster_certificate: "" + server_address: "" + cluster_password: "" diff --git a/test/multipass-cloud-init.yaml b/test/multipass-cloud-init.yaml new file mode 100644 index 00000000..3c840119 --- /dev/null +++ b/test/multipass-cloud-init.yaml @@ -0,0 +1,7 @@ +#cloud-config + +runcmd: + - snap install --classic kubectl terraform + - snap install lxd terraform + - snap install kubectl --classic + - snap install terraform --classic