nebula-orchestrator / docs

Documentation repo of nebula orchestration system
http://nebula.readthedocs.io/en/latest/
GNU General Public License v3.0
17 stars 7 forks source link

Add a Terraform getting started tutorial #10

Closed naorlivne closed 5 years ago

naorlivne commented 6 years ago

Expected/Wanted Behavior

There should be a Terraform getting start tutorial that:

  1. Creates a CloudAMQP RabbitMQ (free one by default)
  2. Creates a MongoDB atlas backend DB (free one by default)
  3. Creates on the local docker an instance of the API
  4. Creates an example "test" app inside Nebula
  5. Creates on the local docker an instance of the Worker (by default but can be flagged to turn off)
  6. prints the "docker run..." command needed to run on other machines to add them as the workers

Actual Behavior

There is only a docker-compose & manual install tutorials.

naorlivne commented 5 years ago

Thinking maybe there could be a line of modules to deploy a cluster of 3 servers which are set with MongoDB, RabbitMQ, & the API on different cloud providers along with an LB in front of them - this will simplify deployments for production to users as well.

so far thinking of the following:

  1. Local playground module which does everything in the original ticket.
  2. AWS module which creates 3 instances, RancherOS based which contain a RabbitMQ cluster, MongoDB cluster (non sharded) & the API endpoint + NLB\ELB\ALB among the 3 + print the "docker run..." needed to add workers to the cluster.
  3. DigitalOcean module which creates 3 instances, RancherOS based which contain a RabbitMQ cluster, MongoDB cluster (non sharded) & the API endpoint + LB among the 3 + print the "docker run..." needed to add workers to the cluster.
  4. GCP module which creates 3 instances, RancherOS based which contain a RabbitMQ cluster, MongoDB cluster (non sharded) & the API endpoint + LB among the 3 + print the "docker run..." needed to add workers to the cluster.
  5. Azure module which creates 3 instances, RancherOS based which contain a RabbitMQ cluster, MongoDB cluster (non sharded) & the API endpoint + LB among the 3 + print the "docker run..." needed to add workers to the cluster.

This will most likely need to be in it's own repo per each module in order to comply with https://www.terraform.io/docs/registry/modules/publish.html & be able to publish said modules in Terraform public module registry.

naorlivne commented 5 years ago

Added for Digital Ocean & packet that shows example usage with single manager & 1 worker in each of the standard regions for the time of writing, I won't be adding AWS\GCP\Azure as they are less friendly about adding multi region deployments & while possible the cost\benefit of it just isn't there for now.

More advanced HA designs will need to follow the installing steps as it's likely that the managers will be on some orchestrator (swarm\mesos\kubernetes) & the DB might or might be a managed service based on each company taste so it won't make sense having a production ready quickstart as every prod env is different.