allow for enabling/disabling of services. separate source dir from opt in lxc
diff --git a/build_lxc.sh b/build_lxc.sh
index e4fda6e..628ac85 100755
--- a/build_lxc.sh
+++ b/build_lxc.sh
@@ -97,8 +97,8 @@
# Install and run stack.sh
apt-get update
apt-get -y --force-yes install git-core vim-nox sudo
-su -c "git clone git://github.com/cloudbuilders/nfs-stack.git /opt/nfs-stack" stack
-su -c "cd /opt/nfs-stack && ./stack.sh" stack
+su -c "git clone git://github.com/cloudbuilders/nfs-stack.git ~/nfs-stack" stack
+su -c "cd ~/nfs-stack && ./stack.sh" stack
EOF
chmod 700 $INSTALL_SH
diff --git a/stack.sh b/stack.sh
index 3d21df5..21a66ed 100755
--- a/stack.sh
+++ b/stack.sh
@@ -34,6 +34,7 @@
NOVACLIENT_DIR=$DEST/python-novaclient
API_DIR=$DEST/openstackx
NOVNC_DIR=$DEST/noVNC
+ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash
# Use the first IP unless an explicit is set by ``HOST_IP`` environment variable
if [ ! -n "$HOST_IP" ]; then
@@ -248,9 +249,13 @@
# nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window.
+ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash
function screen_it {
screen -S nova -X screen -t $1
- screen -S nova -p $1 -X stuff "$2$NL"
+ # only run the services specified in $ENABLED_SERVICES
+ if [[ $ENABLED_SERVICES == *$2* ]] then
+ screen -S nova -p $1 -X stuff "$2$NL"
+ fi
}
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"