Docker Consolidation Project, Part Five
Migrate Authentik Security
Migrate Authentik Security's Data
Well my testing this morning was successful with Authentik and Bookstack so the data transfer was successful. I can move on to decommissioning.
Decommission AUTHENTIK-01
Steps performed on AUTHENTIK-01
sudo shutdown now
Steps performed on HV-03 via Windows Admin Center
- Navigate to
Virtual Machines - I select
AUTHENTIK-01 - I click on
Manageand thenDelete - I choose the option
Delete all virtual disks
Steps performed on DC-02 via Windows Admin Center
- I go to
DNS - I click on
domain.local - I select
AUTHENTIK.domain.localand clickEdit - I change the
IP AddresstoDOCKER-01's IP address
Steps taken from desktop
- I delete the
AUTHENTIK-01SSH key files - I remove
AUTHENTIK-01from Windows Terminal'sJSONfile
Migrate TubeArchivist
Moving on to TubeArchivist. I've only downloaded about a dozen videos at this point so instead of worrying about migrating the data over, I'm just going to build a clean install and then queue up those videos again.
Steps performed on DOCKER-01
sudo mkdir /apps/TubeArchivistsudo mkdir /mnt/TubeArchivistmkdir /home/david/.winnano /home/david/.win/TubeArchivist-Credential
username=_service_tubearchive
password=
domain=domain.local
- I save the file
TubeArchivist-Credential sudo nano /etc/fstab
# Mount for TubeArchivist
//10.10.10.XXX/Data/Media/Youtube /mnt/TubeArchivist cifs credentials=/home/david/.win/TubeArchivist-Credential,uid=1000,gid=1000,iocharset=utf8,vers=2.0 0 0
- I save
fstab sudo apt install cifs-utilssudo reboot
I verified the mount point is functioning correctly.
sudo nano /apps/TubeArchivist/docker-compose.yml
version: '3.3'
services:
TubeArchivist:
container_name: TubeArchivist
restart: unless-stopped
image: bbilly1/tubearchivist
ports:
- 8027:8000
volumes:
- /mnt/TubeArchivist:/youtube
- /apps/TubeArchivist:/cache
environment:
- ES_URL=http://archivist-es:9200 # needs protocol e.g. http and port
- REDIS_HOST=archivist-redis # don't add protocol
- HOST_UID=1000
- HOST_GID=1000
- TA_HOST=http://tubearchivist.domain.local # set your host name
- TA_USERNAME=david # your initial TA credentials
- TA_PASSWORD=XXXXXXXXXXXX # your initial TA credentials
- ELASTIC_PASSWORD=XXXXXXXXXXXX # set password for Elasticsearch
- TZ=America/New_York # set your time zone
depends_on:
- archivist-es
- archivist-redis
archivist-redis:
image: redis/redis-stack-server
container_name: archivist
restart: unless-stopped
expose:
- "6379"
volumes:
- redis:/data
depends_on:
- archivist-es
archivist-es:
image: bbilly1/tubearchivist-es # only for amd64, or use official es 8.9.0
container_name: archivist-es
restart: unless-stopped
environment:
- "ELASTIC_PASSWORD=XXXXXXXXXXXXX # matching Elasticsearch password
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "xpack.security.enabled=true"
- "discovery.type=single-node"
- "path.repo=/usr/share/elasticsearch/data/snapshot"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es:/usr/share/elasticsearch/data # check for permission error when using bind mount, see readme
expose:
- "9200"
volumes:
media:
cache:
redis:
es:
- I saved the
docker-compose.ymlfile sudo docker-compose pullsudo docker-compose up -d
That's it! The page loads up as I expect, and I queue up my videos again and set them to download while I work on decommissioning TUBEARCHIVIST-01
Decommission TUBEARCHIVIST-01
Steps performed on TUBEARCHIVIST-01
sudo shutdown now
Steps performed on HV-03 via Windows Admin Center
- I navigate to
Virtual Machine - I select
TUBEARCHIVIST-01 - I click on
Manageand thenDelete - I choose the option
Delete all virtual disks
Steps taken on DC-02 via Windows Admin Center
- I go to
DNS - I click on
domain.local - I select
TUBE.domain.localand clickEdit - I change the
IP AddresstoDOCKER-01's IP address
Steps taken on desktop
- I delete the
TUBEARCHIVIST-01SSH key files - I remove
TUBEARCHIVIST-01from Windows Terminal'sJSONfile
What's left?
Well I should probably install Fail2Ban as well as UFW, then I'll need to work on updating my NGINX reverse proxy.
Steps taken on DOCKER-01
sudo apt install fail2bansudo nano /etc/fail2ban.local
[DEFAULT]
bantime = 600m
findtime = 10m
maxretry = 5
ignoreip = 10.10.10.XXX
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
- I save
fail2ban.local sudo apt install ufwsudo ufw allow sshsudo ufw allow 5006sudo ufw allow 9000sudo ufw allow 3100sudo ufw allow 8017sudo ufw allow 8027sudo ufw enable
Steps taken on NGINX-01
I log in to NGINX-01 and double check my NGINX configuration file and made sure that I had put the FQDN for each service instead of an IP address. Which thankfully I did. Since I already changed the local DNS I'll be good to go here.