doc: dev env
This commit is contained in:
parent
51460ad776
commit
96a4b1052f
16
README.md
16
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)
|
* (verschlüsselte) [Kontakte zu den Personen mit den einzelnen Anschlüssen](contact.md.gpg)
|
||||||
* Dokumentation
|
* Dokumentation
|
||||||
* [WiFi-Provisionierung](doc/wifi-provisioning.md) und Erstellung von Privatnetzen
|
* [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
|
* `flake.nix` und Unterverzeichnis [nix/](nix): Konfigurationsskripte
|
||||||
|
|
||||||
### Nixification Roadmap
|
### 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
|
- [ ] device-scripts auf Site Config umstellen
|
||||||
- [ ] Site Config dumpen, Salt-Daten löschen
|
- [ ] 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
|
### Server Setup
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -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
|
|
||||||
```
|
|
Loading…
Reference in New Issue