docker-compose 安装arangodb集群

先构建一个secret文件

arangodb create jwt-secret --secret=arangodb.secret

docker-compose.yml

version: "3" services: agency: image: arangodb:latest container_name: arango-agency volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/a1:/var/lib/arangodb3 - ./cluster/a1apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.endpoint tcp://0.0.0.0:8531 --agency.my-address tcp://agency:8531 --server.authentication true --agency.activate true --agency.size 1 --agency.endpoint tcp://agency:8531 --agency.supervision true --cluster.require-persisted-id true coordinator1: image: arangodb:latest container_name: arango-coordinator1 volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/c1:/var/lib/arangodb3 - ./cluster/c1apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.authentication=true --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://coordinator1:8529 --cluster.my-role COORDINATOR --cluster.agency-endpoint tcp://agency:8531 --cluster.require-persisted-id true ports: - "8000:8529" depends_on: - agency coordinator2: image: arangodb:latest container_name: arango-coordinator2 volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/c2:/var/lib/arangodb3 - ./cluster/c2apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.authentication=true --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://coordinator2:8529 --cluster.my-role COORDINATOR --cluster.agency-endpoint tcp://agency:8531 --cluster.require-persisted-id true ports: - "8001:8529" depends_on: - agency db1: image: arangodb:latest container_name: arango-db1 volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/db1:/var/lib/arangodb3 - ./cluster/db1apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://db1:8529 --cluster.my-role PRIMARY --cluster.agency-endpoint tcp://agency:8531 --cluster.require-persisted-id true depends_on: - agency db2: image: arangodb:latest container_name: arango-db2 volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/db2:/var/lib/arangodb3 - ./cluster/db2apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://db2:8529 --cluster.my-role PRIMARY --cluster.agency-endpoint tcp://agency:8531 --cluster.require-persisted-id true depends_on: - agency db3: image: arangodb:latest container_name: arango-db3 volumes: - ./arangodb.secret:/etc/arangodb.secret - ./cluster/db3:/var/lib/arangodb3 - ./cluster/db3apps:/var/lib/arangodb3-apps command: arangod --server.jwt-secret-keyfile=/etc/arangodb.secret --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://db3:8529 --cluster.my-role PRIMARY --cluster.agency-endpoint tcp://agency:8531 --cluster.require-persisted-id true depends_on: - agency

首次运行,--cluster.require-persisted-id false,运行一次后,修改密码,添加database,然后第二次运行,改成--cluster.require-persisted-id true

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

PPDB:今晚老齐直播

【今晚老齐直播】今晚(本周三晚)20:0021:00小白开始“用”飞桨(https://www.oschina.net/action/visit/ad?id1185)由PPDE(飞桨(https://www.oschina.net/action/visit/ad?id1185)开发者专家计划)成员老齐,为深度学习小白指点迷津。

FLV文件格式

1.        FLV文件对齐方式FLV文件以大端对齐方式存放多字节整型。如存放数字无符号16位的数字300(0x012C),那么在FLV文件中存放的顺序是:|0x01|0x2C|。如果是无符号32位数字300(0x0000012C),那么在FLV文件中的存放顺序是:|0x00|0x00|0x00|0x01|0x2C。2.  

mysql设置时区

mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0