A buildout recipe to create and update a plone site
Project description
Introduction
This recipe enables you to create and update a Plone site as part of a buildout run. This recipe only aims to run profiles and Quickinstall products. It is assumed that the install methods, setuphandlers, upgrade steps, and other recipes will handle the rest of the work.
NOTE: There is another recipe that does something very similar here: http://pypi.python.org/pypi/collective.recipe.updateplone
Code repository: http://svn.plone.org/svn/collective/buildout/collective.recipe.plonesite
Report bugs at https://bugs.launchpad.net/collective.buildout/
Detailed Documentation
Options
- site-id
The id of the Plone site that the script will create. This will also be used to update the site once created. Default: Plone
- admin-user
The id of an admin user that will be used as the ‘Manager’. Default: admin
- products-initial
A list of products to quickinstall just after initial site creation. See above for information about the product name format [2].
- profiles-inital
A list of GenericSetup profiles to run just after initial site creation. See above for informaion on the expected profile id format [1].
- products
A list of products to quickinstall each time buildout is run. See above for information about the product name format [2].
- profiles
A list of GenericSetup profiles to run each time buildout is run. See above for informaion on the expected profile id format [1].
- instance
The name of the instance that will run the script. Default: instance
- zeoserver
The name of the zeoserver part that should be used. This is only required if you are using a zope/zeo setup. Default: not set
- before-install
A system command to execute before installing Plone. Optional. You could use this to start a Supervisor daemon to launch ZEO, instead of launching ZEO directly. You can use this option in place of the zeoserver option.
- after-install
A system command to execute after installing Plone. Optional.
- site-replace
Replace any existing plone site named site-id. Default: false
- enabled
Option to start up the instance/zeoserver. Default: true. This can be a useful option from the command line if you do not want to start up Zope, but still want to run the complete buildout.
$ bin/buildout -Nv plonesite:enabled=false
- pre-extras
An absolute path to a file with python code that will be evaluated before running Quickinstaller and GenericSetup profiles. Multiple files can be given. Two variables will be available to you. The app variable is the zope root. The portal variable is the plone site as defined by the site-id option. NOTE: file path cannot contain spaces. Default: not set
- post-extras
An absolute path to a file with python code that will be evaluated after running Quickinstaller and GenericSetup profiles. Multiple files can be given. Two variables will be available to you. The app variable is the zope root. The portal variable is the plone site as defined by the site-id option. NOTE: file path cannot contain spaces. Default: not set
Example
Here is an example buildout.cfg with the plonesite recipe:
[buildout] parts = zope2 instance zeoserver plonesite [zope2] recipe = plone.reciepe.zope2install ... [instance] recipe = plone.recipe.zope2instance ... eggs = ... my.package my.other.package zcml = ... my.package my.other.package [zeoserver] recipe = plone.recipe.zope2zeoserver ... [plonesite] recipe = collective.recipe.plonesite site-id = test instance = instance zeoserver = zeoserver profiles-initial = my.package:initial profiles = my.package:default my.other.package:default post-extras = ${buildout:directory}/my_script.py pre-extras = ${buildout:directory}/my_other_script.py
Example with Plone 4 content enabled
Here is another example buildout.cfg with the plone4site recipe:
[buildout] parts = -- ibid -- plone4site -- ibid -- [plone4site] recipe = collective.recipe.plonesite site-id = test instance = instance zeoserver = zeoserver profiles-initial = Products.CMFPlone:plone-content #create default plone content like News, Events... my.package:initial profiles = my.package:default my.other.package:default
Contributors
Clayton Parker [claytron], Author Andrew Burkhalter [andrewb] JeanMichel FRANCOIS [toutpt] Andreas Jung [ajung] Jeff Kowalczyk [jeffk] Pelle Kroegholt [pelle]
Change history
1.2 (2010-02-10)
Update docs with info about how to add a Product [claytron]
Adjusted the support for Plone4 since the addPloneSite() has changed slightly. [pelle]
1.1 (2009-11-10)
Make sure to commit the transaction after adding the plone site to avoid some strange behavior. [claytron]
Add support for Plone4 [toutpt]
1.0 (2009-08-24)
Added a before-install and after-install option to the recipe. this allows you to use something like supervisor to launch the processes. Thanks to Shane Hathaway for the patch. [claytron]
0.9 (2009-08-10)
Fixed the site-id option so that it defaults to Plone properly. Thanks to aclark for the bug report. [claytron]
0.8 (2009-06-24)
Subversion 1.6 and setuptools are not friends yet. Fixed upload. [claytron]
0.7 (2009-06-23)
Clarification to docs. Cleaning up copy/paste error to post-extras [andrewb]
Fixed the instance option so that it defaults to instance properly [claytron]
0.6 (2008-12-16)
Make admin-user configuration option truly optional per the documentation. Fallback to admin which would be the common default per ZopeSkel’s plone3_buildout template [andrewb]
Added new options pre-extras and post-extras. The two options are files that can be run before and after the quickinstaller and profiles have been run. [claytron]
Add condition so that the script can be used on older versions of plone [claytron]
0.5 (2008-11-11)
Fixed a bug where already installed Products would not be re-installed [claytron]
Added example buildout config and updated the READMEs [claytron]
Re-factored the plonesite.py script [claytron]
A dash of PEP 8 [claytron]
0.4 (2008-11-11)
Added a enabled option so that you can switch the part off from the command line. (buildout:parts-=plonesite doesn’t work yet) [claytron]
Change the script so that profiles prefixed with profile- can also be given. [claytron]
Added some docs to the recipe [claytron]
0.3 (2008-10-30)
Added site-replace option to the readme [claytron]
The site-replace option is no longer required [claytron]
0.2 (2008-10-30)
new Plone sites will be created with a datetime suffix which is helpful if you need to re-run new instances over and over again e.g. for migration purposes. If you need a fixed site id then explictely set the id using the site-id option. [ajung]
Fixed error with uninitialized variable [jeffk]
Add buildout recipe option site-replace, defaults to off. Use with site-id.
New recipe option site-replace = on will remove any existing object in app named site-id. A new plone site will be created to replace it.
Default option setting site-replace = off will not remove existing objects in app named site-id. [jeffk]
0.1 (2008-10-11)
Created recipe with ZopeSkel [claytron]
Download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.recipe.plonesite-1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f75fdefae7398cf064c68432599722e6eb88082ae74b91a5d3161bbe6e9d184 |
|
MD5 | d7365e0fcfa9f08c1a34e276d961f613 |
|
BLAKE2b-256 | 9836980829640df3d3e74b22bb6da0e954fd632de60c93a745d5648aa70b0cd0 |