Openly serious about storage
REX-Ray is an open source, storage management solution designed to support container runtimes such as Docker and Mesos. REX-Ray enables stateful applications, such as databases, to persist and maintain its data after the life cycle of the container has ended. Built-in high availability enables orchestrators such as Docker Swarm, Kubernetes, and Mesos Frameworks like Marathon to automatically orchestrate storage tasks between hosts in a cluster.
Built on top of the libStorage framework, REX-Ray's simplified architecture consists of a single binary and runs as a stateless service on every host using a configuration file to orchestrate multiple storage platforms.
The following command will install the latest version of REX-Ray to
/usr/bin/rexray on Linux systems:
$ curl -sSL https://dl.bintray.com/emccode/rexray/install | sh
Depending on the Linux distribution REX-Ray will be registered as either a SystemD or SystemV service.
REX-Ray requires a configuration file for storing details used to communicate with storage providers. This can include authentication credentials and driver- specific configuration options.
After REX-Ray has been installed, copy and paste the contents from the
REX-Ray Configuration Generator to a
new file on the host at
/etc/rexray/config.yml. The configuration generator
will satisfy the majority of use cases for REX-Ray.
For more advanced and manual options, such as using multiple storage platforms, and sample configurations of all supported storage platforms, refer to the libStorage Storage Providers documentation. Additionally, look at core properties and logging.
Here is a simple example for using Oracle VirtualBox:
libstorage: service: virtualbox virtualbox: volumePath: $HOME/VirtualBox/Volumes
Refer to the VirtualBox documentation for additional configuration options.
Start the VirtualBox SOAP API service using:
$ vboxwebsrv -H 0.0.0.0 -v
From here, REX-Ray can now be used as a command line tool. View the commands available:
$ rexray --help
To verify the configuration file is working, use REX-Ray to list the volumes:
$ rexray volume ls ID Name Status Size 1b819454-a280-4cff-aff5-141f4e8fd154 libStorage.vmdk attached 16
If there is an error, use the
-l debug flag and consult debugging
Start as a Service¶
Container platforms rely on REX-Ray to be running as a service to function properly. For instance, Docker communicates to the REX-Ray Volume Driver via a UNIX socket file.
$ rexray service start
Having issues? No worries, let's figure it out together.
-l debug flag can be appended to any command in order to get verbose
output. The following command will list all of the volumes visible to REX-Ray
with debug logging enabled:
$ rexray volume ls -l debug
For an example of the full output from the above command, please refer to this Gist.
This section lists the storage platforms, operating systems (OS), and container runtimes, and container orchestrators (CO) with which REX-Ray is compatible.
Storage Provider Support¶
The following storage providers and platforms are supported by REX-Ray.
|GCE Persistent Disk||✓||✓||✓|
|Microsoft||Azure Unmanaged Disk||✓||✓|
Operating System Support¶
The following operating systems (OS) are supported by REX-Ray:
|OS X Yosemite+||✓|
Container Runtime Support¶
REX-Ray currently supports the following container platforms:
|Docker||Volume Driver Plugin|
|Mesos||Volume Driver Isolator module|
|Mesos + Docker||Volume Driver Plugin|
Container Orchestration Support¶
REX-Ray currently supports the following container orchestrators:
|Marathon||Docker, Mesos Containerizer|