add README and some prototype hooks
This commit is contained in:
parent
8ff7acad82
commit
3e55c31017
|
@ -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.
|
|
@ -4,6 +4,13 @@ options:
|
||||||
description: |
|
description: |
|
||||||
fsid of our cluster
|
fsid of our cluster
|
||||||
osd-devices:
|
osd-devices:
|
||||||
default: ["/dev/sdb", "/dev/sdc", "/dev/sdd", "/dev/sde"]
|
type: string
|
||||||
|
default: /dev/sdb /dev/sdc /dev/sdd /dev/sde
|
||||||
description: |
|
description: |
|
||||||
the devices to format and set up as osd volumes
|
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
|
||||||
|
|
|
@ -2,3 +2,4 @@ Copyright 2012 Canonical Ltd.
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
Paul Collins <paul.collins@canonocal.com>
|
Paul Collins <paul.collins@canonocal.com>
|
||||||
|
James Page <james.page@canonical.com>
|
||||||
|
|
|
@ -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 <<EOF
|
||||||
|
deb http://archive.admin.canonical.com/ubuntu precise-cat-ceph main
|
||||||
|
EOF
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
apt-get -y install ceph
|
||||||
|
|
||||||
|
# ceph-prepare-disk uses this, is only "suggests" in the package
|
||||||
|
apt-get -y install gdisk
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
mon-relation
|
|
@ -0,0 +1 @@
|
||||||
|
mon-relation
|
|
@ -0,0 +1 @@
|
||||||
|
mon-relation
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
|
||||||
|
for disk in $(config-get osd-devices); do
|
||||||
|
ceph-disk-prepare $disk
|
||||||
|
done
|
||||||
|
|
||||||
|
udevadm trigger --subsystem-match=block --action=add
|
||||||
|
|
||||||
|
exit 0
|
|
@ -2,3 +2,6 @@ name: ceph-brolin
|
||||||
summary: distributed storage
|
summary: distributed storage
|
||||||
description: |
|
description: |
|
||||||
This charm deploys Ceph.
|
This charm deploys Ceph.
|
||||||
|
peers:
|
||||||
|
mon:
|
||||||
|
interface: ceph-brolin
|
||||||
|
|
Loading…
Reference in New Issue