-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial Part 4
Previous: Building a local configuration repository
A coordinator requires a minimum of two configuration files: etc/jvm.config
and etc/config.properties
. A third configuration file, agents.txt
will be added later.
These files must be stored on the local-coordinator
branch of the configuration repository:
git checkout local-coordinator
mkdir etc
This file contains line-by-line options for the JVM. When starting the coordinator, these values are passed into the JVM at startup.
The minimal configuration chooses the server JVM and allocates 64M for the heap.
-server
-Xmx64M
This is a regular java properties file. It is loaded by the airship coordinator at startup. The airship coordinator supports a wealth of configuration properties. Most of them are set to reasonable defaults and only need to be changed for larger or special installations.
The minimal configuration for the coordinator sets the server port, configures the repositories to fetch binaries and configuration and chooses a provisioner.
# The http port for the coordinator to listen on
http-server.http.port=28888
# Repositories for the coordinator to fetch binaries and config from.
# These repositories are used by the coordinator for the main environment
# This list is equivalent to the --repository command line option for the local environment.
coordinator.repository=$HOME/.m2/repository, http://repo.maven.apache.org/maven2
# Default group ids for the main environment.
# These groups are used by the coordinator for the main environment
# This list is equivalent to the --maven-default-group-id command line option for the local environment.
coordinator.default-group-id=io.airlift.airship, io.airlift.airship.tutorial
# Use the static provisioner (provision onto the local file system, see below).
coordinator.provisioner=static
# Allow multiple installations of a service/configuration pair on a single agent.
coordinator.allow-duplicate-installations-on-an-agent=true
NOTE: If a repository server is available, the coordinator.repository
property should contain the Release Download Repository URL and the Snapshot Download Repository URL. For this tutorial, it will load the configuration from the local maven repository and the binaries from Maven Central. See also Provision the local environment.
Static provisioning is the simplest way to get an airship environment on non-cloud machines. It does not auto-provision machines or manage cloud instances. All hosts that are part of the environment must be known when configuring the coordinator and adding a new host running an agent requires a coordinator restart.
The static provisioner adds a third configuration file to the coordinator configuration, etc/agents.txt
. For this tutorial, a single agent running on the localhost is configured:
http://localhost:28889/
When using in an production environment, localhost
would be replaced with the host name or ip address of an agent host. Each additional agent host is added as an URL on a new line.
The newly created three configuration files must be added to git and then committed in the repository:
git add etc/jvm.config etc/config.properties etc/agents.txt
git commit -m "tutorial coordinator configuration"
[local-coordinator 536be8a] tutorial coordinator configuration
3 files changed, 21 insertions(+)
create mode 100644 etc/agents.txt
create mode 100644 etc/config.properties
create mode 100644 etc/jvm.config
An agent also requires the same two configuration files as the coordinator: etc/jvm.config
and etc/config.properties
.
These files must be stored on the local-agent
branch of the configuration repository:
git checkout local-agent
mkdir etc
This file contains line-by-line options for the JVM. When starting the coordinator, these values are passed into the JVM at startup.
The minimal configuration is identical to the coordinator and chooses the server JVM and allocates 64M for the heap.
-server
-Xmx64M
This is a regular java properties file. It is loaded by the airship agent at startup. The airship agent, similar to the coordinator, supports a wealth of configuration properties. Most of them are set to reasonable defaults and only need to be changed for larger or special installations.
The minimal configuration for the agent only needs to set the server port. This port must match the port given in the agents.txt
configuration file for the coordinator above.
# The http port for the agent to listen on
http-server.http.port=28889
The newly created two configuration files must be added to git and then committed in the repository:
git add etc/jvm.config etc/config.properties
git commit -m "tutorial agent configuration"
[local-agent e77d9d6] tutorial agent configuration
2 files changed, 4 insertions(+)
create mode 100644 etc/config.properties
create mode 100644 etc/jvm.config
Next: Installing and deploying snapshot and release configuration bundles