home shape

Running ArangoDB 3.0.0 on DC/OS Cluster

As you surely recognized we´ve released ArangoDB 3.0 a few days ago. It comes with great cluster improvements like synchronous replication, automatic failover, easy up- and downscaling via the graphical user interface and with lots of other improvements. Furthermore, ArangoDB 3 is even better integrated with Apache Mesos and DC/OS.

Currently, the new release is undergoing the certification procedure to get the same “fully-certified” status from our friends at Mesosphere as v2.8 has. This may take a few more days.

But we have good news for all the passionate people out there who don´t want to wait…  You can fire up an ArangoDB 3 cluster today on your DC/OS cluster. In this blog post, we describe how this is done.

Deploying ArangoDB 3

We assume that you have installed a DC/OS cluster using the tools and instructions here. You will probably have chosen OAuth authentification for you DC/OS cluster and have logged in using your github account. Furthermore, you should install the `dcos` command line interface by clicking on “Install CLI” in the menu in the lower left corner of your DC/OS dashboard, and authenticate `dcos` by doing

--dcos auth login

Once this is all done, your are all set and can simply deploy an ArangoDB cluster to your DC/OS cluster with the following command:

--dcos marathon app add arangodb3.json

where the file `arangodb3.json` is the following:

--{
"id": "arangodb3",
"framework-name": "arangodb3",
"cpus": 0.125,
"mem": 1024.0,
"ports": [0, 0, 0],
"instances": 1,
"args": [
"framework",
"--framework_name=arangodb3",
"--master=zk://master.mesos:2181/mesos",
"--zk=zk://master.mesos:2181/arangodb3",
"--user=",
"--principal=arangodb3",
"--role=arangodb3",
"--mode=cluster",
"--async_replication=false",
"--minimal_resources_agent=mem(*):512;cpus(*):0.125;disk(*):512",
"--minimal_resources_dbserver=mem(*):4096;cpus(*):1;disk(*):4096",
"--minimal_resources_secondary=mem(*):4096;cpus(*):1;disk(*):4096",
"--minimal_resources_coordinator=mem(*):4096;cpus(*):1;disk(*):4096",
"--nr_agents=1",
"--nr_dbservers=3",
"--nr_coordinators=3",
"--failover_timeout=30",
"--secondaries_with_dbservers=false",
"--coordinators_with_dbservers=false",
"--arangodb_privileged_image=true",
"--arangodb_image=arangodb/arangodb-mesos:3.0.0"
],
"env": {
"ARANGODB_WEBUI_HOST": "",
"ARANGODB_WEBUI_PORT": "0",
"MESOS_AUTHENTICATE": "",
"ARANGODB_SECRET": ""
},
"container": {
"type": "DOCKER",
"docker": {
"image": "arangodb/arangodb-mesos-framework:3.0.0",
"forcePullImage": true,
"network": "HOST"
}
},
"healthChecks": [
{
"protocol": "HTTP",
"path": "/framework/v1/health.json",
"gracePeriodSeconds": 3,
"intervalSeconds": 10,
"portIndex": 0,
"timeoutSeconds": 10,
"maxConsecutiveFailures": 0
}
]
}

In this file, you might want to edit the minimal resources as well as the initial number of coordinators and DBservers. You can scale these numbers up and down after the launch via the cluster user interface.

A few minutes later you should see a new service `arangodb3` in your DC/OS dashboard and if you open that service, you will automatically be taken to the ArangoDB 3 cluster frontend.

Alternatively, you can use Marathon’s web UI, switch to JSON mode (upper right corner), and use the same JSON file.

Getting rid of the ArangoDB 3 cluster again

Shutting down the cluster is not yet as easy as we wished for, but we are working hard to improve this experience.

The easiest way is simply to destroy the DC/OS cluster as a whole.

However, you can keep your DC/OS cluster, by doing:

    Destroy the app in Marathon, either via the user interface or by doing
--dcos marathon app remove arangodb3
    Run our cleanup tool by doing
--dcos marathon app add cleanup.json

using the file

--{
"id": "cleanup",
"cpus": 1,
"mem": 4196.0,
"ports": [],
"instances": 1,
"args": [
"/arangodb-cleanup-framework",
"--name=arangodb3",
"--master=zk://master.mesos:2181/mesos",
"--zk=zk://master.mesos:2181/arangodb3",
"--principal=arangodb3",
"--role=arangodb3"
],
"env": {
},
"container": {
"type": "DOCKER",
"docker": {
"image": "m0ppers/arangodb-cleanup-framework",
"forcePullImage": true,
"network": "HOST"
}
}
}

This will properly clean out the persistent state in zookeeper, destroy all persistent volumes and unreserve all resources for `arangodb3`.

After a minute or so, simply destroy the `cleanup` app in Marathon or do

--dcos marathon app remove cleanup

Have fun testing and playing around with ArangoDB 3.0 on DC/OS!

We´ll keep you posted as soon as ArangoDB 3.0 has completed the certification process via Twitter and our Slack Channel.

Max Neunhöffer

Max is one of the C/C++ developers working on the ArangoDB core. In particular, he is responsible for the sharding extension and additionally converts the latest ideas from database science into C/C++ code. Furthermore, he enjoys to give public talks about the technical aspects of the ArangoDB development.

Leave a Comment





Get the latest tutorials, blog posts and news: