This repository contains scripts and files to be used by the master and worker nodes for the NoPASARAN project.
To pull the docker image of the master node
docker pull nopasaranhosts/master
and likewise for the worker node
docker pull nopasaranhosts/worker
When starting the container, run
./start.sh
to run the required scripts and initialize the host.
ENV DEBIAN_FRONTEND=noninteractive
prevents input requests during package installationsEXPOSE 22
to allow incoming SSH connectionsRUN mkdir -p /etc/ansible creates the required Ansible config folder
andtouch /etc/ansible/hosts
creates the file that will contain the hostnames of all workersRUN mv /NoPARASANscripts/master/ssh_monitor.sh /NoPASARANscripts/master/start.sh /
moves the scripts to the default directory
ENV DEBIAN_FRONTEND=noninteractive
prevents input requests during package installationsEXPOSE 22
to allow incoming SSH connectionsRUN mv /NoPASARANscripts/root-ca.crt /home
places the CA root certificate to its appropriate locationmv /NoPASARANscripts/start.sh /
places the initialization script to its appropriate location andRUN chmod +x start.sh
makes it an executable
This script continuously scans for connected SSH connections. It adds the hostnames of the open connections to the Ansible hosts
file and otherwise removes the ones which have been disconnected.
This script starts the ssh server and runs ssh_monitor.sh in the background.
This script starts the ssh server and runs a certbot command that requests a certificate from the Certificate Authority after the completion of an ACME DNS-01 challenge.