openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #07008
Re: How to start/stop/restart services in devstack
I've created a script. Test if it helps you. You have to create the
/var/log/nova dir.
mkdir -p /var/log/nova
__________
startnova.sh:
#!/bin/bash
service rabbitmq-server start
cd /opt/stack/glance/bin
./glance-registry --config-file=../etc/glance-registry.conf >
/var/log/nova/glance-registry.log 2>&1 &
cd /opt/stack/glance/bin
./glance-api --config-file=../etc/glance-api.conf >
/var/log/nova/glance-registry.log 2>&1 &
echo "Waiting for g-api to start..."
if ! timeout 60 sh -c "while ! wget --no-proxy -q -O- http://127.0.0.1:9292;
do sleep 1; done"; then
echo "g-api did not start"
exit 1
fi
cd /opt/stack/keystone/bin
./keystone --config-file ../etc/keystone.conf -d >
/var/log/keystone/keystone.log 2>&1 &
echo "Waiting for keystone to start..."
if ! timeout 60 sh -c "while ! wget --no-proxy -q -O- http://127.0.0.1:5000;
do sleep 1; done"; then
echo "keystone did not start"
exit 1
fi
cd /opt/stack/nova/bin
./nova-api > /var/log/nova/nova-api.log 2>&1 &
echo "Waiting for nova-api to start..."
if ! timeout 60 sh -c "while ! wget --no-proxy -q -O- http://127.0.0.1:8774;
do sleep 1; done"; then
echo "nova-api did not start"
exit 1
fi
cd /opt/stack/nova/bin
./nova-scheduler > /var/log/nova/nova-scheduler.log 2>&1 &
cd /opt/stack/noVNC
./utils/nova-wsproxy.py --flagfile /opt/stack/nova/bin/nova.conf --web .
6080 > /var/log/nova/nova-wsproxy.log 2>&1 &
cd /opt/stack/nova/bin
./nova-network > /var/log/nova/nova-network.log 2>&1 &
./nova-volume > /var/log/nova/nova-volume.log 2>&1 &
./nova-compute > /var/log/nova/nova-compute.log 2>&1 &
_______
To stop nova services, you can use something like that (include all
services you run):
__________
stopnova.sh:
#!/bin/bash
kill -9 `ps aux | grep -v grep | grep nova-api | awk '{print $2}'`
kill -9 `ps aux | grep -v grep | grep nova-scheduler | awk '{print $2}'`
kill -9 `ps aux | grep -v grep | grep nova-wsproxy.py | awk '{print $2}'`
kill -9 `ps aux | grep -v grep | grep keystone | awk '{print $2}'`
service rabbitmq-server stop
Regards.
On Thu, Jan 26, 2012 at 5:02 PM, Joe Smithian <joe.smithian@xxxxxxxxx>wrote:
> Hi All,
>
> The devstack document doesn't explain how to start/stop services,
> maybe it's obvious for the devstack developers but not for a new user
> like me! I can't use commands like "restart nova-api" because they
> are not installed.
>
> I installed OpenStack using devsatck stack.sh script
> (http://devstack.org/) on Ubuntu 11.10. Installation was successful
> and I was able to login to Dahsboard; but it doesn't work anymore, I
> think after I changed the IP address of the machine and moved it to
> another network.
> Apache2 is running but the nova and keystone services are not running.
>
> Can any one please explain how to start/restart/stop all the services
> after installing devstack?
> This should be added to the devstack documents.
>
> Thanks
>
> Joe
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
--
- MSc. Correa, J.L.
Follow ups
References