This section covers basic operational aspects of deploying Hermes. For more on configuring Hermes read:
As the architecture overview states, there are two systems that are required to run Hermes:
In our opinion it is best practice, to run them on separate hosts, so Hermes does not affect them.
Each module is a stateless application. There can be as many of them running in parallel as it is required. For best performance and easy maintenance, each Hermes module should also be deployed on separate host.
All Hermes Java modules require Java 8 to work. Hermes Console has no external dependencies.
All Java modules share the same bundling strategy: Gradle distZips. In order to pass any command line options to executables use:
HERMES_<module name>_OPTS
for application optionsJAVA_OPTS
for Java specific optionsfor example:
export HERMES_FRONTEND_OPTS="-Dfrontend.port=8090"
export JAVA_OPTS="-Xmx2g"
Hermes Frontend and Consumers modules use Netflix Archaius to manage configuration.
To read external configuration from any URL (local file or remote HTTP source), specify its location in system property:
export HERMES_FRONTEND_OPTS="-Darchaius.configurationSource.additionalUrls=file:///opt/hermes/conf/frontend.properties"
export HERMES_CONSUMERS_OPTS="-Darchaius.configurationSource.additionalUrls=file:///opt/hermes/conf/consumers.properties"
Configuration is stored in Java properties format.
It is possible to overwrite any configuration variable using environment variable:
export HERMES_FRONTEND_OPTS="-D<configuration-option>=<value>"
for example:
export HERMES_FRONTEND_OPTS="-Dfrontend.port=8090 -Dfrontend.idle.timeout=30"
It is advised to run Hermes Frontend and Consumers with G1 garbage collector and at least 1GB heap:
-XX:+UseG1GC -Xms1g
Management being Spring Boot application, shares the same options to provide additional configuration. The most basic way to provide external configuration file is to export an environment variable:
SPRING_CONFIG_LOCATION="file:///opt/hermes/conf/management.properties"
export HERMES_MANAGEMENT_OPTS="-D<configuration-option>=<value>"
export HERMES_MANAGEMENT_OPTS="-Dserver.port=8070"
Hermes Console is a simple Single Page Application served using NodeJS. It accepts two arguments:
-p
or HERMES_CONSOLE_PORT
env variable to specify port (default: 8000)-c
or HERMES_CONSOLE_CONFIG
env variable to specify configuration file (default: ./config.json
)The config.json
file is mandatory, Hermes Console will crash when unable to read it. See
configuring Hermes Console section for more information.
Hermes Console has no dependencies and will run out of the box on Linux machines. To run it, use provided script:
./run.sh -p 8000 -c /etc/hermes-console/config.json