A set of tasks for Docker.
The installDocker($) task ensures docker is installed on a debian/ubuntu based host.
$: An ssh connection object
Usage:
await installDocker($)The swarmCreateNetwork($, name) task ensures a swarm network is created.
$: An ssh connection objectname: The name of the network
Usage:
await swarmDeployStack($, 'example')The swarmDeployStack($, stackFile, name) deploys a stack onto a swarm cluster.
$: An ssh connection objectstackFile: The remote path to the stack compose filename: The name of the stack
Usage:
await swarmDeployStack($, '/home/devops/hello-world.yml', 'hello-world');