-
Notifications
You must be signed in to change notification settings - Fork 4
Finishing set up
In case you are unsure of a starting point, here are the following I've used for development:
- Both machines will have a custom security group with the following inbound rules:
- SSH on port 22
- Custom TCP on ports 8300-8302, 8500, 8600, 4646-4648, and 20000-32000 (Nomad allocates containers on these ports), and only traffic inside the network can communicate over these ports
For the machines with Manticore and HAProxy running, there are additional rules needed:
- Custom TCP on port 80, and traffic from anywhere can access this port. This is how users access Manticore's web page.
- Custom TCP on a port range that the machine does not use, and traffic from anywhere can access this port. It's the developer's responsibility to ensure that opening these ports are safe. This range will be used to open up ports for TCP connections from the SDL app to core. 10000-19999 is an example range.
Most of the ports are for Consul and Nomad to communicate with each other across machines in the same network. Additionally, the Manticore API server requires some resources for being able to manage many pairs of cores and HMIs. Therefore it is highly recommended to run Manticore on at least a t3.medium machine. Manticore may refuse to start if the hosted machine does not have sufficient memory, CPU, or network bandwidth. See here for what resources Manticore needs to run.
sudo yum install docker -y
sudo service docker start
sudo yum install haproxy -y
sudo yum install git -y
There is no further configuration needed here.
You need Nodejs and NPM in order to install Nodejs packages and start Manticore. Here are the instructions for installing NVM, which can easily install different version of Nodejs for you.
# See https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server
curl -sL https://raw.githubusercontent.com/creationix/nvm/master/install.sh -o install_nvm.sh
bash install_nvm.sh
source ~/.bash_profile
Now do nvm ls-remote
to see available versions and run
nvm install <version string>
nvm use <version string>
nvm alias default <version string>
You can download it here. consul-template has the responsibility of using Consul to generate the HAProxy configuration file. You will need consul-template running on every machine with HAProxy and Manticore. The template and settings files for HAProxy can be found in the Manticore Github repository here.
sudo consul-template -config <location of template-settings.hcl> &
You may need to give ownership of /etc/haproxy/
and the configuration file within depending on how you run consul-template
If you're using HAProxy, you need a domain name that Manticore can use in order to set up custom external urls. This may involve using Route 53 to get a domain name. Ensure that you have a domain name you can use to point to either an Elastic Load Balancer which points to your API machine or to point to your API machine directly.