diff --git a/devstack/plugin.sh b/devstack/plugin.sh index a47639175..3b75c2727 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -16,6 +16,7 @@ NODEPOOL_KEY=$HOME/.ssh/id_nodepool NODEPOOL_PUBKEY=$HOME/.ssh/id_nodepool.pub +NODEPOOL_INSTALL=$HOME/nodepool-venv # Install shade from git if requested. If not requested # nodepool install will pull it in. @@ -25,7 +26,13 @@ function install_shade { GITDIR["shade"]=$DEST/shade GITBRANCH["shade"]=$SHADE_REPO_REF git_clone_by_name "shade" + # Install shade globally, because the job config has LIBS_FROM_GIT + # and if we don't install it globally, all hell breaks loose setup_dev_lib "shade" + # BUT - install shade into a virtualenv so that we don't have issues + # with OpenStack constraints affecting the shade dependency install. + # This particularly shows up with os-client-config + $NODEPOOL_INSTALL/bin/pip install -e $DEST/shade fi } @@ -36,15 +43,18 @@ function install_diskimage_builder { GITBRANCH["diskimage-builder"]=$DISKIMAGE_BUILDER_REPO_REF git_clone_by_name "diskimage-builder" setup_dev_lib "diskimage-builder" + $NODEPOOL_INSTALL/bin/pip install -e $DEST/diskimage-builder fi } # Install nodepool code function install_nodepool { + virtualenv $NODEPOOL_INSTALL install_shade install_diskimage_builder setup_develop $DEST/nodepool + $NODEPOOL_INSTALL/bin/pip install -e $DEST/nodepool } # requires some globals from devstack, which *might* not be stable api @@ -288,16 +298,18 @@ function start_nodepool { secgroup-add-rule default udp 1 65535 0.0.0.0/0 fi + export PATH=$NODEPOOL_INSTALL/bin:$PATH + # start gearman server - run_process geard "geard -p 8991 -d" + run_process geard "$NODEPOOL_INSTALL/bin/geard -p 8991 -d" # run a fake statsd so we test stats sending paths export STATSD_HOST=localhost export STATSD_PORT=8125 run_process statsd "socat -u udp-recv:$STATSD_PORT -" - run_process nodepool "nodepoold --no-builder -c $NODEPOOL_CONFIG -s $NODEPOOL_SECURE -l $NODEPOOL_LOGGING -d" - run_process nodepool-builder "nodepool-builder -c $NODEPOOL_CONFIG -d" + run_process nodepool "$NODEPOOL_INSTALL/bin/nodepoold --no-builder -c $NODEPOOL_CONFIG -s $NODEPOOL_SECURE -l $NODEPOOL_LOGGING -d" + run_process nodepool-builder "$NODEPOOL_INSTALL/bin/nodepool-builder -c $NODEPOOL_CONFIG -d" : }