Ed & Cam | Scripts to start and end moto and setup environment for running moto tests

This commit is contained in:
cameron-r 2014-10-21 11:05:57 -05:00 committed by Ed Thome
parent 159964e2f1
commit dc298201e8
5 changed files with 17 additions and 50 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.pyc
.vagrant
.idea
*.swp
tests/logs/

View File

@ -1,21 +0,0 @@
cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone-all --config-file /etc/keystone/keystone.conf --debug &
cd /opt/stack/horizon && sudo tail -f /var/log/apache2/horizon_error.log &
cd /opt/stack/glance; /usr/local/bin/glance-registry --config-file=/etc/glance/glance-registry.conf &
cd /opt/stack/glance; /usr/local/bin/glance-api --config-file=/etc/glance/glance-api.conf &
cd /opt/stack/nova && /usr/local/bin/nova-api &
cd /opt/stack/nova && sg libvirtd '/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf' &
cd /opt/stack/nova && /usr/local/bin/nova-conductor --config-file /etc/nova/nova.conf &
cd /opt/stack/nova && /usr/local/bin/nova-cert --config-file /etc/nova/nova.conf &
cd /opt/stack/nova && /usr/local/bin/nova-network --config-file /etc/nova/nova.conf &
cd /opt/stack/nova && /usr/local/bin/nova-scheduler --config-file /etc/nova/nova.conf &
cd /opt/stack/nova && /usr/local/bin/nova-novncproxy --config-file /etc/nova/nova.conf --web /opt/stack/noVNC
cd /opt/stack/nova && /usr/local/bin/nova-xvpvncproxy --config-file /etc/nova/nova.conf
cd /opt/stack/nova && /usr/local/bin/nova-consoleauth --config-file /etc/nova/nova.conf
cd /opt/stack/nova && /usr/local/bin/nova-objectstore --config-file /etc/nova/nova.conf &
cd /opt/stack/cinder && /opt/stack/cinder/bin/cinder-api --config-file /etc/cinder/cinder.conf &
cd /opt/stack/cinder && /opt/stack/cinder/bin/cinder-scheduler --config-file /etc/cinder/cinder.conf &
cd /opt/stack/cinder && /opt/stack/cinder/bin/cinder-volume --config-file /etc/cinder/cinder.conf &
cd /opt/stack/heat; bin/heat-engine --config-file=/etc/heat/heat.conf
cd /opt/stack/heat; bin/heat-api --config-file=/etc/heat/heat.conf
cd /opt/stack/heat; bin/heat-api-cfn --config-file=/etc/heat/heat.conf
cd /opt/stack/heat; bin/heat-api-cloudwatch --config-file=/etc/heat/heat.conf

View File

@ -1,29 +0,0 @@
#! /usr/bin/env bash
#source ~/devstack/openrc admin
sh ~/devstack/openrc admin
export TEST=True
ps aux | grep 'screen\|nova\|cinder\|horizon' | grep -v grep | awk '{print $2}' | xargs kill -9
ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9
echo "START MOTO"
moto_server ec2 -p1234 &
echo "START OPENSTACK"
bash ../start_openstack.sh
#sh ../start_openstack.sh > testlog.txt 2>&1 &
#/usr/bin/env bash ~/devstack/rejoin-stack.sh &
sleep 10
echo "START TESTS"
nosetests -s test_ec2driver.py > test_output.txt 2>&1
#nosetests -s test_ec2driver.py
echo "KILL EVERYTHING"
ps aux | grep 'screen\|nova\|cinder\|horizon' | grep -v grep | awk '{print $2}' | xargs kill -9
#ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9
unset TEST
echo 'DONE'

8
tests/setup_moto.sh Executable file
View File

@ -0,0 +1,8 @@
#! /usr/bin/env bash
echo "Setting environment variable TEST=True"
export TEST=True
echo "Restarting moto"
ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9
moto_server ec2 -p1234 > logs/moto_log.txt 2>&1 &

7
tests/shutdown_moto.sh Executable file
View File

@ -0,0 +1,7 @@
#! /usr/bin/env bash
echo "Unsetting environment variable TEST"
unset TEST
echo "Killing moto"
ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9