This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Problem

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!

Solution

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)

Supported options

The recipe supports the following options:

plone-site
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
migrate-plone
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.
uninstall
A list of packages/products to uninstall with the quickinstaller if they are already installed
install
A list of packages/products to install with the quickinstaller or to reinstall if they are already installed.
run-script
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
run-profile
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
backup-db
If true, the recipe will backup Data.fs before processing. Defaults to false.
pack-db
If true, the recipe will pack Data.fs before processing. Defaults to false
admin-name
The name of the zope instance admin. The same as defined in the user option of your zope instance. Defaults to ‘admin’
run-once
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 = http://pypi.python.org/simple
... find-links =
...     http://download.zope.org/distribution/
...     http://effbot.org/downloads
... 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
...
<BLANKLINE>

Contributors

  • Anton Stonor, Author
  • Mustapha Benali, Author
  • Danilo G. Botelho, Contributor
  • Sidnei da Silva, Contributor

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].
Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
collective.recipe.updateplone-0.3.tar.gz (11.0 kB) Copy SHA256 Checksum SHA256 Source Feb 7, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting