An updated version of the Issue Dealer, building Zope 2.13.22
It's been a while since I did anything on Zope 2, and these last couple of months some bugs on the weblog publisher on blogologue.com have been bugging me.So I decided I should get that fixed, and also get the IssueDealer updated to work with the latest stable version of Zope 2.
It has been some days of fixing things back and forth to get things working, but now I have an updated version of the IssueDealer, as well as a procedure for building the latest and greatest Zope 2.
I've been quite out of touch with what has been going on in the Zope, Plone and Python world lately, and it took me quite some effort to get things working, from getting Zope from GitHub, getting the right dependencies in etc. One thing I've noticed is that pypi.python.org is using a common name of www.python.org - which forced me to make a shell script to aid in the process of setting up Zope. This is sloppy at best, as it forces users to skip SSL verification.
But, enough of that, here's the hands on procedure for getting Zope 2 installed on a Debian Linux box. Beforehand, I think it's necessary to install the build-essential package as well as git, in other words:
sudo apt-get install build-essential git
I'm not sure what the procedure is for Fedora/Red Hat, SuSe etc. is but it should be easy enough to figure out.
OK. We'll install Python and Zope in a directory called
/home/morphex/zope_blogologue.com
First thing we do is get Python 2.7.9 installed, which is done with
mkdir zope_blogologue.com
chmod o-rwx zope_blogologue.com # So other users can't read the database etc.
cd zope_blogologue.com
mkdir tmp
cd tmp
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar xfz Python-2.7.9.tgz
cd Python-2.7.9/
./configure --prefix=/home/morphex/zope_blogologue.com
make install
cd /home/morphex/zope_blogologue.com/
git clone https://github.com/zopefoundation/Zope zope
cd zope
git checkout 2.13.22
wget --no-check-certificate https://raw.githubusercontent.com/morphex/IssueDealer/master...
chmod +x bootstrap.sh
./bootstrap.sh ~/zope_blogologue.com/bin/
Now, edit the buildout.cfg file, so that the [zopepy] and [wsgi] sections contains the line
Products.IssueDealer==0.9.140
like so, maybe using the command "nano buildout.cfg":
[...]
[zopepy]
recipe = zc.recipe.egg
eggs = Zope2
Products.IssueDealer==0.9.140
interpreter = zopepy
scripts = zopepy
[...]
[wsgi]
recipe = zc.recipe.egg
eggs =
Zope2
repoze.who
repoze.tm2
repoze.retry
Paste
PasteDeploy
PasteScript
Products.IssueDealer==0.9.140
Now, when that's done, we're ready to run buildout. Run the command
./bin/buildout
Now, this script may fail, if there are network issues for example that make downloading of packages break. If that's the case, just re-run the command until it completes with lines something like this:
"""
Generated script '/home/morphex/zope_blogologue.com/zope/bin/runzope'.
Generated script '/home/morphex/zope_blogologue.com/zope/bin/zopectl'.
Generated script '/home/morphex/zope_blogologue.com/zope/bin/zpasswd'.
Generated script '/home/morphex/zope_blogologue.com/zope/bin/addzope2user'.
Generated script '/home/morphex/zope_blogologue.com/zope/bin/mkzopeinstance'.
Generated script '/home/morphex/zope_blogologue.com/zope/bin/paster'.
"""
After a lengthy process with lots of output, we can create the Zope instance, like so:
./bin/mkzopeinstance -d ~/zope_blogologue.com/zope/instance
I'll leave it up to you to choose a username and password.
Now the instance has been setup, and we can run it for the first time. Type in the command
./instance/bin/zopectl fg
And you should see something like this:
/home/morphex/zope_blogologue.com/zope/instance/bin/runzope -X debug-mode=on
2015-02-13 04:31:04 INFO ZServer HTTP server started at Fri Feb 13 04:31:04 2015
Hostname: 0.0.0.0
Port: 8080
2015-02-13 04:31:05 INFO Zope Ready to handle requests
Now I login to my server on the URL http://blogologue.com:8080/manage_main - and select "Issue Dealer" from the drop-down list, click on add and give it the ID issues, and the title "My issues". Now that Issue Dealer instance is available on
http://blogologue.com:8080/issues
Voila. If you're setting up a plain Zope 2 or Zope 2 with some product, just remove the Products.IssueDealer parts from the buildout.cfg and it should work.
Hope you found this useful, and comments etc. are much appreciated. My email is morphex AT gmail.
[Permalink] [By morphex] [Zope (Atom feed)] [13 Feb 04:05 Europe/Oslo]