Create a terraform.tfvars
file with following values:
do_token = "your-api-token"
# docker-1.13.1-experimental
do_image = "22776331"
swarm_master_count = 1
swarm_agent_count = 2
Generate a SSH key:
ssh-keygen -t rsa -f ./do-key -N ""
This creates a key pair: do-key
(private key) and
do-key.pub
(public key).
Get all Terraform modules:
terraform get
Configure any variable you need in the terraform.tfvars
file (see
above), according to the definitions found in
the vars.tf
file.
When done, create the Swarm by running:
terraform apply
After a new minutes, the Docker Swarm stacks are deployed and ready.
Following stacks are available:
Stack | URL | Notes |
---|---|---|
(1) (2) |
||
(1) |
||
(1) |
||
(1) |
(1) This stack is not redeployable since it needs some shared storage between the nodes.
(2) The InfluxDB availability can be tested using:
curl -v http://swarm.ci.nemerosa.net/influxdb
In order to connect to the Swarm using SSH:
./swarm-ssh.sh
The script can also be used to run a command remotely:
./swarm-ssh.sh docker service ls
Non functional:
-
❏ SSH proxy using Let’s Encrypt
-
❏ Logging services (ELK)
-
❏ Grafana & Prometheus
-
❏ File storage
-
❏ Health checks & synchronizations
Functional:
-
❏ Jenkins
-
❏ Artifactory
-
❏ Ontrack default configuration
-
❏ Vault & Ontrack integration (would remove need for file storage)
-
❏ Jenkins default configuration
-
❏ Artifactory default configuration