Skip to content

Bones: Do it yourself professional Plone hosting

Bones

Halloween 2007 โ€” Jarn adds bones, its professional Plone hosting configuration recipes to ZopeSkel. 

One of the most important aspects of the Jarn professional Plone hosting environment (where each customer runs their own custom Zope instance) is that it has to be easy to use while still being very flexible. Easy โ€” not just for our hosting customers, but for ourselves as well. We want to spend our time providing the best possible service and making Plone better, not wrangling software installation, editing configuration files and waiting for compilers to finish.

Luckily we have two very useful technologies that can help: zc.buildout and PasteScript.

Buildout

Buildout is a system to manage software installation in a convenient and reliable way. You only need to tell it what you want to install and how it should be configured and it does the job for you. Most of this magic is implemented through buildout recipes: special python modules that know how to install a particular thing. To install Plone 3.0, for example, you can use the plone.recipe.plone recipe.

PasteScript

While buildout makes installing and managing software simple there is still a fair amount of work to do: bootstrapping buildout, writing a buildout configuration,  running buildout to test if everything works, tweak the buildout configuration, rerun buildout, etc.

This is where our second tool comes in: PasteScript makes it possible to define templates, or skeletons if you will, containing all the standard boilerplate. By using PasteScript to create a buildout for Plone deployments, creating a new Plone environment becomes very easy. ZopeSkel offers exactly that: templates to quickly create a buildout for Plone 2.5 or Plone 3.0. This allows us to create a Plone instance with a single command.

The next step

Even with buildout and the existing paste templates, creating a new hosting environment was not as simple as we wanted it to be: different customers require different Plone versions. But Plone 2.5 and Plone 3.0 buildouts required different paste templates, so we could not use a single command. Perhaps a customer would also need caching - another extra manual step needed. Starting and stopping the whole system was also complicated: you needed to manage ZEO, the Zope instance and possibly a caching server. That is at least three different commands, just to manage your one Plone site. Finally users still needed to use the ZMI, which is not known for being the most user friendly system, to create a Plone site before they can even see Plone in their browser.

To make our lives, and that of our partners and customers, easier, we wrote a new PasteScript template which makes it as easy as possible to create a new Plone deployment. Using this template is very simple:

$ paster create -t plone_hosting
ZopeSkel#plone_hosting Plone hosting: buildout with ZEO and any Plone version

Enter project name: jarn
Variables:
egg: jarn
package: jarn
project: jarn
Enter zope_password (Initial Zope admin password) ['admin']:
Enter http_port (HTTP port number) [8080]:
Enter zeo_port (ZEO port number) [8100]:
Enter proxy_port (Proxy port number (optional)) ['']:
Enter plone (Plone version (2.5, 2.5.1, 3.0, 3.0.1, etc.)) ['3.0.2']:

After answering those questions a number of things happen automatically:

  • a buildout is created, tailored for the requested Plone version. If a proxy port was specified this will include a fully configured Varnish.
  • buildout is run automatically
  • an initial Plone site with the id Plone is created, allowing users to immediately start using Plone.
  • a bin/control script is created with will start, stop or restart all necessary daemons: the ZEO server, the Zope instance and, if enabled, Varnish.

This means we now have a single command to install any Plone version, which does everything needed to allow our customers to immediately start using Plone!

We initially developed this as part of bones, our internal package for creating PasteScript based skeletons. Since there is really nothing Jarn specific about this recipe and we want to make it as easy as possible for people to start using Plone we merged this in the ZopeSkel package. As of release 1.2 ZopeSkel includes the new plone_hosting template.

 

--
Wichert Akkerman

Powered by Plone.