allow for enabling/disabling of services. separate source dir from opt in lxc
This commit is contained in:
parent
8fbba9124b
commit
bdbe6d98db
2 changed files with 8 additions and 3 deletions
|
@ -97,8 +97,8 @@ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|||
# 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
|
||||
|
|
7
stack.sh
7
stack.sh
|
@ -34,6 +34,7 @@ KEYSTONE_DIR=$DEST/keystone
|
|||
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 @@ rm -f $GLANCE_DIR/glance.sqlite
|
|||
|
||||
# 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"
|
||||
|
|
Loading…
Reference in a new issue