I have some misc processes I use with the Cluster Hat cluster I created and I wanted to document them here so I don't have to go through my entire tutorial series to find the relevant commands:
Rebuild a dead Pi Zero
Redistribute a docker image
Most of the command examples here are for my apache image.
Delete all the old versions of the image from controller using docker rmi xxx
Once this is done build a new image:
docker build -t controller.metcarob-local.com:5000/apachepi:v1 .
Test the image locally:
docker run --name apachepi_container -p 8080:80 -d controller.metcarob-local.com:5000/apachepi:v1
docker exec -i -t apachepi_container /bin/bash
Clear out the container created by the test
docker stop apachepi_container && docker rm -v apachepi_container
docker push controller.metcarob-local.com:5000/apachepi:v1
ansible-playbook -i ~/ansible/hosts clear_docker_images.yml
ansible-playbook -i ~/ansible/hosts ~/ansible/install_apahcepi.yml