diff --git a/docs/Graceful Reboot.md b/docs/Graceful Host Reboot.md similarity index 89% rename from docs/Graceful Reboot.md rename to docs/Graceful Host Reboot.md index fa1bd86..737ee36 100644 --- a/docs/Graceful Reboot.md +++ b/docs/Graceful Host Reboot.md @@ -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`. diff --git a/docs/Recovering From Power Outage.md b/docs/Recovering From Power Outage.md index 5c680f4..5993154 100644 --- a/docs/Recovering From Power Outage.md +++ b/docs/Recovering From Power Outage.md @@ -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. diff --git a/docs/Restart the Docker Daemon.md b/docs/Restart the Docker Daemon.md new file mode 100644 index 0000000..aa0d6f0 --- /dev/null +++ b/docs/Restart the Docker Daemon.md @@ -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` \ No newline at end of file diff --git a/server/config/monitoring/README.md b/server/config/monitoring/README.md index 98bc82b..e534774 100644 --- a/server/config/monitoring/README.md +++ b/server/config/monitoring/README.md @@ -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) \ No newline at end of file