Handy zope instance manager (updated)ΒΆ

I just release a first version of my instance manager that I started with two days ago (update 15 May: new .tgz, it lacked the skeleton directory). I'm used to having scripts that extract all the needed products for a zope instance, that restart zope and that call a script that quickinstalls the products. Both for development and on the customer server .

The developer-side scripts (bash) improved with every product, but it was hard to merge the improvements back into previous projects. And it was a lot of work to set up all the files for a new project. And it didn't fit everyone's location preferences.

So I made a seperate python program that does all this in a much more configurable way. The old scripts only allowed .tgz files as sources, the new "instancemanager" also allows symlinked sources (like for instance a plone 2.5 svn bundle checkout). Some of the things it does:

  • Creation of a zope instance. Including setting debug mode on, verbose security on, security=python, port number, username, password. In a location that you specify (default is in ~/instances/projectname).
  • Making the products available in Products/. They can come from .tgz (also bundles) and from symlinked locations (also bundles). This assumes that you have your svn checkouts somewhere on your filesystem (~/svn/* by default) and not inside the Products directory. Might be something for a later version.
  • Copying, if available, of a prepared Data.fs for your project. You can keep the latest customer database stored away somewhere on your filesystem and it'll get copied to your instance whenever you do a fresh install.
  • Starting/stopping/restarting zope.
  • Possibly calling a script (in the zope root) that does some quickinstall calls to your plone folder and reinstalls your products. You need to prepare this script yourself, though.
  • There are two combined actions: "fresh" and "soft". "Soft" just restarts zope and calls the reinstall script, "fresh" also cleans out and rebuilds your product directory, copies a fresh database, starts zope and calls the reinstall script. Real handy to get a quick clean zope instance to test with.

I'm using it myself already for my projects. What makes it handy is that I only need to edit one config file to get a new instance with just the right software. Handy for testing ploneformmailer in multiple zope/plone combinations, for instance!

Feedback welcome, especially also on setting it up. It has a distutils setup.py, so that's handy. The README.txt is reasonably OK. Running it once gives you a config directory .instancemanager in your homedir with a userdefaults.py full of customisable locations - and with good documentation about every one of them.

(Old imported comments)
"dzhandle" by Reinout van Rees on 2006-05-11 23:20:54
I didn't know it existed. I assume it's pretty recent as I was developing on debian till about a year ago.

From what I see when googling, it allows you to create instances, probably "global" instances, to be run on the server. If that's the case, there are two differences.

The first one is that instancemanager aims more at the developer that wants some intances somewhere in his home dir on his development machine. dzhandle seems to aim more at server deployment.

The second one is that instancemanager performs *more* tasks. It takes care of putting the right products in your Products/ directory. Copying a sample Data.fs. Etc. Creating the instance (what dzhandle does) is just the first step.

So: I think it aims at different things. My tool is pretty OS-agnostic, having to work on both Ubuntu and OSX (and it probably runs on windows too), so that's also a different outlook. Now that I know it exists I'm going to take a look, it is probably really handy for instance management on our Debian servers (and it might take care of /etc/init/ start/stop scripts and so).
"dzhandle" by madduck on 2006-05-11 21:21:05

Have you looked at Debian/Ubuntu's dzhandle? Wouldn't that be something to try? If not, how does your tool compare?

 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):