Skip to main content

A buildout recipe to update plone sites

Project description


After executing your buildout to deploy your Plone project you have to start the zope instance and then go on the ZMI to create/update the plone sites, install/reinstall some products, run some GS profiles or sometimes run some scripts or migrate to new Plone version. This is boring!


collective.recipe.updateplone is a buildout recipe that you can use to create or update plone sites. It automatizes the following tasks:

  • Backup database

  • pack database

  • create plone sites if it do not exist

  • install or reinstall products with the quickinstaller

  • uninstall products with the quickinstaller

  • run GS profiles

  • run Plone migration (portal_migration.upgrade)

Detailed Documentation

Supported options

The recipe supports the following options:


A list of plone site to update or to create if they do not exist. Each item of the list consist of the zope instance name that contains (will contain) the plone site, a dot and the name of the plone site. ex: instance1.site1


If true, the recipe will upgrade your plone site by running portal_migration.upgrade(). This is only useful if you are migrating to a new version of plone. This option defaults to false.


A list of packages/products to uninstall with the quickinstaller if they are already installed


A list of packages/products to install with the quickinstaller or to reinstall if they are already installed.


A list of scripts to call/run. Each item of the list consist of a path to the script to run. The path has to start with portal/. ex: portal/migrate_all


A list of GS profile Ids to be run. Each id has to be given as it accepted by setup tool. ie: profile-ProductName:default


If true, the recipe will backup Data.fs before processing. Defaults to false.


If true, the recipe will pack Data.fs before processing. Defaults to false


The name of the zope instance admin. The same as defined in the user option of your zope instance. Defaults to ‘admin’


If true the recipe will only run once. If you run the buildout many times the recipe will only run the first time. It does this by writing a file to the var directory. If you want to run the recipe again you have to delete the file from the var directory or set this option to false. The file name is the same as the section name with cfg extension. This option Defaults to True.

Example usage

We’ll start by creating a buildout that uses the recipe. Let’s create a freash zope instance and create 2 plone sites inside it. We will also install RichDocument and NuPlone into these sites:

>>> write(sample_buildout, 'buildout.cfg', """
... [buildout]
... parts =
...     zope2
...     instance1
...     plone
...     update-plone
... index =
... find-links =
... eggs =
...     elementtree
...     PILwoTK
... [zope2]
... recipe = plone.recipe.zope2install
... url = ${plone:zope2-url}
... [plone]
... recipe = plone.recipe.plone
... [instance1]
... recipe = plone.recipe.zope2instance
... zope2-location = ${zope2:location}
... user = admin:admin
... deprecation-warnings = false
... eggs =
...     ${buildout:eggs}
...     ${plone:eggs}
...     Products.RichDocument
... zcml =
...     Products.RichDocument
... products =
...     ${plone:products}
... [update-plone]
... recipe = collective.recipe.updateplone
... backup-db = true
... pack-db = true
... plone-site =
...     instance1.site1
...     instance1.site2
... install =
...     Marshall
... uninstall =
... run-profile =
...     profile-Products.RichDocument:default
...     profile-Products.NuPlone:nuplone
... run-script =
... """)

Running the buildout gives us:

>>> print system(buildout) # doctest:+ELLIPSIS
Getting distribution for 'plone.recipe.plone'.
Installing update-plone.
*** collective.recipe.updateplone: Starting to pack Database...
*** collective.recipe.updateplone: Database packed...
*** collective.recipe.updateplone: Adding plone site: site1
*** collective.recipe.updateplone: Added plone site: site1
*** collective.recipe.updateplone: Adding plone site: site2
*** collective.recipe.updateplone: Added plone site: site2
*** collective.recipe.updateplone: site1->Nothing to uninstall
*** collective.recipe.updateplone: site1->Installing: ['Marshall']
*** collective.recipe.updateplone: site1->Installed: ['Marshall']
*** collective.recipe.updateplone: site1->Running profile profile-Products.RichDocument:default
*** collective.recipe.updateplone: site1->Ran profile profile-Products.RichDocument:default
*** collective.recipe.updateplone: site1->Running profile profile-Products.NuPlone:nuplone
*** collective.recipe.updateplone: site1->Ran profile profile-Products.NuPlone:nuplone
*** collective.recipe.updateplone: site2->Nothing to uninstall
*** collective.recipe.updateplone: site2->Installing: ['Marshall']
*** collective.recipe.updateplone: site2->Installed: ['Marshall']
*** collective.recipe.updateplone: site2->Running profile profile-Products.RichDocument:default
*** collective.recipe.updateplone: site2->Ran profile profile-Products.RichDocument:default
*** collective.recipe.updateplone: site2->Running profile profile-Products.NuPlone:nuplone
*** collective.recipe.updateplone: site2->Ran profile profile-Products.NuPlone:nuplone


  • Anton Stonor, Author

  • Mustapha Benali, Author

  • Danilo G. Botelho, Contributor

  • Sidnei da Silva, Contributor

Change history

0.3 (2009-02-07)

  • Fixed recipe to correctly work on paths containing spaces on Windows. [sidnei]

  • Fixed recipe to locate the ZEO Service script correctly on Windows. [sidnei]

  • Use newer API for running GenericSetup profiles, if it’s available. [sidnei]

0.2 (2009-02-01)

  • Fixed recipe to correctly run instance executable on Windows [danilogbotelho]

0.1 (2008-07-22)

  • Created recipe with ZopeSkel [Mustapha Benali].

  • Fixed recipe to correctly run instance executable on Windows [Danilo G. Botelho].


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.recipe.updateplone-0.3.tar.gz (11.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page