allow for enabling/disabling of services. separate source dir from opt in lxc

This commit is contained in:
Anthony Young 2011-09-13 09:43:46 -07:00
parent 8fbba9124b
commit bdbe6d98db
2 changed files with 8 additions and 3 deletions

View file

@ -97,8 +97,8 @@ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Install and run stack.sh # Install and run stack.sh
apt-get update apt-get update
apt-get -y --force-yes install git-core vim-nox sudo 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 "git clone git://github.com/cloudbuilders/nfs-stack.git ~/nfs-stack" stack
su -c "cd /opt/nfs-stack && ./stack.sh" stack su -c "cd ~/nfs-stack && ./stack.sh" stack
EOF EOF
chmod 700 $INSTALL_SH chmod 700 $INSTALL_SH

View file

@ -34,6 +34,7 @@ KEYSTONE_DIR=$DEST/keystone
NOVACLIENT_DIR=$DEST/python-novaclient NOVACLIENT_DIR=$DEST/python-novaclient
API_DIR=$DEST/openstackx API_DIR=$DEST/openstackx
NOVNC_DIR=$DEST/noVNC 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 # Use the first IP unless an explicit is set by ``HOST_IP`` environment variable
if [ ! -n "$HOST_IP" ]; then if [ ! -n "$HOST_IP" ]; then
@ -248,9 +249,13 @@ rm -f $GLANCE_DIR/glance.sqlite
# nova api crashes if we start it with a regular screen command, # nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window. # 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 { function screen_it {
screen -S nova -X screen -t $1 screen -S nova -X screen -t $1
# only run the services specified in $ENABLED_SERVICES
if [[ $ENABLED_SERVICES == *$2* ]] then
screen -S nova -p $1 -X stuff "$2$NL" 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" screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"