-
-
Notifications
You must be signed in to change notification settings - Fork 0
Restore Imager worker
We suppose you have a freshly installed Debian machine / VM
Follow the normal node setup procedure (up to what is specific to k8s): https://github.com/kiwix/k8s/wiki/Machine-and-k8s-node-Setup
Install Docker by following documentation at https://docs.docker.com/engine/install/debian/
Restore the imager configuration at /etc/imager.config ; this file contains secret values (to connect to S3) so it is kept by admins in their Key Vault
Sample file:
USERNAME="--------------"
PASSWORD="--------------"
CONTAINER="imager-worker"
IMAGE="ghcr.io/offspot/imager-worker:latest"
#IMAGE="ghcr.io/offspot/cardshop-worker:imager"
S3_ACCESS_KEY="-------------"
S3_SECRET_KEY="--------------------"
Restore the startup script from https://github.com/offspot/imager-service/blob/main/contrib/imager-worker-restart.sh to /usr/local/bin/imager-worker-restart
wget -O /usr/local/bin/imager-worker-restart https://raw.githubusercontent.com/offspot/imager-service/main/contrib/imager-worker-restart.sh
chmod +x /usr/local/bin/imager-worker-restart
Restore the startup script from https://raw.githubusercontent.com/offspot/imager-service/main/contrib/cache-policy.yaml to /data/cache/policy.yaml
wget -O /data/cache/policy.yaml https://raw.githubusercontent.com/offspot/imager-service/main/contrib/cache-policy.yaml
If worker IP has changed, update the Wasabi policy containing IP whitelists (remove old worker IP / add new worker IP): arn:aws:iam::100000050990:policy/CardshopWorkers