Parent: [001c0b] (diff)

Child: [0086bc] (diff)

Download this file

start-sandbox.bash    43 lines (32 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
./setup-sandbox.bash
# Start RabbitMQ
# sudo rabbitmq-server & # already started for us
rabbitmqctl add_user testuser testpw
rabbitmqctl add_vhost testvhost
rabbitmqctl add_vhost vhost_testing
rabbitmqctl set_permissions -p testvhost testuser "" ".*" ".*"
rabbitmqctl set_permissions -p vhost_testing testuser "" ".*" ".*"
# Start SOLR, as per SOG-sandbox location
SOLRCONFIG="$(pwd)/solr_config"
pushd /usr/local/solr
/usr/java/jdk1.5.0_15/bin/java -Dsolr.solr.home="$SOLRCONFIG" -jar start.jar &
popd
# Start mongo, already on the path
# mongod & # already started for us
# Start a second instance of mongo for tests
mkdir -p /data/db-test
mongod --port 27018 --dbpath /data/db-test &
# Start the forge
. sandbox-env/bin/activate
cd pyforge
paster reactor_setup sandbox.ini
paster reactor sandbox.ini &
paster smtp_server sandbox.ini &
paster reactor_setup sandbox-test.ini#main_with_amqp
paster setup-app sandbox.ini
paster serve --reload --daemon sandbox.ini
sleep 5
echo "########################################"
echo "The forge is running."
echo "########################################"