Skip to content

calebTomlinson/riak-mesos

 
 

Repository files navigation

Build Status

Riak Mesos Framework [in beta]

An Apache Mesos framework for Riak KV, a distributed NoSQL key-value data store that offers high availability, fault tolerance, operational simplicity, and scalability.

Note: This project is an early proof of concept. The code is a beta release and there may be bugs, incomplete features, incorrect documentation or other discrepancies.

Quick Links

Other Documentation

Package Downloads

DCOS support is still in development and is not supported on all platforms.

Installation

Create a Configuration File

For the framework to work properly in your environment, a custom config file may need to be used. Here is a minimal example:

dcos-riak.json

{
    "riak": {
        "master": "zk://master.mesos:2181/mesos",
        "zk": "master.mesos:2181",
        "user": "root",
        "framework-name": "riak"
    }
}

More examples can be found in dcos-riak-cluster-1.json, dcos-riak-cluster-2.json, and dcos-riak-cluster-3.json.

Install the Riak Service

The Riak framework should have at least 2GB of RAM and 0.5 CPUs to perform successfully.

dcos package update
dcos package install riak --options=dcos-riak.json

CLI Usage

Command line utility for the Riak Mesos Framework / DCOS Service.
This utility provides tools for modifying and accessing your Riak
on Mesos installation.

Usage: dcos riak <subcommands> [options]

Subcommands:
    cluster list
    cluster create
    node list
    node add [--nodes <number>]
    proxy config [--zk <host:port>]
    proxy install [--zk <host:port>]
    proxy uninstall
    proxy endpoints [--public-dns <host>]

Options (available on most commands):
    --cluster <cluster-name>      Default: riak-cluster
    --framework <framework-name>  Default: riak
    --debug
    --help
    --info
    --version

Add Riak Nodes

Create a 3 node cluster named 'riak-cluster' (this is the default name).

dcos riak cluster create
dcos riak node add --nodes 3

Create a second 1 node cluster named 'riak-test-cluster'.

dcos riak cluster create --cluster riak-test-cluster
dcos riak node add --cluster riak-test-cluster

Accessing Your Riak Nodes

The Riak Mesos Director smart proxy can be easily installed on your DCOS cluster with these commands:

dcos riak proxy install

Once it is up and running, explore your proxy and Riak cluster using the following command:

dcos riak proxy endpoints --public-dns <host>

The output should look something like this:

Load Balanced Riak Cluster (HTTP)
    http://<host>:10002

Load Balanced Riak Cluster (Protobuf)
    http://<host>:10003

Riak Mesos Director API (HTTP)
    http://<host>:10004

Riak Explorer and API (HTTP)
    http://<host>:10005

Uninstalling

To remove the proxy from marathon, run this command:

dcos riak proxy uninstall

All of the tasks created by the Riak framework can be killed with the following:

dcos package uninstall riak

Note: Currently, Zookeeper entries are left behind by the framework even after uninstall. To completely remove these entries, use a Zookeeper client to delete the relevant nodes.

To remove just one framework instance, delete the /riak/frameworks/riak node.

If you have changed the value of framework-name in your config, the last /riak will change.

To remove all framework instances, delete the /riak node in Zookeeper.

Architecture

Scheduler

The Riak Mesos Framework scheduler will attempt to spread Riak nodes across as many different mesos agents as possible to increase fault tolerance. If there are more nodes requested than there are agents available, the scheduler will then start adding more Riak nodes to existing agents.

Architecture

Director

Due to the nature of Apache Mesos and the potential for Riak nodes to come and go on a regular basis, client applications using a Mesos based cluster must be kept up to date on the cluster's current state. Instead of requiring this intelligence to be built into Riak client libraries, a smart proxy application named Director has been created which can run alongside client applications.

Director

For installation and usage instructions related to the Riak Mesos Director, please read docs/DIRECTOR.md

Mesos Users

The Framework can be used on Mesos clusters without DCOS as well. Follow the instructions in docs/MESOS_USAGE.md if you are not a DCOS user.

Development / Contributing

For build and testing information, visit docs/DEVELOPMENT.md.

About

An Apache Mesos framework for Riak KV in experimental beta. Do not run in production.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 50.2%
  • Erlang 25.5%
  • Shell 10.6%
  • Python 6.7%
  • Makefile 6.0%
  • C 1.0%