Add rb-site, a site installer/maintenance script

Review Request #626 — Created Nov. 11, 2008 and submitted

Information

Review Board SVN (deprecated)
trunk

Reviewers

This introduces rb-site, a new script for installing, upgrading and maintaining Review Board site installations.

The usage is simple: To create a new Review Board site, run: rb-site install /path/to/site

This will ask several questions about the site and then create the directory structure, sample server config files, settings_local.py, the database, an admin account, and set some default settings. The media directories from the ReviewBoard and Djblets egg packages will be symlinked, and an "uploaded" directory will be created with the proper permissions.

After upgrading the Review Board software, users can run: rb-site upgrade /path/to/site. This will perform any database syncs and migrations necessary, and make any necessary modifications to the directory structure (namely, re-symlinking media directories to point to the new paths).

This includes a GTK UI for site installation that is used when we detect that GTK can be used. If GTK is not available or we have any problems initializing it, we fall back on a console UI. This is all abstracted nicely so we have one code path for asking all the questions and providing the feedback.

This also includes a "manage" command, which works like manage.py. The syntax is: rb-site manage /path/to/site command-name -- command-args. For example:

rb-site manage /var/www/reviews.example.com index -- --full

The general Review Board setup will, after some tweaks to the eggs, simply be:

$ sudo easy_install ReviewBoard
$ sudo rb-site install /var/www/reviews.example.com

In the future this could provide additional functionality to handle database backups/restores, and to provide a single entry point for crontabs, which would then call the appropriate scheduled items (possibly configurable through the admin UI).
Created directory installs with various combinations of the options. Performed upgrades as well. No problems. Tested this with both GTK and console UIs.
david
  1. 
      
  2. /trunk/reviewboard/contrib/Makefile.am (Diff revision 1)
     
     
     
    Do we still need the automake-based build system?
    1. Probably not. I just figured I'd add it until we officially killed it. I want to do some more testing with the eggs to make sure we have everything working perfectly, and then I'll write up some docs and kill automake.
      
      Thanks for the review! I know it's a big one.
  3. 
      
Loading...