This is script updates an upload server's users based on nodes in a Beekeeper. It is primarily intended to be run as a cronjob.
This script expects the following env vars as configuration:
BEEKEEPER_STATE_ENDPOINT
: Endpoint for Beekeeper state API.BEEHIVE_NAME
: Name of Beehive.UPLOAD_SERVER_HOST
: Beehive's upload server host.UPLOAD_SERVER_PORT
: Beehive's upload server port.UPLOAD_SERVER_USER
: Beehive's upload server user.UPLOAD_SERVER_KEY
: Path to Beehive's upload server key.
Additionally, the script requires the following ssh configuration:
- An ssh key pair must be mounted at
UPLOAD_SERVER_KEY
for authentication with the upload server. - A
known_hosts
file must be mounted at either/etc/ssh/ssh_known_hosts
or/root/.ssh/known_hosts
with an entry for the upload server.