Public | Automated Build

Last pushed: a year ago
Short Description
Ceph bootstrap (configuration)
Full Description

/!\ WARNING - DEPRECATED - NOT MAINTAINED ANYMORE /!\

Given that the ceph/daemon image has the same capabilities and is more featureful we would recommend to use it as a replacement.

ceph-config

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.

Usage

To bootstrap a new cluster run:

docker run -e ETCDCTL_PEERS=http://192.168.101.50:4001 -e MON_IP=192.168.101.50 -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.

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. http://192.168.2.4:4001)
Docker Pull Command
Owner
ceph
Source Repository

Comments (1)
wcchh
3 years ago

As I run by above docker cmd, here's what I got:

Configuration found for cluster testing. Writing to disk.
Error: 100: Key not found (/ceph-config/testing/ceph.conf) [3]

But there's nothing in etcd at begining!
Any suggestion?