-
Notifications
You must be signed in to change notification settings - Fork 4
Architecture
I will illustrate some recommendations for running Manticore, from development to staging to production. I won't go into specifics on how you would actually set it up in this section.
In this example, a developer only needs two virtual machines running on their computer. I must warn that both Consul and Nomad highly recommend running either 3 or 5 Consul and Nomad server agents, but since this is just development we can get away with running just one of each. Both binaries of Consul and Nomad can run in server or client mode.
- Assign one machine to be running a Consul and Nomad server agent
- Configure the Nomad server to connect to the Consul server. If the servers are on the same machine then nothing needs to be done here
- Assign the other machine to run a Consul and Nomad client agent, binding to the address of the host
- Command the Consul client agent to connect to the Consul server
Following these steps, you should have a machine with agents that can connect to the Consul and Nomad servers, and you will get both scheduling and service discovery abilities as a consequence.
For reference, here is what that would look like when Manticore is running and sdl_core and sdl_hmi instances are also running:
There is not much difference here. Have the same setup as above, but now install consul-template and HAProxy on the machine with the client agents. There is configuration involved, but that will be explained later. consul-template will use the local client agent to get data from the KV store once Manticore populates the KV store with data.
Consul and Nomad will need more than one server each for serious use. But, for those that desire a high power to cost ratio, this is my recommendation. Continue combining the Consul and Nomad server agents in one machine, and make three machines each with these server agents combined inside. Have an additional machine with the client agents just like before. The difference is that this machine will only run the Manticore web app docker container. Now you can have a cluster of very small instances (ex. t2.micro) that are specifically designed to run sdl_core and sdl_hmi instances, and you can define scaling options for these small instances.
This next image should be pretty self-explanatory. In this case the machine that has Manticore, HAProxy, and consul-template can also be scalable. One important note is that the Manticore web app has not yet been tested to be stable when running in a cluster. So, only run one Manticore web app at a time until further notice.
Read on to learn how to set up a simple Nomad and Consul cluster on AWS.
Alternatively, you can learn how to set up Manticore locally with just a single machine needed.