Configuration of infrastructure for a Swarm cluster.
Go to file
Jakub Sokołowski 2b094092e8
upgrade alibaba cloud instance to ecs.sn1ne.large
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-22 13:17:39 +01:00
ansible remove unnecessary entrypoint for new geth image 2019-01-21 16:49:52 +01:00
.gitignore add terraform modules and Makefile 2018-08-01 13:34:27 -04:00
Makefile quite echo for secrets 2018-12-07 09:37:00 +01:00
README.md add link for more details 2018-10-25 15:44:24 +02:00
ansible.cfg increase ssh timeout for ansible 2018-09-03 13:07:39 -04:00
main.tf upgrade alibaba cloud instance to ecs.sn1ne.large 2019-01-22 13:17:39 +01:00
variables.tf replace multi-provider with one from github 2018-11-07 13:28:17 +01:00
workspaces.tf add basic main.tf and workpaces.tf 2018-08-01 14:20:09 -04:00

README.md

Description

Swarm clusters configuration.

Requirements

In order to use this you will need secrets(passwords, certs, keys) contained within the infra-pass repository. If you can't see it ask jakub@status.im to get you access for it.

In order for this to work first you need to install necessary Terraform plugins and get the right secrets from the infra-pass repo, to do that simply run:

make
# alternatively
make plugins
make secrets

This will put the necessary certificates, keys, and passwords are in place so you can deploy and configure hosts.

Usage

To provision a new fleet create a new Terraform workspace:

terraform workspace new bug-test

Then plan your fleet and if everything looks good provision it:

terraform plan
terraform apply

Once provisioned you can configure the hosts using Ansible:

ansible-playbook ansible/main.yml

Once finished your hosts should be accessible via SSH:

ssh ${USER}@node-01.bug-test.eth.f.status.im

Workspaces

Each Terraform workspace has it's own path in the dynamic inventory and is a separate fleet of hosts. You can see currently existing fleets using following command:

terraform workspace list
  default
* devel
  test
  perf-test

You can select a fleet and see it's current state of the fleet:

terraform workspace select perf-test
terraform show

Or create a new workspace for yourself.

terraform workspace new bug-test-01

The name of your workspace will be used in the DNS names of your hosts, for example:

mail-01.bug-test-01.eth.f.status.im

And it's state will be saved in the Consul cluster managed by the infra-hq repo.

Details

Read the Terraform and Ansible article in our infra-docs repo.