Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/customer/www/ on line 37

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/customer/www/ on line 566
Managing Development in GroupServer and E-Democracy -

E-Democracy Pages Wiki

Search Wiki




Managing Development in GroupServer and E-Democracy


Revision as of 18:44, 20 August 2013 by Wbushey (Talk | contribs) (Copy Files into the New Egg)

GroupServer is a mature open source project which uses a full set of tools for managing development.


GroupServer uses Buildout for building (both production and development), retrieving code, and managing development. If you have never used Buildout before, this 15 minute video provides an introduction. Documentation is at

To use Buildout you will need setuptools. On Ubuntu, install setuptools via

sudo apt-get install python-setuptools


GroupServer and E-Democracy use a number of Buildout config files to manage building an instance and developing code.


The main config file for Buildout. This is what Buildout looks to for directions. In GroupServer, buildout.cfg indicates what core eggs should be installed from GroupServer and from third parties. It also indicates which configuration sections should run, and defines a few.


Refers to additional eggs developed for projects downstream from GroupServer. This which custom eggs should be installed, as well as which versions of those eggs. In general, anything written specifcally for E-Democracy will be referred to in this file.


Contains a list that tells Buildout how to retrieve the source for an egg. Every egg from GroupServer and E-Democracy should have an entry in here indicating the address to that egg's repository, and version control tool used on that repository.

In addition, this file tells Buildout to use the Mr. Developer extension.


This controls which version of a core egg Buildout will retrieve and build. Most core eggs will have an entry in this file that pins the egg to some version. Some 3rd party eggs will also have their versions pinned by this file.

Managing the Buildout Files

The above files need to be updated whenever a new egg is created or a new version of an egg is deployed. Because the above files are critical to building and developing GroupServer and E-Democracy, and they are updated pretty often, a repository has been created on Github to keep E-Democracy's developers' Buildout files up to date.

Assuming you've followed the instructions for Installing GroupServer and E-Democracy, you should already have a git repository setup for the Buildout files on your instance.

To update the Buildout files, simply run git pull in the root folder of your E-Democracy instance.

If you make a change to any of the Buildout files, simply do a git add ., git commit, and git push to publish those changes.


Building GroupServer/E-Democracy is one of the two things you will most often do with Buildout (checking out code for active development is the other, and is covered below.)

To build E-Democracy and Groupserver, simply run the following from the root folder of your instance of E-Democracy:


Code Repositories

E-Democracy and GroupServer use a few repository locations and tools for storing code. The differences in location and tools roughly correspond to the division between E-Democracy specific code and GroupServer code.

GroupServer Repository - Mercurial

All code for GroupServer core is stored at and uses Mercurial for version control. Each egg in GroupServer will have a corresponding repository.

Eggs that are part of GroupServer core almost always start with either 'gs' or 'Products'.

E-Democracy Repositories

Github - Git

Most new code written by E-Democracy is stored at and uses Git for version control. Like GroupServer, each E-Democracy egg will have a corresponding repository.

In general, any new eggs created by E-Democracy will have its repository stored on Github. These eggs will almost always start with 'edem'. - Mercurial

Some E-Democracy code is stored at and uses Mercurial for version control. Eggs with repositories here usually were created by OnlineGroups.Net (OGN) when E-Democracy would contract with OGN to write custom code.

Of the eggs which have repositories on, the most important is (which is an E-Democracy egg despite starting with 'gs').

Registering for Repository Access

In order to commit code to either GroupServer's or E-Democracy's repositories on, you will need to register an account on the site. Once you have registered, email techteam [at] to confirm your registration (you will not be able to commit until confirming registration).

For E-Democracy's repositories on Github, you can either request permission to commit to the repository(ies) by emailing techteam [at], or you can fork the repository of interest and send us a pull request.

Setting up SSL for Mercurial Repositories

Because's SSL certificate is not signed by a certificate authority, Mercurial will default to displaying an error when trying to send or receive code from the repositories on This can be prevented by adding the following to ~/.hgrc:

[hostfingerprints] = CE:CC:DF:DF:E6:32:89:E3:8A:CD:0B:A1:8F:15:FC:B7:0A:AC:23:D3

Issue Tracking

Because GroupServer and run on code that spans 100+ modules/repositories, both projects maintain project level Redmine instances for issue tracking/ticketing. The vast majority of tickets should be submitted to one of the Redmine instances below.

For non-GroupServer projects (e.x. edemsignups) it is much more likely that we will use an issue tracker associated directly with the project's repository.


There are two instances of Redmine to be aware of:

Because's SSL certificate is not signed by a certificate authority, you will probably see a warning from your browser about the site's certificate. This is entirely normal, and you should disregard this warning.

You will need to register an account on Once you have registered, you will also need to email techteam [at] so we can confirm your registration.

Estimating Project Time Requirements

GroupServer's Redmine includes a couple of useful advice pages. provides a great guide on how to estimate the amount of time a certain programming task will take (assuming design and specs are already established.)

Deployed Eggs Server

The source repositories for eggs are outlined above. These, however, are not where Buildout fetches eggs from during a build.

Buildout instead fetches eggs from, a server that hosts deployed versions of eggs. Deployed GroupServer eggs can be found in, while E-Democracy eggs can be found in

Editing Eggs

The code for eggs involved in a build can not be directly edited. Instead, there is a process for managing the editing of eggs.

Checking out Existing Eggs

In order to edit the eggs used in E-Democracy and GroupServer, you need to explicitly check out the egg for editing. This is done by running the following command from the root folder of your E-Democracy instance:

./bin/develop co <EGG NAME>

