From 48192e2f63f62eee7ab8a304e2e25b6d19f00d0b Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Wed, 16 Sep 2015 08:52:22 -0400 Subject: [PATCH] rbd: don't use /dev/rbd/pool/image; use sysfs to find rbd device instead rbd: if rbd image is not formatted, format it to the designated filesystem type rbd: update example README.md and include instructions to get base64 encoded Ceph secret if rbd fails to lock image, unmap the image before exiting Signed-off-by: Huamin Chen --- rbd/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rbd/README.md b/rbd/README.md index 0c5ff15e..5d1faec0 100644 --- a/rbd/README.md +++ b/rbd/README.md @@ -35,7 +35,7 @@ Documentation for other releases can be found at Install Ceph on the Kubernetes host. For example, on Fedora 21 - # yum -y install ceph + # yum -y install ceph-common If you don't have a Ceph cluster, you can set up a [containerized Ceph cluster](https://github.com/rootfs/docker-ceph) @@ -54,7 +54,14 @@ Once you have installed Ceph and new Kubernetes, you can create a pod based on m # Use Ceph Authentication Secret -If Ceph authentication secret is provided, the secret should be first be base64 encoded, then encoded string is placed in a secret yaml. An example yaml is provided [here](secret/ceph-secret.yaml). Then post the secret through ```kubectl``` in the following command. +If Ceph authentication secret is provided, the secret should be first be *base64 encoded*, then encoded string is placed in a secret yaml. For example, getting Ceph user `kube`'s base64 encoded secret can use the following command: + +```console + # grep key /etc/ceph/ceph.client.kube.keyring |awk '{printf "%s", $NF}'|base64 +QVFBTWdYaFZ3QkNlRGhBQTlubFBhRnlmVVNhdEdENGRyRldEdlE9PQ== +``` + +An example yaml is provided [here](secret/ceph-secret.yaml). Then post the secret through ```kubectl``` in the following command. ```console # kubectl create -f examples/rbd/secret/ceph-secret.yaml