• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ArangoDBStarter: ArangoDBStarter 是一个用来轻松启动 ArangoDB 集群和单机服务的工 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ArangoDBStarter

开源软件地址:

https://gitee.com/mirrors/ArangoDBStarter

开源软件介绍:

Starting an ArangoDB cluster or database the easy way

Docker PullsGoDoc

Downloading Releases

You can download precompiled arangodb binaries via the github releases page.

Note: arangodb is also included in all current distributions of ArangoDB.

Building

If you want to compile arangodb yourselves just do:

go get -u github.com/arangodb-helper/arangodb

This will result in a binary at $GOPATH/bin/arangodb.

For more advanced build options, clone this repository and do:

make local

and the executable is in ./bin named after the current OS & architecture (e.g. linux/amd64/arangodb).You can copy the binary anywhere in your PATH.A link to the binary for the local OS & architecture is made to ./arangodb.This program will run on Linux, OSX or Windows.

Note: The standard build uses a docker container to run the build. If docker is not availablemake local runs the go compiler directly and places the binary directly in the project directory.In this case you need to install the golang package on your system (version 1.7 or higher).

Building docker image

If you want to create the arangodb/arangodb-starter docker container yourselvesyou can build it using:

make docker

Starting a cluster

Install ArangoDB in the usual way as binary package. Then:

On host A:

arangodb

This will use port 8528 to wait for colleagues (3 are needed for aresilient agency). On host B: (can be the same as A):

arangodb --starter.join A

This will contact A on port 8528 and register. On host C: (can be sameas A or B):

arangodb --starter.join A

This will contact A on port 8528 and register.

From the moment on when 3 have joined, each will fire up an Agent, aCoordinator and a DB-Server and the cluster is up. Ports are shown onthe console, the starter uses the next few ports above the starterport. That is, if one uses port 8528 for the starter, the Coordinatorwill use 8529 (=8528+1), the DB-Server 8530 (=8528+2), and the Agent 8531(=8528+3). See below under --starter.port for how to change thestarter default port.

Additional servers can be added in the same way.

More usage info

See the ArangoDB Starter Tutorial.

HTTP API

See HTTP API.

Future plans

  • Allow starter with Agent to be removed from cluster
  • Enable cluster to be updated in a controlled manner.

Technical explanation as to what happens

The procedure is essentially that the first instance of arangodb (akathe "master") offers an HTTP service on port 8528 for peers to register.Every instance that registers becomes a slave. As soon as there arecluster-agency-size peers, every instance of arangodb starts up an Agent (ifit is one of the first 3), a DB-Server, and a Coordinator. The necessarycommand line options to link the arangod instances up are generatedautomatically. The cluster bootstraps and can be used.

Whenever an arangodb instance shuts down, it shuts down the arangodinstances under its control as well. When the arangodb is startedagain, it recalls the old configuration from the setup.json file inits data directory, starts up its arangod instances again (with theirdata) and they join the cluster.

All network addresses are discovered from the HTTP communication betweenthe arangodb instances. The ports used 8529(/8539/8549) for the Coordinator,8530(/8540/8550) for the DB-Server, 8531(/8541/8551) for the Agent)need to be free. If more than one instance of an arangodb are startedon the same machine, the second will increase all these port numbers by 10 and so on.

In case the executable is running in Docker, it will use the DockerAPI to retrieve the port number of the Docker host to which the 8528 portnumber is mapped. The containers started by the executable will allmap the port they use to the exact same host port.

Feedback

Feedback is very welcome in the form of github issues, pull requestsor an email to [email protected].


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap