Prepare for public release

This commit is contained in:
2023-02-08 13:46:00 -06:00
commit de73b968bc
15 changed files with 250 additions and 0 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# this command helper depends on key-based (passwordless) SSH access by the current user to each of the docker swarm nodes.
NODE_HOST=$1; shift;
nc -zvw3 $NODE_HOST 22 &> /dev/null;
PING_RESULT=$?
if [ $PING_RESULT != 0 ]; then
echo
echo "Host '$NODE_HOST' not reachable."
exit 2
fi
# connect to the docker host through SSH
export DOCKER_HOST="ssh://$(whoami)@$NODE_HOST.$(hostname -d)"
# execute the command
docker $@