-
Notifications
You must be signed in to change notification settings - Fork 1
Setup WardenWeb Front end
vicwin edited this page Jul 2, 2012
·
4 revisions
WardenWen Front-End is Rails 3 web application that allowed us to easily scheduling and checking a test case job. it also enable us to run multiple test cases simultaneous(thanks for Resque).
- Download the entire project, and
bundle install
in both $WARDEN_HOME and $WARDEN_HOME/warden_web (referring to $WARDEN_WEB_HOME going forward) - Configure the database.yml under $WARDEN_WEB_HOME/config. just like another Rails project.
- Create the database and migration using the following commands:
cd $WARDEN_WEB_HOME
rake db:create db:migrate
- Run
rails server
under the $WARDEN_WEB_HOME dir and you should see the following output
wb-preset:warden_web victor$ rails s
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-07-01 20:44:41] INFO WEBrick 1.3.1
[2012-07-01 20:44:41] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin10.8.0]
[2012-07-01 20:44:41] INFO WEBrick::HTTPServer#start: pid=917 port=3000
- Go to http://localhost:3000/ on your browser, you should be able to see the Warden Web hone page without any error
#Run the server with Unicorn
- Make sure you have environment variable $WARDEN_WEB_HOME and $WARDEN_HOME point to the right locations.
- Run
ruby ./warden_web.sh unicorn start
under $WARDEN_HOME/bin, you should see the follwing
wb-preset:bin victor$ ./warden_web.sh unicorn start
Starting...
Unicorn app server started.
- The unicorn configuration file is located at $WARDEN_WEB_HOME/config/unicorn_config.rb . feel free to change things there to meet your need
- You can run
./warden_web.sh unicorn status
to check the Unicorn processes - To stop the Unicorn run
./warden_web.sh unicorn stop
#Start Resque worker Resque worker let you to run the test case in parallel and speed up you test suite run. it will start multiple instances of the browser in your machine. Be careful the browser session can be very resource consuming. We will have a different wiki on setting up workers in a different server.
- Make sure the local Redis Server is up and running on default ports
- Look at Redish Quick Start. it is simple to setup.
- To start Redis simply run:
victor$ redis-server
[1235] 01 Jul 21:01:16 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[1235] 01 Jul 21:01:16 * Server started, Redis version 2.4.8
[1235] 01 Jul 21:01:16 * DB loaded from disk: 0 seconds
[1235] 01 Jul 21:01:16 * The server is now ready to accept connections on port 6379
- To start a few worker is easier run:
./warden_web.sh worker start 2 #this will start 2 worker
ResqueWorkerDaemon started.
ResqueWorkerDaemon started.
- To check the status
wb-preset:bin victor$ ./warden_web.sh worker status
ResqueWorkerDaemon is running (PID 1242)
ResqueWorkerDaemon is running (PID 1243)
- To stop all the workers
wb-preset:bin victor$ ./warden_web.sh worker stop
wb-preset:bin victor$ ./warden_web.sh worker status
No PIDs found