Move image location out of config location

In the devstack plugin don't write the images to the config dir for
nodepool. This prevents us from copying the built qcow2 to the log
server (saves disk space and speeds up the jobs). This also provides
logical separation from the inputs (config) to nodepool and the outputs
(images) of nodepool.

Change-Id: I066ccda8a564bf9ea144a3dda9f6d506bb130a61
This commit is contained in:
Clark Boylan 2015-10-05 14:43:30 -07:00
parent d2d4305a53
commit b7cc4b894b
2 changed files with 8 additions and 8 deletions

View File

@ -81,11 +81,10 @@ EOF
$(dirname $NODEPOOL_CONFIG)/elements/nodepool-setup/install.d/01-nodepool-setup
sudo chmod a+x \
$(dirname $NODEPOOL_CONFIG)/elements/nodepool-setup/install.d/01-nodepool-setup
sudo mkdir -p $(dirname $NODEPOOL_CONFIG)/images
sudo mkdir -p /opt/dib/tmp
sudo mkdir -p /opt/dib/cache
sudo chown stack:stack $(dirname $NODEPOOL_CONFIG)/images
sudo chown -R stack:stack /opt/dib
sudo mkdir -p $NODEPOOL_DIB_BASE_PATH/images
sudo mkdir -p $NODEPOOL_DIB_BASE_PATH/tmp
sudo mkdir -p $NODEPOOL_DIB_BASE_PATH/cache
sudo chown -R stack:stack $NODEPOOL_DIB_BASE_PATH
}
function nodepool_write_config {
@ -130,7 +129,7 @@ EOF
# example script for /path/to/nodepool/things/scripts.
script-dir: $(dirname $NODEPOOL_CONFIG)/scripts
elements-dir: $(dirname $NODEPOOL_CONFIG)/elements
images-dir: $(dirname $NODEPOOL_CONFIG)/images
images-dir: $NODEPOOL_DIB_BASE_PATH/images
# The mysql password here may be different depending on your
# devstack install, you should double check it (the devstack var
# is MYSQL_PASSWORD and if unset devstack should prompt you for
@ -209,8 +208,8 @@ diskimages:
- nodepool-setup
release: trusty
env-vars:
TMPDIR: /opt/dib/tmp
DIB_IMAGE_CACHE: /opt/dib/cache
TMPDIR: $NODEPOOL_DIB_BASE_PATH/tmp
DIB_IMAGE_CACHE: $NODEPOOL_DIB_BASE_PATH/cache
DIB_APT_LOCAL_CACHE: '0'
DIB_DISABLE_APT_CLEANUP: '1'
DIB_DEV_USER_AUTHORIZED_KEYS: $NODEPOOL_PUBKEY

View File

@ -2,6 +2,7 @@ NODEPOOL_CONFIG=/etc/nodepool/nodepool.yaml
NODEPOOL_LOGGING=/etc/nodepool/logging.conf
NODEPOOL_IMAGE_URL=https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
NODEPOOL_IMAGE=$(basename "$NODEPOOL_IMAGE_URL" ".img")
NODEPOOL_DIB_BASE_PATH=/opt/dib
IMAGE_URLS+=",$NODEPOOL_IMAGE_URL"