Public | Automated Build

Last pushed: 2 years ago
Short Description
Ceph bootstrap (configuration) From Ceph-Docker
Full Description


This Dockerfile may be used to bootstrap a cluster or add the cluster configuration
to a new host. It uses etcd to store the cluster config. It is especially suitable
to setup ceph on CoreOS.

The following strategy is applied:

  • An /etc/ceph/ceph.conf is found, do nothing.
  • If a cluster configuration is available, it will be written to /etc/ceph
  • If no cluster configuration is available, it will be bootstrapped. A lock mechanism
    is used to allow concurrent deployment of multiple hosts.


To bootstrap a new cluster run:

docker run -e ETCDCTL_PEERS= -e MON_IP= -e MON_NAME=mymon -e CLUSTER=testing -v /etc/ceph:/etc/ceph ceph/config

This will generate:

  • ceph.conf
  • ceph.client.admin.keyring
  • ceph.mon.keyring
  • monmap

Except the monmap the config will be stored in etcd under /ceph-config/${CLUSTER}.

In case a configuration for the cluster is found, the configuration will be pulled
from etcd and written to /etc/ceph.

Multiple concurrent invocations will block until the first host finished to generate
the configuration.


The following environment variables can be used to configure the bootstrapping:

  • CONFIG_ROOT is the location in etcd for the ceph configuration (defaults to: "/ceph")
  • CLUSTER is the name of the ceph cluster (defaults to: "ceph")
  • CLUSTER_PATH is the location in etcd for the ceph configuration (defaults to: "${CONFIG_ROOT}/${CLUSTER}/config")

Mandatory Configuration:

  • MON_NAME is the name of the monitor. Usually the short hostname
  • MON_IP is the IP address of the monitor (public)
  • ETCDCTL_PEERS is a comma seperated list of etcd peers (e.g.
Docker Pull Command
Source Repository

Comments (0)