Skip to content

Commit

Permalink
vagrant support files, test frab in virtualbox
Browse files Browse the repository at this point in the history
  • Loading branch information
manno committed Mar 24, 2013
1 parent bc2bb37 commit 6943118
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 12 deletions.
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frab - conference management system

frab is a web-based conference planning and management system.
It helps to collect submissions, to manage talks and speakers
frab is a web-based conference planning and management system.
It helps to collect submissions, to manage talks and speakers
and to create a schedule.

## Background
Expand All @@ -26,11 +26,11 @@ than 5 parallel tracks (plus devrooms) over 2 days.

## Installing

frab is a pretty standard Ruby on Rails (version 3.2) application.
frab is a pretty standard Ruby on Rails (version 3.2) application.
There should be plenty of tutorials online on how to install,
deploy and setup these.

Basically, to get started you need git, ruby (>= 1.9.3) and bundler
Basically, to get started you need git, ruby (>= 1.9.3) and bundler
and follow these steps:

1) Clone the repository
Expand Down Expand Up @@ -59,14 +59,14 @@ tools need to be installed to identify and resize images.

Imagemagick should be easy to install using your OS's
preferred package manager (apt-get, yum, brew etc.).

6) Create (and possibly modify) the database configuration:

cp config/database.yml.template config/database.yml

frab bundles all three built-in rails database drivers.
And it should work with all three, although it is best tested
with MySQL and SQLite3 (for development).
frab bundles all three built-in rails database drivers.
And it should work with all three, although it is best tested
with MySQL and SQLite3 (for development).

7) Create and modify settings:

Expand Down Expand Up @@ -95,7 +95,7 @@ did not skip step 8 and run:
probably do not want to use this script, but rather something
like unicorn or passenger.)

Navigate to http://localhost:3000/ and login as
Navigate to http://localhost:3000/ and login as
"[email protected]" with password "test123".

## Migrating from pentabarf
Expand All @@ -115,16 +115,47 @@ out, checkout the code at the revision the script was last
changed at and upgrade the code and migrate the database
from there.

## Ticket Server
## Ticket Server

This fork supports OTRS and RT ticket servers. Instead of sending
This fork supports OTRS and RT ticket servers. Instead of sending
event acceptance/rejection mails directly to submitters, frab adds
a ticket to a request tracker.

The ticket server type can be configured in
The ticket server type can be configured in

config/initializers/ticket_server_type.rb

## Vagrant Server

frab can more easily be tested by using vagrant. First install the
vagrant gem:

gem install vagrant

Afterwards setup your virtualbox machine, install chef inside and
let vagrant run the frab chef recipes.
Simply run the following command directly inside the frab checkout
directory:

vagrant up


Sometimes vagrant runs into timing problems, reload the vm:

vagrant reload

And you can always re-deploy

vagrant provision

You can now ssh into the box and start the rails app

vagrant ssh
cd /srv/frab
rails server

Visit http://localhost:3000/ to log in to frab.

## License

frab is licensed under an MIT-License. It bundles some
Expand Down
50 changes: 50 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu-quantal-base-frab"

# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://cloud-images.ubuntu.com/quantal/current/quantal-server-cloudimg-vagrant-amd64-disk1.box"

# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui

# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks.
# config.vm.network :hostonly, "192.168.33.10"
config.ssh.timeout = 10
config.ssh.max_tries = 20

# Assign this VM to a bridged network, allowing you to connect directly to a
# network using the host's network device. This makes the VM appear as another
# physical device on your network.
# config.vm.network :bridged

# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port 3000, 3000

# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder "frab-code", "/srv/frab", "."

# Enable provisioning with chef solo, specifying a cookbooks path, roles
# path, and data_bags path (all relative to this Vagrantfile), and adding
# some recipes and/or roles.
#
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef/cookbooks"
chef.add_recipe "frab"
end

end
47 changes: 47 additions & 0 deletions chef/cookbooks/frab/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
case node[:platform]
when "debian", "ubuntu"

frab_folder = '/srv/frab'

package "imagemagick"
package "libsqlite3-dev"
package "libmysqlclient-dev"
package "libpq-dev"
package "libxml2-dev"
package "libxslt-dev"
package "nodejs"
package "git"
package "ruby1.9.1-dev"

execute "gem-bundler" do
command "gem install bundler"
action :run
end

execute "bundle-install" do
command "bundle install"
cwd frab_folder
action :run
end

execute "db-config" do
command "cp config/database.yml.template config/database.yml"
cwd frab_folder
creates 'config/database.yml'
action :run
end

execute "frab-config" do
command "cp config/settings.yml.template config/settings.yml"
cwd frab_folder
creates 'config/settings.yml'
action :run
end

execute "db-setup" do
command "rake db:setup"
cwd frab_folder
action :run
end

end

0 comments on commit 6943118

Please sign in to comment.