Skip to content

nemerosa/swarm-infra

Repository files navigation

Nemerosa Infrastructure definition

Overview

Overview

Configuration

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).

Procedure

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.

Stacks

Following stacks are available:

Stack URL Notes

InfluxDB

http://influxdb.ci.nemerosa.net

(1) (2)

Grafana

http://grafana.ci.nemerosa.net

(1)

Jenkins

http://jenkins.ci.nemerosa.net

(1)

Ontrack

http://ontrack.ci.nemerosa.net

(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

Appendixes

SSH Connection

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

Roadmap

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

Releases

No releases published

Packages

No packages published