I have configured three virtual machines (via Azure), all running Ubuntu 16.04. Each VM is running ArangoDB 3.1.8.
While I can get single machines to successfully run Arango, and access the UI, I cannot seem to cluster them correctly using the arangod.conf file under /etc/arangodb3.
Ideally, I would like to run all three roles on each machine: Agent, Coordinator, and Primary. While this seems possible when running from the command line (sorry, coming from a Windows background) how can this be done using a configuration file?
So far I have this in my arangod.conf:
[database]
directory = /var/lib/arangodb3
# maximal-journal-size = 33554432
[server]
endpoint = tcp://[::]:8529
endpoint = tcp://[::]:5001
authentication = true
# gather server statistics
statistics = true
uid = arangodb
[javascript]
startup-directory = usr/share/arangodb3/js
app-path = /var/lib/arangodb3-apps
[log]
level = info
file = /var/log/arangodb3/arangod.log
[agency]
id = 0
size = 3
supervision = true
activate = true
[cluster]
my-address = tcp://full_dn_to_server1:8529
my-local-info = myarango1
my-role = COORDINATOR; PRIMARY
agency-endpoint = tcp://full_dn_to_server1:5001
agency-endpoint = tcp://full_dn_to_server2:5001
agency-endpoint = tcp://full_dn_to_server3:5001
I was then planning on using this file on all three servers, with changes to the cluster.my-* and agency.id properties.
I have looked at the following links for assistance: https://github.com/arangodb/arangodb/blob/b7cc85349c132f2ec7020dcddbd53e5bcfe12895/Documentation/Books/Manual/Deployment/Distributed.md https://raw.githubusercontent.com/ArangoDB/deployment/publish/Azure_ArangoDB_Cluster.sh
You'd need the configuration files per node. Each for every personality. i.e. agent.conf, dbserver.conf and coordinator.conf. Each would need to have their own endpoints. So the above would be you agency.conf on all three machines with endpoint 5001 only.
Now you'd still need the coordinator.conf and dbserver.conf.
The 3.1 deployment document below features all 3 kinds of arangod instances with the necessary command line arguments:
https://github.com/arangodb/arangodb/blob/b7cc85349c132f2ec7020dcddbd53e5bcfe12895/Documentation/Books/Manual/Deployment/Distributed.md
Essentially, you would need to translate any --<domain>.<parameter> <value>
argument into a section entry in the individual conf files.
So --agency.activate true --agency.endpoint tcp://some-host:port --agency.size
would turn into
[agency]
size = 3
endpoint = tcp://some-host:port
activate = true
So let's take a coordinators command line from the documentation:
arangod --server.authentication=false --server.endpoint tcp://0.0.0.0:8531 --cluster.my-address tcp://192.168.1.3:8531 --cluster.my-local-info coord1 --cluster.my-role COORDINATOR --cluster.agency-endpoint tcp://192.168.1.1:5001 --cluster.agency-endpoint tcp://192.168.1.2:5001 --cluster.agency-endpoint tcp://192.168.1.3:5001 --database.directory coordinator
This would turn into
[server]
authentication = false
endpoint = tcp://0.0.0.0:8531
[cluster]
my-address = tcp://192.168.1.3:8531
my-local-info = coord1
my-role = COORDINATOR
agency-endpoint = tcp://192.168.1.1:5001
agency-endpoint = tcp://192.168.1.2:5001
agency-endpoint = tcp://192.168.1.3:5001
[database]
directory coordinator
and so on. And you'd need to start 3 arangod processes each with the intended configuration file on each machine. I.e.
arangod -c /etc/arangodb3/agent.conf
arangod -c /etc/arangodb3/coordinator.conf
arangod -c /etc/arangodb3/dbserver.conf
Also you might last but not least want to consider having a look at Max Neunhöfer's arangodb starter at https://github.com/neunhoef/ArangoDBStarter