From df054da499a5ad83e032294ea2e2b9d347af8d7d Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Wed, 13 Jul 2022 10:47:27 -0700 Subject: [PATCH] Disable auto-start for all containers. (Set all restart: "no") --- docs/Complete and Partial Rackdown.md | 48 +++++++++++++++++++ .../config/5etools/docker-compose.yml | 2 +- jafner-tools/config/joplin/docker-compose.yml | 4 +- .../config/librespeed/docker-compose.yml | 2 +- .../config/traefik/docker-compose.yml | 2 +- .../config/uptime-kuma/docker-compose.yml | 2 +- .../config/vaultwarden/docker-compose.yml | 2 +- .../config/xbackbone/docker-compose.yml | 2 +- server/README.md | 4 +- server/archives/xbackbone/docker-compose.yml | 2 +- server/config/authentik/docker-compose.yml | 8 ++-- .../config/cloudflare-ddns/docker-compose.yml | 2 +- server/config/gitlab/docker-compose.yml | 6 +-- server/config/landing/docker-compose.yml | 4 +- server/config/librespeed/docker-compose.yml | 2 +- server/config/minecraft/bmcp.yml | 2 +- server/config/minecraft/e6.yml | 2 +- server/config/minecraft/fan.yml | 2 +- server/config/minecraft/router.yml | 2 +- server/config/monitoring/docker-compose.yml | 14 +++--- server/config/navidrome/docker-compose.yml | 2 +- server/config/nvgm/docker-compose.yml | 4 +- server/config/portainer/docker-compose.yml | 2 +- server/config/portfolio/docker-compose.yml | 4 +- server/config/send/docker-compose.yml | 4 +- server/config/sftp/docker-compose.yml | 2 +- server/config/stashapp/docker-compose.yml | 2 +- server/config/traefik/docker-compose.yml | 2 +- .../unifi_controller/docker-compose.yml | 2 +- server/config/uptime-kuma/docker-compose.yml | 2 +- server/config/wireguard/docker-compose.yml | 2 +- 31 files changed, 95 insertions(+), 47 deletions(-) create mode 100644 docs/Complete and Partial Rackdown.md diff --git a/docs/Complete and Partial Rackdown.md b/docs/Complete and Partial Rackdown.md new file mode 100644 index 0000000..a217332 --- /dev/null +++ b/docs/Complete and Partial Rackdown.md @@ -0,0 +1,48 @@ +# About +"Rackdown" is AWS slang for turning a rack of hosts off and on again. In this case, the "rack" refers to practically all components of the DC. Server, NAS, disk shelf, switches, router, PiHole, modem, APs, and desktops. This doc will consolidate previous docs and provide an overall shutdown and reboot procedure. + +# Overview (Dependency Graph) +```mermaid +flowchart TD; + CLN["CenturyLink node"]<--Depends--ONT; + ONT<--Cat5e-->Modem[ISP Modem/Router]; + Modem<--Cat5e-->Router[Ubiquiti EdgeRouter 10X]; + Router<--Cat5e-->switch_homelab[NetGear 8-Port Switch for Homelab]; + switch_homelab<--Cat6-->desktop_joey[Joey's Desktop]; + switch_homelab<--Cat5-->desktop_bridget[Bridget's Desktop]; + switch_homelab<--Cat6-->NAS; + NAS<--SFP+ DAC-->Desktop; + NAS<--SFP+ DAC-->Server; + switch_homelab<--Cat6-->Server; + switch_homelab<--Cat6-->Seedbox; + switch_homelab<--Cat5e-->Pihole; + Router<--Cat5e-->switch_basementtv[TP-Link 5-Port Switch for Basement TV]; + switch_basementtv<--Cat6-->desktop_maddie[Maddie's Desktop]; + switch_basementtv<--Cat5e-->client_tv_downstairs[Downstairs TV]; + Router<--Cat6-->wap_basement[Ubiquiti Unifi U6-Lite]; + wap_basement<--Wifi6 2.4/5GHz-->clients_wireless_basement[Basement Wireless Clients]; + Router<--Cat6-->wap_upstairs[Ubiquiti Unifi UAP-AC-LR]; + wap_upstairs<--Wifi5 2.4/5GHz-->clients_wireless_upstairs[Upstairs Wireless Clients]; + Router<--Cat6-->desktop_mom[Mom's Desktop]; + Router<--Cat6-->desktop_dad[Dad's Desktop]; + Router<-->desktop_gus[Gus' Desktop]; +``` + +## Booting the ONT +1. Unplug the 6-pin power plug. Wait 15 seconds. +2. Plug the power plug back in. Wait for the top three lights to be solid green. + +## Booting the modem (Zyxel C3000Z) +1. Unplug the barrel power plug. Wait 15 seconds. +2. Plug the power plug back in. Wait for the "Power" and "WAN/LAN" lights to be solid green (the WAN/LAN light might flicker, that's okay. ) + +## Booting the Router (Ubiquiti EdgeRouter 10X) +1. Uplug the barrel power plug. Wait 15 seconds. +2. Plug the power plug back in. Wait for the indicator LED to be solid white. + +## Booting the Server +1. Shut down most services: `for app in ~/homelab/server/config/*; do echo "===== SHUTTING DOWN $app =====" && cd $app && docker-compose down; done` +2. Shut down Minecraft servers: `cd ~/homelab/server/config/minecraft && for service in ./*.yml; do echo "===== SHUTTING DOWN $service =====" && docker-compose -f $service down; done` +3. Shut down the host: `sudo shutdown now`. Wait 30 seconds. +4. Press the power button on the front of the chassis to begin booting. Take note of any POST beeps during this time. Wait for the host to be accessible via SSH. +5. Check current running docker containers \ No newline at end of file diff --git a/jafner-tools/config/5etools/docker-compose.yml b/jafner-tools/config/5etools/docker-compose.yml index 0679748..17f3c51 100644 --- a/jafner-tools/config/5etools/docker-compose.yml +++ b/jafner-tools/config/5etools/docker-compose.yml @@ -3,7 +3,7 @@ services: 5etools: container_name: 5etools image: jafner/5etools-docker - restart: always + restart: "no" volumes: - $DOCKER_DATA/htdocs:/usr/local/apache2/htdocs environment: diff --git a/jafner-tools/config/joplin/docker-compose.yml b/jafner-tools/config/joplin/docker-compose.yml index 7799b43..90957f6 100644 --- a/jafner-tools/config/joplin/docker-compose.yml +++ b/jafner-tools/config/joplin/docker-compose.yml @@ -3,7 +3,7 @@ services: joplin: image: joplin/server:2.6-beta container_name: joplin_server - restart: unless-stopped + restart: "no" env_file: - .env depends_on: @@ -20,7 +20,7 @@ services: joplin_db: image: postgres:13.1 container_name: joplin_db - restart: unless-stopped + restart: "no" env_file: - .env volumes: diff --git a/jafner-tools/config/librespeed/docker-compose.yml b/jafner-tools/config/librespeed/docker-compose.yml index fbb5287..0ff9f3c 100644 --- a/jafner-tools/config/librespeed/docker-compose.yml +++ b/jafner-tools/config/librespeed/docker-compose.yml @@ -3,7 +3,7 @@ services: librespeed: container_name: librespeed image: adolfintel/speedtest - restart: always + restart: "no" environment: - TITLE=LibreSpeed@Jafner.tools - TELEMETRY=true diff --git a/jafner-tools/config/traefik/docker-compose.yml b/jafner-tools/config/traefik/docker-compose.yml index f89738a..de1a18e 100644 --- a/jafner-tools/config/traefik/docker-compose.yml +++ b/jafner-tools/config/traefik/docker-compose.yml @@ -3,7 +3,7 @@ services: traefik: container_name: traefik_traefik image: traefik:latest - restart: always + restart: "no" networks: - web ports: diff --git a/jafner-tools/config/uptime-kuma/docker-compose.yml b/jafner-tools/config/uptime-kuma/docker-compose.yml index f56a23c..14c2935 100644 --- a/jafner-tools/config/uptime-kuma/docker-compose.yml +++ b/jafner-tools/config/uptime-kuma/docker-compose.yml @@ -3,7 +3,7 @@ services: uptime-kuma: image: louislam/uptime-kuma container_name: uptime-kuma_uptime-kuma - restart: always + restart: "no" volumes: - $DOCKER_DATA/data:/app/data networks: diff --git a/jafner-tools/config/vaultwarden/docker-compose.yml b/jafner-tools/config/vaultwarden/docker-compose.yml index 05fc9a5..e14f63f 100644 --- a/jafner-tools/config/vaultwarden/docker-compose.yml +++ b/jafner-tools/config/vaultwarden/docker-compose.yml @@ -3,7 +3,7 @@ services: vaultwarden: image: vaultwarden/server:latest container_name: vaultwarden_vaultwarden - restart: unless-stopped + restart: "no" env_file: - .env networks: diff --git a/jafner-tools/config/xbackbone/docker-compose.yml b/jafner-tools/config/xbackbone/docker-compose.yml index 4e83f3f..96d5b28 100644 --- a/jafner-tools/config/xbackbone/docker-compose.yml +++ b/jafner-tools/config/xbackbone/docker-compose.yml @@ -3,7 +3,7 @@ services: xbackbone: image: linuxserver/xbackbone container_name: xbackbone_xbackbone - restart: unless-stopped + restart: "no" environment: - PUID=1000 - PGID=1000 diff --git a/server/README.md b/server/README.md index 23ba4e4..0e8d0c4 100644 --- a/server/README.md +++ b/server/README.md @@ -70,7 +70,7 @@ services: image: container_name: _ user: "1000:1000" - restart: unless-stopped + restart: "no" environment: PUID: ${PUID} PGID: ${PGID} @@ -90,7 +90,7 @@ services: image: container_name: _db user: "1000:1000" - restart: unless-stopped + restart: "no" networks: - environment: diff --git a/server/archives/xbackbone/docker-compose.yml b/server/archives/xbackbone/docker-compose.yml index c7d0d08..c9afa53 100644 --- a/server/archives/xbackbone/docker-compose.yml +++ b/server/archives/xbackbone/docker-compose.yml @@ -3,7 +3,7 @@ services: xbackbone: image: linuxserver/xbackbone container_name: xbackbone_xbackbone - restart: unless-stopped + restart: "no" environment: - PUID=1000 - PGID=1000 diff --git a/server/config/authentik/docker-compose.yml b/server/config/authentik/docker-compose.yml index 5f9e089..788ee13 100644 --- a/server/config/authentik/docker-compose.yml +++ b/server/config/authentik/docker-compose.yml @@ -4,7 +4,7 @@ services: postgresql: image: postgres:12-alpine container_name: authentik_postgres - restart: unless-stopped + restart: "no" healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] start_period: 20s @@ -33,7 +33,7 @@ services: timeout: 3s networks: - authentik - restart: unless-stopped + restart: "no" server: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.7.1} @@ -43,7 +43,7 @@ services: web: aliases: - authentik-server - restart: unless-stopped + restart: "no" command: server environment: AUTHENTIK_HOST: http://authentik-server:9000 @@ -67,7 +67,7 @@ services: worker: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.1.3} container_name: authentik_worker - restart: unless-stopped + restart: "no" networks: - authentik command: worker diff --git a/server/config/cloudflare-ddns/docker-compose.yml b/server/config/cloudflare-ddns/docker-compose.yml index cef55b6..408ce11 100644 --- a/server/config/cloudflare-ddns/docker-compose.yml +++ b/server/config/cloudflare-ddns/docker-compose.yml @@ -3,7 +3,7 @@ services: cloudflare-ddns: image: oznu/cloudflare-ddns container_name: ddns_cloudflare-ddns - restart: unless-stopped + restart: "no" environment: - API_KEY=6wjPH5DND2dFjWIuNTq_TVL-VJS9czp5Wlq3_4ju - ZONE=jafner.net diff --git a/server/config/gitlab/docker-compose.yml b/server/config/gitlab/docker-compose.yml index 6b947ba..bf26af7 100644 --- a/server/config/gitlab/docker-compose.yml +++ b/server/config/gitlab/docker-compose.yml @@ -3,7 +3,7 @@ services: gitlab: image: 'gitlab/gitlab-ee:latest' container_name: gitlab_gitlab - restart: unless-stopped + restart: "no" hostname: 'gitlab.jafner.net' networks: - web @@ -85,7 +85,7 @@ services: gitlab-runner-0: image: 'gitlab/gitlab-runner:latest' container_name: gitlab_runner_0 - restart: always + restart: "no" environment: - GODEBUG="x509ignoreCN=0" volumes: @@ -97,7 +97,7 @@ services: gitlab-runner-1: image: 'gitlab/gitlab-runner:latest' container_name: gitlab_runner_1 - restart: always + restart: "no" environment: - GODEBUG="x509ignoreCN=0" volumes: diff --git a/server/config/landing/docker-compose.yml b/server/config/landing/docker-compose.yml index e8cf0dc..b2f2dbf 100644 --- a/server/config/landing/docker-compose.yml +++ b/server/config/landing/docker-compose.yml @@ -4,7 +4,7 @@ services: landing: image: wordpress container_name: wordpress_landing - restart: always + restart: "no" environment: WORDPRESS_DB_HOST: landing_db WORDPRESS_DB_USER: wordpress @@ -27,7 +27,7 @@ services: landing_db: image: mysql:5.7 container_name: wordpress_landing-db - restart: always + restart: "no" networks: - landing environment: diff --git a/server/config/librespeed/docker-compose.yml b/server/config/librespeed/docker-compose.yml index bf24ec6..c617ad5 100644 --- a/server/config/librespeed/docker-compose.yml +++ b/server/config/librespeed/docker-compose.yml @@ -3,7 +3,7 @@ services: librespeed: container_name: librespeed image: adolfintel/speedtest - restart: always + restart: "no" environment: - TITLE=LibreSpeed@Jafner.net - TELEMETRY=true diff --git a/server/config/minecraft/bmcp.yml b/server/config/minecraft/bmcp.yml index bb9267f..3e34c7b 100644 --- a/server/config/minecraft/bmcp.yml +++ b/server/config/minecraft/bmcp.yml @@ -24,7 +24,7 @@ services: - $DOCKER_DATA/bmcp:/data:rw networks: - mc-router - restart: always + restart: "no" networks: mc-router: external: true diff --git a/server/config/minecraft/e6.yml b/server/config/minecraft/e6.yml index 4b6f93a..ffd5c81 100644 --- a/server/config/minecraft/e6.yml +++ b/server/config/minecraft/e6.yml @@ -17,7 +17,7 @@ services: - $DOCKER_DATA/e6:/data:rw networks: - mc-router - restart: always + restart: "no" networks: mc-router: external: true diff --git a/server/config/minecraft/fan.yml b/server/config/minecraft/fan.yml index 52ee66e..2a2e1fa 100644 --- a/server/config/minecraft/fan.yml +++ b/server/config/minecraft/fan.yml @@ -23,7 +23,7 @@ services: - $DOCKER_DATA/fan:/data:rw networks: - mc-router - restart: always + restart: "no" networks: mc-router: external: true diff --git a/server/config/minecraft/router.yml b/server/config/minecraft/router.yml index 2667aed..08f2ba6 100644 --- a/server/config/minecraft/router.yml +++ b/server/config/minecraft/router.yml @@ -3,7 +3,7 @@ services: router: image: itzg/mc-router container_name: minecraft_mc-router - restart: always + restart: "no" networks: - mc-router ports: diff --git a/server/config/monitoring/docker-compose.yml b/server/config/monitoring/docker-compose.yml index ed3234f..f83738e 100644 --- a/server/config/monitoring/docker-compose.yml +++ b/server/config/monitoring/docker-compose.yml @@ -3,7 +3,7 @@ services: grafana: image: grafana/grafana-oss:latest container_name: monitoring_grafana - restart: unless-stopped + restart: "no" networks: - monitoring - web @@ -28,7 +28,7 @@ services: volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - ${DOCKER_DATA}/prometheus:/prometheus - restart: unless-stopped + restart: "no" command: - "--config.file=/etc/prometheus/prometheus.yml" labels: @@ -47,7 +47,7 @@ services: volumes: - ${DOCKER_DATA}/loki:/etc/loki - ./loki-config.yml:/etc/loki/loki-config.yml # not sure if this works. If not, just edit the config within the data volume - restart: unless-stopped + restart: "no" command: -config.file=/etc/loki/loki-config.yml labels: - traefik.http.routers.loki.rule=Host(`loki.jafner.net`) @@ -56,7 +56,7 @@ services: pihole-jafner-net: image: ekofr/pihole-exporter:latest container_name: monitoring_prometheus-pihole-jafner-net - restart: unless-stopped + restart: "no" networks: - monitoring environment: @@ -71,7 +71,7 @@ services: image: itzg/mc-monitor # https://github.com/itzg/mc-monitor container_name: monitoring_mc-monitor command: export-for-prometheus - restart: unless-stopped + restart: "no" networks: - monitoring - mc-router @@ -83,7 +83,7 @@ services: plex-exporter: image: granra/plex_exporter container_name: monitoring_plex-exporter - restart: unless-stopped + restart: "no" networks: - monitoring command: @@ -96,7 +96,7 @@ services: sabnzbd_exporter: image: msroest/sabnzbd_exporter # https://github.com/msroest/sabnzbd_exporter container_name: monitoring_sabnzbd_exporter - restart: unless-stopped + restart: "no" networks: - monitoring environment: diff --git a/server/config/navidrome/docker-compose.yml b/server/config/navidrome/docker-compose.yml index a0bdd18..84bc796 100644 --- a/server/config/navidrome/docker-compose.yml +++ b/server/config/navidrome/docker-compose.yml @@ -6,7 +6,7 @@ services: user: 1000:1000 networks: - web - restart: unless-stopped + restart: "no" environment: ND_BASEURL: "" volumes: diff --git a/server/config/nvgm/docker-compose.yml b/server/config/nvgm/docker-compose.yml index abdf419..5ffdee1 100644 --- a/server/config/nvgm/docker-compose.yml +++ b/server/config/nvgm/docker-compose.yml @@ -4,7 +4,7 @@ services: nvgm: image: wordpress container_name: wordpress_nvgm - restart: unless-stopped + restart: "no" environment: WORDPRESS_DB_HOST: nvgm_db WORDPRESS_DB_USER: wordpress @@ -26,7 +26,7 @@ services: nvgm_db: image: mysql:5.7 container_name: wordpress_nvgm-db - restart: unless-stopped + restart: "no" networks: - nvgm environment: diff --git a/server/config/portainer/docker-compose.yml b/server/config/portainer/docker-compose.yml index 4b635da..1e463b9 100644 --- a/server/config/portainer/docker-compose.yml +++ b/server/config/portainer/docker-compose.yml @@ -3,7 +3,7 @@ services: portainer: image: portainer/portainer-ce container_name: portainer_portainer - restart: unless-stopped + restart: "no" command: -H unix:///var/run/docker.sock networks: - web diff --git a/server/config/portfolio/docker-compose.yml b/server/config/portfolio/docker-compose.yml index 53746b1..a68d456 100644 --- a/server/config/portfolio/docker-compose.yml +++ b/server/config/portfolio/docker-compose.yml @@ -4,7 +4,7 @@ services: portfolio: image: wordpress container_name: wordpress_portfolio - restart: always + restart: "no" environment: WORDPRESS_DB_HOST: portfolio_db WORDPRESS_DB_USER: wordpress @@ -26,7 +26,7 @@ services: portfolio_db: image: mysql:5.7 container_name: wordpress_portfolio-db - restart: always + restart: "no" networks: - portfolio environment: diff --git a/server/config/send/docker-compose.yml b/server/config/send/docker-compose.yml index f815486..e9a7ffc 100644 --- a/server/config/send/docker-compose.yml +++ b/server/config/send/docker-compose.yml @@ -3,7 +3,7 @@ services: send: image: registry.gitlab.com/timvisee/send:latest container_name: send_send - restart: always + restart: "no" networks: - send - web @@ -30,7 +30,7 @@ services: container_name: send_redis networks: - send - restart: always + restart: "no" volumes: - send-redis:/data diff --git a/server/config/sftp/docker-compose.yml b/server/config/sftp/docker-compose.yml index 2918f4d..eb47c3a 100644 --- a/server/config/sftp/docker-compose.yml +++ b/server/config/sftp/docker-compose.yml @@ -3,7 +3,7 @@ services: sftp: image: atmoz/sftp container_name: sftp_sftp - restart: unless-stopped + restart: "no" ports: - 23450:22/tcp volumes: diff --git a/server/config/stashapp/docker-compose.yml b/server/config/stashapp/docker-compose.yml index 6af3bd6..761cfb2 100644 --- a/server/config/stashapp/docker-compose.yml +++ b/server/config/stashapp/docker-compose.yml @@ -3,7 +3,7 @@ services: stash: container_name: stash image: stashapp/stash:latest - restart: unless-stopped + restart: "no" volumes: - /etc/localtime:/etc/localtime:ro - $METADATA_DIR/generated:/generated diff --git a/server/config/traefik/docker-compose.yml b/server/config/traefik/docker-compose.yml index fc1d3bd..4160f12 100644 --- a/server/config/traefik/docker-compose.yml +++ b/server/config/traefik/docker-compose.yml @@ -4,7 +4,7 @@ services: traefik: image: traefik:latest container_name: traefik_traefik - restart: unless-stopped + restart: "no" networks: - web ports: diff --git a/server/config/unifi_controller/docker-compose.yml b/server/config/unifi_controller/docker-compose.yml index 3cb6817..9bb5dfc 100644 --- a/server/config/unifi_controller/docker-compose.yml +++ b/server/config/unifi_controller/docker-compose.yml @@ -3,7 +3,7 @@ services: unifi-controller: image: lscr.io/linuxserver/unifi-controller container_name: unifi_controller - restart: unless-stopped + restart: "no" environment: - PUID=1000 - PGID=1000 diff --git a/server/config/uptime-kuma/docker-compose.yml b/server/config/uptime-kuma/docker-compose.yml index 8926b14..d919ab2 100644 --- a/server/config/uptime-kuma/docker-compose.yml +++ b/server/config/uptime-kuma/docker-compose.yml @@ -7,7 +7,7 @@ services: uptime-kuma: image: louislam/uptime-kuma container_name: monitoring_uptime-kuma - restart: unless-stopped + restart: "no" volumes: - ${DOCKER_DATA}/data:/app/data networks: diff --git a/server/config/wireguard/docker-compose.yml b/server/config/wireguard/docker-compose.yml index c44f605..4787080 100644 --- a/server/config/wireguard/docker-compose.yml +++ b/server/config/wireguard/docker-compose.yml @@ -3,7 +3,7 @@ services: wg-easy: image: weejewel/wg-easy container_name: wireguard_wg-easy - restart: unless-stopped + restart: "no" env_file: - .env ports: