From a317d242b4f5040562fa9c57878aa6555607f488 Mon Sep 17 00:00:00 2001 From: TommyLike Date: Thu, 8 Jun 2017 14:11:17 +0800 Subject: [PATCH] Clarify some details related blockbox deployment Add or modify some guidelines related to blockbox deploying procedure. Change-Id: I234f18bfa08ea2e157ba9787bb96a4d84a94c9e7 --- contrib/block-box/README.md | 12 +++++++++--- contrib/block-box/cinder.rc | 2 +- contrib/block-box/init-scripts/cinder-api.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/block-box/README.md b/contrib/block-box/README.md index 960db99d784..fe1bd6dac61 100644 --- a/contrib/block-box/README.md +++ b/contrib/block-box/README.md @@ -31,7 +31,7 @@ to choose the Cinder Branch you'd like to use and Platform then simply run: ```make base``` -You can also build an image to run LVM: +You can also build an image to run LVM (**NOTE**: This is dependent on the base cinder image): ```make lvm``` @@ -104,9 +104,11 @@ sudo pip install pytz sudo pip install git+https://github.com/openstack/python-cinderclient sudo pip install git+https://github.com/openstack/python-brick-cinderclient-ext ``` +Before using, you must specify these env variables at least, +``OS_AUTH_TYPE``, ``CINDER_ENDPOINT``, ``OS_PROJECT_ID``, ``OS_USERNAME``. +You can utilize our sample file ``cinder.rc``, then you can use client +to communicate with your containerized cinder deployment with noauth!! -Now, you can source the included cinder.rc file to use the client to -communicate with your containerized cinder deployment, with noauth!! Remember, to perform local-attach/local-detach of volumes you'll need to use sudo. To preserve your env variables don't forget to use `sudo -E cinder xxxxx` @@ -119,6 +121,10 @@ specific driver. We'll be adding support for the LVM driver and LIO Tgts shortly, but for now you won't have much luck without using an external device (no worries, there are over 80 to choose from). +**Note**: If you use ``cinder-lvm`` image, you must guarantee the required +volume group which is specified in the ``cinder.conf`` already exists in +the host environment before starting the service. + ## Adding your own driver We don't do multi-backend in this type of environment; instead we just add another container running the backend we want. We can easily add to the base diff --git a/contrib/block-box/cinder.rc b/contrib/block-box/cinder.rc index 134cf174030..320a6cfb569 100644 --- a/contrib/block-box/cinder.rc +++ b/contrib/block-box/cinder.rc @@ -1,5 +1,5 @@ export OS_AUTH_TYPE=noauth -export CINDERCLIENT_BYPASS_URL=http://10.117.36.106:8776/v3 +export CINDER_ENDPOINT=http://10.117.36.106:8776/v3 export OS_PROJECT_ID=cinderflex export OS_USERNAME=kubernetes export OS_VOLUME_API_VERSION=3.27 diff --git a/contrib/block-box/init-scripts/cinder-api.sh b/contrib/block-box/init-scripts/cinder-api.sh index 7f6f0768843..a26df009371 100644 --- a/contrib/block-box/init-scripts/cinder-api.sh +++ b/contrib/block-box/init-scripts/cinder-api.sh @@ -2,6 +2,6 @@ INIT_DB=${INIT_DB:-true} if [ "$INIT_DB" = "true" ]; then -/bin/sh -c "cinder-manage db sync" cinder +/bin/sh -c "cinder-manage db sync" fi cinder-api -d