From 96a4b1052ff5c6ada388551d2881e4290a8c7d6d Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 11 Apr 2021 01:09:43 +0200 Subject: [PATCH] doc: dev env --- README.md | 16 ++++++++++++++- doc/test-environment.md | 43 ----------------------------------------- 2 files changed, 15 insertions(+), 44 deletions(-) delete mode 100644 doc/test-environment.md diff --git a/README.md b/README.md index 71a7645..3653e38 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ Wir, ein kleiner Kreis von Menschen die das Netzwerk im Zentralwerk betreuen, ha * (verschlüsselte) [Kontakte zu den Personen mit den einzelnen Anschlüssen](contact.md.gpg) * Dokumentation * [WiFi-Provisionierung](doc/wifi-provisioning.md) und Erstellung von Privatnetzen - * [Einrichtung einer Testumgebung fürs Mit- und Nachmachen (Entwicklung)](doc/test-environment.md) * `flake.nix` und Unterverzeichnis [nix/](nix): Konfigurationsskripte ### Nixification Roadmap @@ -38,6 +37,21 @@ Wir, ein kleiner Kreis von Menschen die das Netzwerk im Zentralwerk betreuen, ha - [ ] device-scripts auf Site Config umstellen - [ ] Site Config dumpen, Salt-Daten löschen +### Development Setup + +Get Nix with Flakes first: +``` +nix-shell -p nixFlakes +``` + +To test-drive a server, run in a checkout of this repository: +``` +nix run .#server2-vm +``` + +Login as `root` with an empty password. Use `build-container $(ls -1 +/etc/lxc/containers)` to build and start the required containers. + ### Server Setup ``` diff --git a/doc/test-environment.md b/doc/test-environment.md deleted file mode 100644 index 9c2f1b4..000000000 --- a/doc/test-environment.md +++ /dev/null @@ -1,43 +0,0 @@ -# Create a Virtual Machine - -TODO: nixify - -```shell -dd if=/dev/zero of=salt.hda bs=1M count=1 seek=10239 -wget http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso -kvm -hda salt.hda -m 1024 -smp 2 -net nic,model=e1000 -net user -cdrom -``` - -Now run the Debian installation. Hostname: `server1` - -```shell -brctl addbr br-up1 -ifdown eth0 -brctl addif br-up1 eth0 -dhclient br-up1 -``` - -# Bootstrap - -Configure a recent version, eg. *stretch* - -```shell -apt-get install salt-master salt-minion -``` - -Set `master` to `localhost` in `/etc/salt/minion`, restart the -minion. `salt-key -A` to accept the minion in the master. - -```shell -salt \* state.apply -``` - -Then accept the container minions: -```shell -salt-key -A -``` - -And again: -```shell -salt \* state.apply -```