Doing this will cause Mr. Develop to fetch and place a folder in the src/ directory of your instance of E-Democracy that contains a version controlled repository for the egg's code. This will also tell Buildout to use the code in src/ for that egg during a build instead of the version of the egg specified in versions.cfg or custom.cfg. This, however, does not actually cause a rebuild to occur, so you will need to a ./bin/buildout -N.

Once checked out, changes to the egg's files in src/ will be reflected in your instance of E-Democracy Generally, changes to templates will be reflected immediately, while changes to source files will require a restart of Zope.

Pushing and Pulling Code Changes

Since the folders fetched by Mr. Develop are version controlled (with master repository's URL defined in develop.cfg), you simply use Mercurial or Git (depending on the egg) to manage changes to the code. If you know how to pull, add, commit, and push with these, then you're set.

Deploying a new Version of an Egg

Once you have written code that is ready to be used by others, you are ready to deploy a new version of the egg you have been working on. Doing this will package up and upload a new version of the egg to the Deployed Eggs Server described above.

In order to deploy eggs to the Deployed Eggs Server, you need to have a copy of in the root folder of your E-Democracy instance. If you do not have this file, contact techteam [at] to get a copy.

To actually deploy a new version of an E-Democracy egg, run the following command in the root folder of your E-Democracy instance:

./bin/fab deployegg:THE.COMPONENT.NAME,custom

If the egg you are deploying a new version for is a GroupServer core egg, then run this instead:

./bin/fab deployegg:THE.COMPONENT.NAME

When the deployment finishes, it will provide a version string for the newly deployed version in the format <EGG NAME> = <VERSION>. For existing eggs, overwrite the egg's entry in versions.cfg or custom.cfg with this version string. For new eggs, add this string to versions.cfg (if a new GroupServer core egg) or custom.cfg (if a new E-Democracy egg), and add the egg's name to the list of eggs to include during a build in either buildout.cfg (for GroupServer core) or custom (for E-Democracy). Then push out these changes to the Buildout config files.

Un-check out Egg

Once you have pushed changes, deployed a new version of an egg, and updated Buildout's config files, it is time to tell buildout to stop using the code in src/ for the egg in question. To deactivate checked out code, run the following command from the root folder of your E-Democracy instance:

./bin/develop d <EGG Name>

The egg's source will still be in src/, but it will no longer be referenced during a build. If you prefer a clean src/ directory, feel free to delete an egg's folder from src/ after you have deactivated it.

Now, rebuild: ./bin/buildout -N

Update Production's Buildout Config Files

The buildout-config repository doesn't affect the production server that runs To update these files with new egg version strings, email codedeploy [at] Be sure to include the egg version string produced by the egg deployment, and a short description of what was changed in the deployed egg.

Create a New Egg

Creating a new egg involves creating a new repository on or Github, adding its info to the Buildout config files, copying files into the new egg, and setting the basic configuration of the egg.

GroupServer also provides a page describing how to create a new egg. The process described by GroupServer is a bit different than the one described below, but also includes a lot more detail.

Create a new Repository

If you're creating a new E-Democracy egg, create a new repository on Github. If you're creating a new GroupServer egg, create a new repository on In both cases, copy the URI for the new repository, you'll need that for the next step.

Update the Buildout Config Files

Open develop.cfg and a line for the new egg under [sources]. This new line should include the name of the new egg, the tool used for version control (hg or git), and the URI from above. Save and close.

If the new egg is an E-Democracy egg, add the egg's name to custom-zope-eggs section of custom.cfg. If the new egg is a GroupServer egg, and the egg's name to the zope-eggs section of buildout.cfg. Save and close.

Now git add ., git commit, and git push.

Copy Files into the New Egg

Once the Buildout config files have been updated, check out the egg. Note that you may receive an error along the lines of "ERROR: abort: unknown revision 'default'!". This is OK, as you will soon create the default branch.

In the src/ folder you should find two empty_egg folders. These are templates for new eggs - one for eggs stored in git and one for eggs stored in mercurial. Copy the contents of the appropriate folder and paste them into the newly checked out repository folder.

Set Basic Configuration

In the folder for your new egg, edit In the call to setup, a number of arguments need to be changed, including:

  • name - This should be the same as your egg's name
  • description
  • classifiers - Pay attention to Development Status
  • keywords
  • author
  • author_email
  • namespace_packages - This need to reflect the hierarchy. For example, in the case of, namespace_packages should be set to "['edem', '', '']". The final directory is supposed to be missing; it is a normal package, not a namespace package.
  • install_requires - Set this to just 'setuptools' for now. As time goes on, add other eggs that the new egg depends on.

Save and close.

Next, create the file structure represented by your egg's name. For example, the egg should have the folder structure edem/group/messages/topics. In each namespace folder (in this case, edem, group, and messages), make a copy of a special that is included in the egg template.

Next you need a in the actual package (module) directory. Just enter the following into the module directory

# coding=utf-8
# This space deliberately left blank

Finally, create a basic configure.zcml in your module directory. Enter the following into configure.zcml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <configure xmlns=""



Basic configuration is done. Commit your changes, cd back up to the root folder of your E-Democracy instance, and do a ./bin/buildout -N. Your instance of E-Democracy should not be running the egg you have just created (which does nothing.)

Testing Instance

E-Democracy maintains a publicly accessible testing instance of This instance is located at The testing instance runs on a database that contains data from backups of production, making it useful for testing code on (mostly) live data. This database needs to be manually updated, so if you would like to have the database updated, please email techteam [at]

The testing instance also provides shell access for updating Buildout config files, running builds, and even editing code (though egg deploys are currently not possible from the testing instance.) To gain command line access to the testing instance, please email techteam [at]

The testing instance also has its own ZMI, accessible at However, you will again need to email techteam [at] to gain access.


Home - Mobile - Forums - Wiki - Blog - About - Help - Contact - People - Donate - Rules - Archives