[Zope] Applying updates to zope site

Gabriel Genellina gagenellina at softlab.com.ar
Tue Jan 10 20:51:14 EST 2006


At Monday 9/1/2006 12:15, Brian Sullivan wrote:

>I am involved in maintaining a remote Zope site that is behind a
>firewall where I have no remote access.
>
>I have a (parallel) site that I use to test changes and upgrades that
>is accessible to me.  I am a looking for a straightforward way to
>package tested changes, send and have changes applied at the other end
>-- without my physical presence (there is a systems maintenance person
>a the other with reasonable broad systems knowledge but no in depth
>Zope experience). The changes in this case consist of changes to or
>new python scripts, dhtml methods and documents, or images spread
>throughout a hierarchy of folders on the site.

We have a similar scenario. We had to develop an Updater product which 
basically does the following:
- we pack the modified products / objects / whatever, along with a special 
'update.py' script, in a Zip file
- we send the file to the other guy who can do the update, and he uploads 
it using our Updater product
- the zip file is then unpacked in a temp directory (honoring the possible 
subdirs structure)
- the contained 'update.py' script (written each time by us) is executed 
(using execfile), its home directory being the temp dir, so it can access 
files and folders contained in the zip file easily.
- that script is responsible of copying/updating things. Some handy 
functions (like shutil.copytree, copy2, etc) are available for its 
convenience. ZOPE_HOME, ProductXXX.__path__[0] and other variables are used 
to determine the destination directory for filesystem objects. For ZODB 
objects we use some helper functions which combine 
manage_addXXX/manage_editXXX as needed, to create new objects or update 
existing ones.
- at the end, the temp dir is erased, some log records are updated, and 
usually the Zope service is restarted.


Gabriel Genellina
Softlab SRL 



More information about the Zope mailing list