From 3e55c310174590b02d7db4e421e330b2cdd54526 Mon Sep 17 00:00:00 2001 From: Paul Collins Date: Tue, 2 Oct 2012 22:25:11 +1300 Subject: [PATCH] add README and some prototype hooks --- README | 18 ++++++++++++++++++ config.yaml | 9 ++++++++- copyright | 1 + hooks/install | 19 +++++++++++++++++++ hooks/mon-relation | 5 +++++ hooks/mon-relation-changed | 1 + hooks/mon-relation-departed | 1 + hooks/mon-relation-joined | 1 + hooks/start | 13 +++++++++++++ metadata.yaml | 3 +++ 10 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 README create mode 100755 hooks/install create mode 100755 hooks/mon-relation create mode 120000 hooks/mon-relation-changed create mode 120000 hooks/mon-relation-departed create mode 120000 hooks/mon-relation-joined create mode 100644 hooks/start diff --git a/README b/README new file mode 100644 index 0000000..0b56260 --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +This charm deploys a Ceph cluster. + +It uses the new-style Ceph deployment as reverse-engineered from the +Chef cookbook at https://github.com/ceph/ceph-cookbooks + +This charm is currently deliberately inflexible and potentially +destructive. It is designed to deploy on exactly three machines. +Each machine will run mon and osd. + +The osds use so-called "OSD hotplugging". ceph-disk-prepare is used +to create the filesystems with a special GPT partition type. udev is +set up to mount such filesystems and start the osd daemons as their +storage becomes visible to the system (or after "udevadm trigger"). + +The Chef cookbook above performs some extra steps to generate an OSD +bootstrapping key and propagate it to the other nodes in the cluster. +Since all our OSDs run on nodes that also run mon, we don't need this +and did not implement it. diff --git a/config.yaml b/config.yaml index 5107e47..0fca4bc 100644 --- a/config.yaml +++ b/config.yaml @@ -4,6 +4,13 @@ options: description: | fsid of our cluster osd-devices: - default: ["/dev/sdb", "/dev/sdc", "/dev/sdd", "/dev/sde"] + type: string + default: /dev/sdb /dev/sdc /dev/sdd /dev/sde description: | the devices to format and set up as osd volumes + monitor-secret: + type: string + description: | + this value will become the "mon." key + to generate a suitable value, use + ceph-authtool /dev/stdout --name=mon. --gen-key diff --git a/copyright b/copyright index 44e9574..8b380c2 100644 --- a/copyright +++ b/copyright @@ -2,3 +2,4 @@ Copyright 2012 Canonical Ltd. Authors: Paul Collins + James Page diff --git a/hooks/install b/hooks/install new file mode 100755 index 0000000..b26b687 --- /dev/null +++ b/hooks/install @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e +set -u + +# set up ceph package source +# XXX make this a charm config option +cat >/etc/apt/sources.list.d/ceph-brolin.list <