Update docs

This commit is contained in:
Joey Hafner 2022-07-08 11:10:33 -07:00
parent a4b9200a37
commit ee6ff79b8d
4 changed files with 13 additions and 16 deletions

View File

@ -9,12 +9,6 @@ The NAS is relied upon for many other hosts on the network, which need to be off
7. After the NAS WebUI is available, SSH into the server and run `sudo mount -a`
8. Online the stacks affected by step 2.
# Seedbox
1. Stop all Docker containers with `docker stop $(docker ps -aq)`.
2. Reboot the host with `sudo reboot now`.
3. When the host has finished booting, re-mount all NAS shares defined in `/etc/fstab` with `sudo mount -a`.
4. Start all Docker containers with `docker start $(docker ps -aq)`.
# Server
1. Stop all Docker containers with `docker stop $(docker ps -aq)`.
2. Reboot the host with `sudo reboot now`.

View File

@ -7,6 +7,5 @@ Switches and APs should not need power cycling. Once the indicator LED is solid
## 2. Homelab
1. Power on the desktop or laptop.
2. Power on the NAS. The DS4243 will power itself on automatically. **Wait until the webui at [nas.jafner.net](http://nas.jafner.net) is responsive.**
3. Power on the Seedbox. Once it is accessible, run a `sudo mount -a` to mount all network shares defined in `/etc/fstab`. Then run `docker start $(docker ps -aq)` to start all Docker containers.
4. Power on the Server. Once it is accessible, run a `sudo mount -a` to mount all network shares defined in `/etc/fstab`. Then run `docker start $(docker ps -aq)` to start all Docker containers. Note: Run `docker inspect -f '{{ .Mounts }}' $(docker ps -q)` to get a list of volumes for all running containers, useful for determining whether a container is reliant on a mounted directory.
3. Power on the Server. Once it is accessible, run a `sudo mount -a` to mount all network shares defined in `/etc/fstab`. Then run `docker start $(docker ps -aq)` to start all Docker containers. Note: Run `docker inspect -f '{{ .Mounts }}' $(docker ps -q)` to get a list of volumes for all running containers, useful for determining whether a container is reliant on a mounted directory.

View File

@ -0,0 +1,6 @@
# Restart the Docker Daemon
Sometimes it may be necessary to restart the Docker daemon (for example to apply changes made in `/etc/docker/daemon.json`) and recreate all containers. Here's how:
1. Shut down and destroy all containers: `docker stop $(docker ps -aq) && docker rm $(docker ps -aq)`.
2. *Restart* (not reload) the Docker daemon: `sudo systemctl restart docker`.
3. Recreate all containers (to use the new default loki logging): `for app in ~/homelab/server/config/*; do cd $app && docker-compose up -d; done`
4. Manually boot Minecraft containers as appropriate: `cd ~/homelab/server/config/minecraft && for server in router vanilla bmcp; do docker-compose -f $server.yml up -d; done`

View File

@ -37,19 +37,17 @@ All monitors use a Prometheus exporter.
Followed [this guide from Techno Tim](https://docs.technotim.live/posts/grafana-loki/).
Non-tracked changes include:
1. `docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions` to install the Loki docker plugin.
2. Edit `/etc/docker/daemon.json` to look like:
2. Edit `/etc/docker/daemon.json` to add the following block:
```json
{
"live-restore": true
"log-driver": "loki",
"log-opts": {
"loki-url": "http://localhost:3100/loki/api/v1/push",
"loki-batch-size": "400"
},
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
```
3. Refer to the documentation for [restarting the docker daemon](/homelab/docs/Restart the Docker Daemon.md)