-
Notifications
You must be signed in to change notification settings - Fork 4
Starting Manticore and Environment Variables
Manticore runs in a Docker container and is provisioned by Nomad, just like with sdl_core and an HMI. However, Manticore needs some environment variables before it can function properly. Everything you need to generate and submit the Manticore job file is created for you under the build/ folder. All you need to do is pass in the appropriate environment variables. Manticore uses dotenv so all your environment variables can be stored in a .env file inside the build/ folder. Manticore's .gitignore will not push that file to repositories.
There are certain requirements for environment variables for Manticore to even run. Setting up the wrong configuration will make Manticore refuse to run. Check out /server/lib/config.js
for details on how this works.
# The logging level for Manticore. Defaults to DEBUG. Set to PRODUCTION to only log errors
NODE_LOGS
# IP of the local consul and nomad client agent
CLIENT_AGENT_IP
# Port of the web server. Doesn't matter what it is, really. Defaults to 4000
HTTP_PORT
# Whether CORS should be enabled. Defaults to false
CORS
# For expecting JWTs, using a shared secret string.
JWT_SECRET
# The service name used for your Trace infrastructure
TRACE_SERVICE_NAME
# The API Key for authenticating with Trace
TRACE_API_KEY
# The name of your domain that you use to direct users to local ip addresses of cores and HMIs
DOMAIN_NAME
# The lowest port and highest number that HAProxy can open ports on for TCP connections.
# Make sure your security groups are configured so that these ports can be accessed from anywhere
# and that there are no other programs on your OS that are currently using these ports.
TCP_PORT_RANGE_START
TCP_PORT_RANGE_END
# The port HAProxy opens for web traffic, including Manticore
HAPROXY_HTTP_LISTEN
# The region name of where Manticore is hosted (ex. us-east-1)
AWS_REGION
# The name of the AWS ELB that Manticore should be controlling
ELB_MANTICORE_NAME
# The port for the SSL protocol listener for the ELB. Do NOT make it 443! You should be using
# a classic load balancer for Manticore, and Websocket and HTTP cannot happen on the same port in this case!
ELB_SSL_PORT
# The ARN of your SSL certificate for enabling secure connections
SSL_CERTIFICATE_ARN
While in the build folder (NOT THE SERVER FOLDER), type the following to install dependencies and start the job submission process
npm install
npm start
You can check your status of jobs running the following:
# For all jobs
nomad status -address=http://<IP of this machine>:4646
# For specifically Manticore
nomad status -address=http://<IP of this machine>:4646 manticore
Here's what you have to do if you want HTTPS and SSL through the ELB