We currently manage KARL-the-software in Subversion, using tags made during (mostly weekly) release cycles to label the version released. At time of writing, for instance, the latest release of the karl package is 3.30, made during the release cycle on 2010-05-06.
The release cycle includes the following steps:
Next, for each deployed customer:
Then, for each deployed customer’s KARL3 site, update the staging instance:
Finally, for each customer’s KARL3 site, update the production instance:
Note
If the evolve step is known or expected to be impossible to run while users update the site, e.g. due to ConflictErrors, put the production site into “maintenance mode” during this step.
A number of problems and risks are built into the current process:
Move from the current “accretive” index to creating “versioned” indexes as part of making a release of karl, releasing the karl package itself as an egg into the corresponding index. These indexes will ensure that the software environment remains repeatable, even if new packages are added to the “development” version. As an exemplar, see:
Use compoze to manage these versioned indexes against the common “pool” directory, which can remain “accretive”.
Begin doing normal release management of each customer’s “customization” package, noting the versions of karl and any other packages which are not its dependencies.
This change may require maintaining a set of versioned indexes for each customer.
Rather than updating on-disk software in place, or re-running a buildout, treat each deployment as a new installation into a versioned subdirectory. Use symlinks to make the switchover from version N-1 to version N as atomic as possible.
Note
The requirement to build libxml2 and libxslt (and event lxml) within the buildout adds significantly to the overhead of doing the build. Consider using either the system libraries or shared copies of these dependencies in production.
Changes to the underlying ZODB software used to run ZEO happen at a much slower pace than changes to the application (on the order of once a year rather than once or twice a month). Centralizing the database server processes for all application instances on a single box should make doing maintenance and backups simpler, and removes the database from the set of things which might be inadvertently “touched” during an upgrade.
Splitting the storage server out from the deployed application should also ease experimenting with a solution like relstorage.
Evolve scripts should never run against “live” data, nor even against the only copy of the “live” data. Instead, we should be following a procedure something like:
This process should be as automated as possible.
Ideally, the developer doing the updates and tests of a customer’s customization package or configuration should be able to tag changes, push the source distribution to the index, and then run a script which automates laying down the updated software configuration on the staging server.
Rather and relying on the default, event-based catalog operations triggered by subscribers to “modified” events for the content, each evolve script should arrange to re-index content in only the indexes relevant to the changes it makes.