From 197a8427b7d4a69f4059e2b64f832f76e2cbff4a Mon Sep 17 00:00:00 2001 From: kalipso Date: Mon, 20 Jan 2025 12:27:05 +0100 Subject: [PATCH] [docs] add run-vm examples --- doc/src/anleitung/microvm.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/doc/src/anleitung/microvm.md b/doc/src/anleitung/microvm.md index 9856ed0..ad7ccee 100644 --- a/doc/src/anleitung/microvm.md +++ b/doc/src/anleitung/microvm.md @@ -12,13 +12,31 @@ Use durruti as orientation: "10.0.0.5" is the IP assigned to its tap interface. ### Testing MicroVMs locally -MicroVMs can be built and run easily on your local host, but they are not persistent! -For durruti for example this is done by: +MicroVMs can be built and run easily on your localhost for development. +We provide the script ```run-vm``` to handle stuff like development (dummy) secrets, sharing directories, ect. easily. +Usage examples: ``` bash -nix run .\#durruti-vm +# run without args to get available options and usage info +run-vm + +# run nextcloud locally with dummy secrets +run-vm nextcloud --dummy-secrets + +# share a local folder as /var/lib dir so that nextcloud application data stays persistent between boots +mkdir /tmp/nextcloud +run-vm nextcloud --dummy-secrets --varlib /tmp/nextcloud + +# enable networking to provide connectivity between multiple vms +# for that the malobeo hostBridge must be enabled on your host +# this example deploys persistent grafana on overwatch and fetches metrics from infradocs +mkdir overwatch +run-vm overwatch --networking --varlib /tmp/overwatch +run-vm infradocs --networking ``` -### Testing persistent microvms + + +### Fully deploy microvms on local host In order to test persistent microvms locally we need to create them using the ```microvm``` command. This is necessary to be able to mount persistent /etc and /var volumes on those hosts. Do the following: