Launching an ArangoDB cluster for testing
However starting a cluster manually is possible and is a very easy method to get a first impression of what an ArangoDB cluster looks like.
The easiest way to start a local cluster for testing purposes is to run from a clone of the source repository after compiling ArangoDB from source (see instructions in the file README_maintainers.md
in the repository. This will start 1 Agency, 2 DBServers and 1 Coordinator. To stop the cluster issue scripts/stopLocalCluster.sh
.
This section will discuss the required parameters for every role in an ArangoDB cluster. Be sure to read the documentation to get a basic understanding of the underlying architecture and the involved roles in an ArangoDB cluster.
In the following sections we will go through the relevant options per role.
To start up an agency you first have to activate it. This is done by providing —agency.activate true
.
To start up the agency in its fault tolerant mode set the —agency.size
to 3
. You will then have to provide at least 3 agents before the agency will start operation.
During initialization the agents have to find each other. To do so provide at least one common —agency.endpoint
. The agents will then coordinate startup themselves. They will announce themselves with their external address which may be specified using . This is required in bridged docker setups or NATed environments.
So in summary this is what your startup might look like:
Furthermore, in the following sections when —cluster.agency-address
is used multiple times to specify all three agent addresses, just use a single option —cluster.agency.address tcp://127.0.0.1:5001
instead.
Coordinators and DBServers
These two roles share a common set of relevant options. First you should specify the role using —cluster.my-role
. This can either be PRIMARY
(a database server) or COORDINATOR
. Furthermore provide the external endpoint (IP and port) of the task via —cluster.my-address
.
The following is a full-example of what it might look like:
Note in particular that the endpoint descriptions given under and —cluster.agency-endpoint
must not use the IP address 0.0.0.0
because they must contain an actual address that can be routed to the corresponding server. The 0.0.0.0
in —server.endpoint
simply means that the server binds itself to all available network devices with all available IP addresses.
You have now launched a complete ArangoDB cluster and can contact its coordinator at the endpoint tcp://127.0.0.1:8531
, which means that you can reach the web UI under .