Vulnerability Test Field web-software for my Bachelor's Thesis
- Ruby 1.9.3
- Bundler
- PostgreSql
Just install VirtualBox and Vagrant and run:
vagrant up
Vagrant mounts current folder as a /vagrant
folder in quest machine, so ssh to
virtual machine with vagrant ssh
and move to that directory: cd /vagrant
Here are instructions how to set up VTF manually:
Copy config/database.yml.config
to ~/.vtf/database.yml
and edit to have correct data
Add databases (for example setup):
createdb vtf
createdb vtf-test
Install all the dependencies:
bundle install
Initialize databases using rake:
bundle exec rake db:setup
Also let's initialize test environment database:
RAILS_ENV=test bundle exec db:setup
First, create exercise locally using your favourite development tools.
When the exercise is ready to deployed, do the following:
- Create new folder to exercises:
mkdir exercises/<my exercise>
. Exercise name must match the username rules. - Add folder structure
public_html/app
to the exercise folder:mkdir -p exercises/<my exercise>/public_html/app
- Move exercise files to the
app
folder. - Convert your setup script to bash script by renaming it to
.sh
and adding correct shebang - Copy
.htaccess
anddispatch.fcgi
from sample exercise to the exercise and edit to suit the exercise. - Modify your exercise to fit the "production" system: Move static files to static/ folder and serve them from there etc.
- Modify
exercises:db_data
task to contain the exercise
TODO: Explain all the different "magic files"
bundle exec rails server
bundle exec rspec spec
TODO: Figure out