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