This is the BAMRU website at www.bamru.org.
The old application was written in the 2004 era. It was written in PHP, using a MySQL database.
The goal of the rewrite is to make the app simpler to maintain and extend. Hopefully we'll be more efficient using newer tools:
lightweight app framework [Sinatra]
source code control [Git]
automated regressions testing [Rspec]
script tool [Rake]
deploy tool [Capistrano]
library manager [Bundler]
Installing & Running the App
You can clone the app and run it on your system. This is going to work best on Linux (ubuntu). Mac hasn't been tested. Windows will be painful, at best. (must have cygwin, at a minimum)
To install the app, first install ruby, git, rubygems. Then:
> gem install bundler > git clone https://github.com/andyl/BAMRU-Public > cd BAMRU-Public > bundle install > rake run_server
Running the App:
start your browser
Editing/Updating the App
Please include tests with any update you make.
To see a list of test/edit commands, run
Deploying the App
All of the deployment scripts are in the Capfile.
Note that we use a 'multistage' strategy with Capistrano. Defined stages are:
Environment definitions for the various stages are saved in the 'config/deploy' directory.
To see a list of deployment commands, run
Provisioning a Staging Server
We use Vagrant to provision a basic staging server.
This will provision the staging server from scratch, with all the tools needed to run a production system. Support software includes:
Once the staging server is provisioned, deploy the code using:
> cap vagrant deploy:setup > cap vagrant deploy
You can bring up a management console for a production system using the command:
> cap production console
This will bring up a Tmux session with pages that stream server logs, system monitors, etc.
This app interacts with 3rd party services (Gmail, Gcal). Account Credentials for these services not stored in the source code repository. See Andy to get this info.
The set of scheduled (cron) tasks associated with this app is defined in `config/schedule.rb`. Scheduled tasks are defined for log-file rotation and database backups.