|
|
| Line 1: |
Line 1: |
| = Vagrant =
| | #REDIRECT [[Balrog]] |
| The Balrog repo includes a Vagrantfile and everything else required to have a functioning Balrog installation on a local VM. To use it, follow these steps:
| |
| * [http://downloads.vagrantup.com/tags/v1.0.4 install vagrant]
| |
| * Open a command line/terminal and browse to your Balrog clone
| |
| * Type "vagrant up" to bring up the development environment
| |
| * Add this to your hosts file
| |
| 127.0.0.1 balrog.mozilla.dev
| |
| 127.0.0.1 balrog-admin.mozilla.dev
| |
| * After "vagrant up" returns successfully, you can access the Balrog applications at the following URLs:
| |
| ** Admin application - http://balrog-admin.mozilla.dev:9000/rules.html
| |
| ** User-facing application - http://balrog.mozilla.dev:9000
| |
| | |
| When making non-trivial changes to Balrog it's always a good idea to have a look at both applications, even just briefly. If you're making frontend changes to the admin application this will be your primary way of testing them.
| |
| | |
| = The Code =
| |
| There's four general areas of the Balrog code:
| |
| * [https://github.com/mozilla/balrog/blob/master/auslib/AUS.py The business logic] - This code is used to match an update request to an update, process rules, throttling, et. al. Most decisions about what update to give a specific request are made in here.
| |
| * [https://github.com/mozilla/balrog/blob/master/auslib/db.py The database layer] - This layer sits between the database and the applications. It defines the database schema, performs permissions checking, and ensures all changes are written to history tables.
| |
| * [https://github.com/mozilla/balrog/tree/master/auslib/admin Admin application] - The frontend and backend code for the admin application. Accessible through http://balrog-admin.mozilla.dev:9000 when vagrant is running.
| |
| * [https://github.com/mozilla/balrog/tree/master/auslib/web User-facing application] - The code that handles requests from applications looking for updates. Accessible through http://balrog.mozilla.dev:9000 when vagrant is running.
| |