DC/OS (the DataCenter Operating System) is a distributed operating system used for deploying and managing applications and systems on Apache Mesos. DC/OS is an open-source tool created and maintained by Mesosphere.
In order to run BookKeeper on DC/OS, you will need:
Each node in your DC/OS-managed Mesos cluster must have at least:
- 1 CPU
- 1 GB of memory
- 10 GB of total persistent disk storage
$ dcos package install bookkeeper --yes
This command will:
- Install the
bookkeepersubcommand for the
- Start a single bookie on the Mesos cluster with the default configuration
The bookie that is automatically started up uses the host mode of the network and by default exports the service at
If you run
dcos package install bookkeeperwithout setting the
--yesflag, the install will run in interactive mode. For more information on the
package installcommand, see the DC/OS docs.
To watch BookKeeper start up, click on the Services tab in the DC/OS user interface and you should see the
bookkeeper package listed:
To see which tasks have started, click on the
bookkeeper service and you’ll see an interface that looks like this;
Once the first bookie has started up, you can click on the Scale tab to scale up your BookKeeper ensemble by adding more bookies (or scale down the ensemble by removing bookies).
ZooKeeper contains the information for all bookies in the ensemble. When deployed on DC/OS, BookKeeper uses a ZooKeeper instance provided by DC/OS. You can access a visual UI for ZooKeeper using Exhibitor, which is available at http://master.dcos/exhibitor.
You should see a listing of IP/host information for all bookies under the
To connect to bookies running on DC/OS using clients running within your Mesos cluster, you need to specify the ZooKeeper connection string for DC/OS’s ZooKeeper cluster:
This is the only ZooKeeper host/port you need to include in your connection string. Here’s an example using the Java client:
BookKeeper bkClient =newBookKeeper("master.mesos:2181");
If you’re connecting using a client running outside your Mesos cluster, you need to supply the public-facing connection string for your DC/OS ZooKeeper cluster.
By default, the
bookkeeper package will start up a BookKeeper ensemble consisting of one bookie with one CPU, 1 GB of memory, and a 70 MB persistent volume.
You can supply a non-default configuration when installing the package using a JSON file. Here’s an example command:
$ dcos package install bookkeeper \
You can then fetch the current configuration for BookKeeper at any time using the
package describe command:
$ dcos package describe bookkeeper \
Not all configurable parameters for BookKeeper are available for BookKeeper on DC/OS. Only the parameters show in the table below are available.
|String||The name of the DC/OS service.|
|Integer||The number of CPU shares to allocate to each bookie. The minimum is 1.|
|Integer||The number of bookies top run. The minimum is 1.|
|Number||The memory, in MB, to allocate to each BookKeeper task|
|Number||The persistent volume size, in MB|
|String||The connection string for the ZooKeeper client instance|
|Integer||The BookKeeper export service port, using |
Here’s an example JSON configuration object for BookKeeper on DC/OS:
If that configuration were stored in a file called
bk-config.json, you could apply that configuration upon installating the BookKeeper package using this command:
$ dcos package install bookkeeper \
You can shut down and uninstall the
bookkeeper from DC/OS at any time using the
package uninstall command:
$ dcos package uninstall bookkeeper
Uninstalledpackage[bookkeeper] version [4.12.1]
Thank you forusing bookkeeper.