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
TODO
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:
-
cd ~/dockerbuild/apachepi
-
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
-
cd ~/ansible
-
ansible-playbook -i ~/ansible/hosts clear_docker_images.yml
-
ansible-playbook -i ~/ansible/hosts ~/ansible/install_apahcepi.yml
Add a new Raspberry Pi 3 device to the network
RJM Article Type
Work Notes