cloudbuilders/devstack — Issue #150: Restart The Services
Author: ctassell
Created: 2011-11-02 10:33:39+00:00
State: open

I couldn't seem to comment on issue 61 anymore, but if you want to start the services on reboot this script should do it (run it as the stack user):

#!/bin/bash

ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit}

function screen_it {
NL=`echo -ne '\015'`
if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then
screen -S nova -X screen -t $1
screen -S nova -p $1 -X stuff "$2$NL"
fi
}
screen -d -m -S nova -t nova
screen_it g-reg 'cd /opt/stack/glance; bin/glance-registry --config-file=etc/glance-registry.conf'
screen_it g-api 'cd /opt/stack/glance; bin/glance-api --config-file=etc/glance-api.conf'
screen_it key 'cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone --config-file /opt/stack/keystone/etc/keystone.conf -d'
screen_it n-api 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-api'
screen_it n-cpu 'cd /opt/stack/nova && sg libvirtd /opt/stack/nova/bin/nova-compute'
screen_it n-vol 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-volume'
screen_it n-net 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-network'
screen_it n-sch 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-scheduler'
screen_it n-vnc 'cd /opt/stack/noVNC && ./utils/nova-wsproxy.py --flagfile /opt/stack/nova/bin/nova.conf --web . 6080'
screen_it horizon 'cd /opt/stack/horizon && sudo tail -f /var/log/apache2/error.log'