Skip to content
Ryan Sandor Richards edited this page Jan 14, 2016 · 10 revisions

Swarm Celsitudo

Herein lies the incantations, most arcane, that are required to setup and use swarm on your local computing machina.

Setup

  1. collect docker-toolbox
  2. clone devops-scripts github repository
  3. copy devops-scripts/ansible/roles/docker_client/ca.pem into devops-scripts/ansible/roles/docker_client/files/certs/swarm-manager
  4. combine the following with your ~/.bash_profile
export DOCKER_HOST=tcp://localhost:2375
export DOCKER_CERT_PATH=<path_to_devops_scripts>/ansible/roles/docker_client/files/certs/swarm-manager
export DOCKER_TLS_VERIFY=1

# used to create blocking tunnel to swarm host
# usage: setupSwarm <services_host>
alias setupSwarm='ssh -NL 2375:localhost:2375'

# sugar functions
alias setupSwarmGamma='setupSwarm gamma-services'
alias setupSwarmDelta='setupSwarm delta-services'

Usage

  1. run either setupSwarmGamma or setupSwarmDelta in one shell
  • note: you will need to dedicate one shell to run this command, it is a blocking call. To stop the tunnel simply press control + c in this shell
  1. In any other shell you are now able to run any docker commands. ex.
  • docker ps list all running containers across the entire environment
  • docker info list all docks with nice info

Clone this wiki locally