我如何启动一个 Arango 3.1.8 集群,其中节点使用 arangod.conf 文件充当多个角色

How can I start an Arango 3.1.8 cluster where nodes serve multiple roles using arangod.conf file

我已经配置了三个虚拟机(通过 Azure),全部 运行ning Ubuntu 16.04。每个 VM 运行ning ArangoDB 3.1.8.

虽然我可以让单台机器成功 运行 Arango,并访问 UI,但我似乎无法使用 下的 arangod.conf 文件正确地对它们进行集群/etc/arangodb3.

理想情况下,我想 运行 每台机器上的所有三个角色:代理、协调员和主要角色。当从命令行 运行ning 时这似乎是可能的(抱歉,来自 Windows 背景 )如何使用配置文件完成此操作?

到目前为止我的 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

然后我计划在所有三台服务器上使用此文件,并更改 cluster.my-* 和 agency.id 属性。

我查看了以下链接以寻求帮助: https://docs.arangodb.com/3.0/Manual/Deployment/Distributed.html https://raw.githubusercontent.com/ArangoDB/deployment/publish/Azure_ArangoDB_Cluster.sh

您需要每个节点的配置文件。每个人都适合每个人。即 agent.conf、dbserver.conf 和 coordinator.conf。每个人都需要有自己的端点。所以以上就是你在所有三台机器上 agency.conf 只有端点 5001 的情况。 现在您仍然需要 coordinator.conf 和 dbserver.conf。 下面的 3.1 部署文档包含所有 3 种带有必要命令行参数的 arangod 实例: https://docs.arangodb.com/3.1/Manual/Deployment/Distributed.html 本质上,您需要将任何 --<domain>.<parameter> <value> 参数转换为各个 conf 文件中的部分条目。 所以 --agency.activate true --agency.endpoint tcp://some-host:port --agency.size 会变成

[agency]
size = 3
endpoint = tcp://some-host:port
activate = true

所以让我们从文档中获取协调器命令行:

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 

这会变成

[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

等等。并且您需要在每台机器上启动 3 个 arangod 进程,每个进程都带有预期的配置文件。即

arangod -c /etc/arangodb3/agent.conf
arangod -c /etc/arangodb3/coordinator.conf
arangod -c /etc/arangodb3/dbserver.conf

此外,您可能最后但并非最不重要的一点是考虑在 https://github.com/neunhoef/ArangoDBStarter

上查看 Max Neunhöfer 的 arangodb starter