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:
/etc/ceph/ceph.conf is found, do nothing./etc/cephTo 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.confceph.client.admin.keyringceph.mon.keyringmonmapExcept 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 hostnameMON_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)Content type
Image
Digest
Size
205.6 MB
Last updated
over 10 years ago
docker pull nihilifer/ceph-docker