add README and some prototype hooks
This commit is contained in:
parent
8ff7acad82
commit
3e55c31017
18
README
Normal file
18
README
Normal file
@ -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: |
|
||||
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
|
||||
|
@ -2,3 +2,4 @@ Copyright 2012 Canonical Ltd.
|
||||
|
||||
Authors:
|
||||
Paul Collins <paul.collins@canonocal.com>
|
||||
James Page <james.page@canonical.com>
|
||||
|
19
hooks/install
Executable file
19
hooks/install
Executable file
@ -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
|
5
hooks/mon-relation
Executable file
5
hooks/mon-relation
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
1
hooks/mon-relation-changed
Symbolic link
1
hooks/mon-relation-changed
Symbolic link
@ -0,0 +1 @@
|
||||
mon-relation
|
1
hooks/mon-relation-departed
Symbolic link
1
hooks/mon-relation-departed
Symbolic link
@ -0,0 +1 @@
|
||||
mon-relation
|
1
hooks/mon-relation-joined
Symbolic link
1
hooks/mon-relation-joined
Symbolic link
@ -0,0 +1 @@
|
||||
mon-relation
|
13
hooks/start
Normal file
13
hooks/start
Normal file
@ -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
|
||||
description: |
|
||||
This charm deploys Ceph.
|
||||
peers:
|
||||
mon:
|
||||
interface: ceph-brolin
|
||||
|
Loading…
Reference in New Issue
Block a user