I had to do a bit of "continuous integration" magic in the last few days: installing a fresh zope instance, installing plone, installing two other products and starting the server, all from a shell script.
One part was simple: creating a new zope instance, installing plone and then zipping up the zope instance directory including all plone products and so. To ease further changes, I copied the config file and the Data.fs
also. Copying? Yes, into the subversion project where I also stored the zope instance zip.
Then I added a reload.sh
that removed the previous instance, unzipped the pre-packaged one, copied in the Data.fs
and the config file, changedirred into the Products dir and checked out fresh copies of the two relevant projects out of subversion. Then it starts up the zope instance.
So far so good, the only thing left to do is to call the quickinstaller to install the two projects. Ouch, that took me almost a day of frustration.
wget
. Of course with the needed --http-user
and --http-passwd
options. No luck, plone returns a form where you can fill in your username/password.Calling things inside the zope root instead of the plone root works fine with that http authentication, by the way.
wget
and then calling the quickinstaller also didn't work. Wget doesn't store state in between. Telling it to set cookies also didn't solve the problem.urllib.urlopen()
stuff. I gave up after an hour or so. Either no state was saved or something else went wrong (I forgot what it was).__ac_username
and __ac_password
options in the URL when calling a page. I did that with wget
. It did work! Only problem was that it got a redirection to the same page afterwards. Taking a lot of time. And again. And somehow installing the same product over and over again (which shouldn't happen). Since the second product imports some 2000 existing html pages, this was hosing the server.--http-user
authentication, this worked like a charm. (I just had to load the fresh zope instance, add the python script inside zope and copy that Data.fs
off to my reload shell script's directory).
In the end, it works. And it's nice to be able to hit reload.sh
and get a completely fresh instance with all relevant products. It was a good learning experience for further continuous integration work, but it still took way too much time.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
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):