Cleverbox Project Administration

Over the past year, an upsurge in work has led me to rethink the management of my development server. Trac, Subversion, and WebDAV hung in the background as support services for the project staging areas. With complexity increasing exponentially with each new project, I'd become increasingly desperate to find an elegant solution.

Of course I wasn't alone in my requirements and after a lucky conversation with Tristan Rivoallan I was pointed in the direction of his Cleverbox project.

Cleverbox is a Python CLI tool for managing all the project peripherals which can tend to get a little complex if not handled in some sort of automated manner.

Installation was relatively simple through apt-get -- I won't parrot the detals -- with the only customisation being a change to the shebang of /usr/bin/cleverbox-admin which needed to point to Python 2.4 rather than my default:

#!/usr/bin/python2.4
 

From the Tracesque CLI interface, client and project administration is a simple matter of: create, activate, deactivate, etc.

Profiles can be created for customised configuration. Here is mine which activates Digest authentication:

#
# Client  : %(client_name)s
# Project : %(project_name)s
#
# This configuration file is a variation on the original from the Cleverbox default profile. It
# enables three services for each project :
#  - Subversion : a subversion repository
#  - Trac :  a Trac (http://trac.edgewall.org) instance, linked to the subversion repository
#  - Documents : a webdav share
#
# All the services require authentication and all from a common single userfile:
#
#   %(clients_root)s/%(client_name)s/var/%(project_name)s-htusers
#
# This file can be generated and updated using apache's `htdigest` executable.
#
 
# Authentication is common to all services 
<Location "/%(client_name)s/%(project_name)s">
 
  # Digest authentication is still experimental in apache-2.2 - lets be daring :)
  AuthType Digest
 
  # -- mod_rewrite for uri mapping
  RewriteEngine On
 
  # -- File based authentification
  AuthUserFile %(clients_root)s/%(client_name)s/var/%(project_name)s-htusers
 
</Location>
 
# -- Subversion service
<Location /%(client_name)s/%(project_name)s/svn>
 
  DAV svn
 
  SVNPath %(clients_root)s/%(client_name)s/var/svn/%(project_name)s
 
  # This service requires authentication
  AuthName "%(client_name)s > %(project_name)s > SVN"
  Require valid-user
 
  # For authorization, please uncomment the following and create the required file:
  # AuthzSVNAccessFile %(clients_root)s/%(client_name)s/var/%(project_name)s-svn-auth.ini
  #
  # This file would typically contain something like:
  # [groups]
  # admin = user1,user2
  # general = user3,user4
  #     
  # [%(project_name)s:/]
  # @admin = rw
  # @general =
  # * =
</Location>
 
# -- Trac service
<Location /%(client_name)s/%(project_name)s/trac>
 
  SetHandler mod_python
  PythonPath "['%(trac_install_dir)s'] + sys.path"
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnv %(clients_root)s/%(client_name)s/var/trac/%(project_name)s
  PythonOption TracUriRoot /%(client_name)s/%(project_name)s/trac
  SetEnv PYTHON_EGG_CACHE %(clients_root)s/%(client_name)s/tmp
 
  # This service requires authentication
  AuthName "%(client_name)s > %(project_name)s > Trac"
  Require valid-user
 
</Location>
 
 
# -- Documents service
AliasMatch /%(client_name)s/%(project_name)s/documents(.*) %(clients_root)s/%(client_name)s/htdocs/%(project_name)s$1
<Location /%(client_name)s/%(project_name)s/documents>
 
  Dav On
 
  # This service requires authentication
  AuthName "%(client_name)s > %(project_name)s > Documents"
  Require valid-user
 
</Location>
 

This tool has already saved me so much time - a huge thanks to the developers.

Comments:

Leave a comment