0
Oops, wheres my site?How to install Plone add-onsand live to tell the tale
Goals • Know the procedure for installing most Plone add-ons • Understand guidelines to prevent things from breaking • Rec...
Starting on the same page
The flavors of Plone installers(Available from plone.org)Windows installer     Only option for Windows.OS X       For Mac ...
buildout rootThe directory that contains the rest of the installation.Windows     C:Plone41Unified installer      /usr/loc...
instance scriptScript used to start Plone:bin/instance fgWindows       C:Plone41bininstance fgOS X & Unified installer    ...
First, do no harm
multi-staged deployment • Keep at least one copy of the site separate from the production copy, to test   changes. • Keep ...
Aspelis rule of deploymentCode & configuration flow from the development site to the production site; dataflows from the p...
Back up your data before you make changes! 1. Make sure your buildout configuration is under version control. 2. Back up t...
Restoring from backup1. Stop the instance2. Use your version control system to revert to the old version of the buildout, ...
The simplest backupCopy the entire buildout.
Preparing to install
Finding add-ons • Python Package Index (PyPI): http://pypi.python.org/pypi • Plone.org products directory: http://plone.or...
Plone version compatibility
DependenciesSimplest way to tell what it depends on is actually installing. :(Use the buildout.dumppickedversions extensio...
What does it do?  • Does it do some trivial customization, or introduce a brand new    experimental subsystem?  • Does it ...
A simple installation
Buildout.cfg formatParts        Each part has a header in square brackets:        [buildout]Variables        Each part con...
Adding PloneFormGenAdd the name of the distribution to the eggs variable.Which part?[instance]eggs =    Plone    Products....
Run buildout$ bin/buildoutFor verbose info:$ bin/buildout -vConfirm it was installedExamine the instance script.
Identifying picked versionsIf we used buildout.dumppickedversions, it shows us which versions were"picked":***************...
Pinning picked versionsAdd them to the versions buildout part:[versions]Products.PloneFormGen = 1.7b5Products.PythonField ...
Inferior pinningWhy not do this?[buildout]eggs = Products.PloneFormGen==1.7b5Because the version doesnt get used if PloneF...
Being strict about pinningDisallow picked versions:[buildout]allow-picked-versions = false
Starting ZopeUse the instance script in foreground mode to make failures obvious:$ bin/instance fg
Activating the add-onSite Setup > Add-ons
A complex installation
Installing Dexterity[buildout]extends = http://good-py.appspot.com/release/dexterity/1.0.3?plone=4.1.2[instance]eggs =    ...
good-py • A tool for building and distributing known good sets • One KGS can extend another • A KGS can be constrained by ...
Upgrading an add-on1. Update the version pins for the add-on and any dependencies.2. Re-run buildout and restart Zope.3. G...
What could possibly go wrong?
Incompatible version pinsExample:The version, 1.1.2, is not consistent with the requirement,plone.app.jquerytools>=1.2dev....
PyPI times outSymptom: Error message about the egg not being available.Solution: Temporarily use a mirror of the package i...
ZCML not loadedSymptom: The product you installed doesnt show up in the Add-ons controlpanel.Reason: Many add-ons "announc...
Other errors while starting upSeeking help: • Send the full traceback to the add-ons author • Ask in #plone channel on IRC...
Room for improvement
plonelint tool
"Dry run mode" for buildout
Communal Known Good Set         (KGS)
UI for installing packages
Questions
Upcoming SlideShare
Loading in...5
×

Oops, where's my site?

646

Published on

How to install Plone add-ons and live to tell the tale

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
646
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Oops, where's my site?"

  1. 1. Oops, wheres my site?How to install Plone add-onsand live to tell the tale
  2. 2. Goals • Know the procedure for installing most Plone add-ons • Understand guidelines to prevent things from breaking • Recognize some common ways installation fails and know how to recover
  3. 3. Starting on the same page
  4. 4. The flavors of Plone installers(Available from plone.org)Windows installer Only option for Windows.OS X For Mac OS X. Doesnt require a C compiler.Unified installer Installation from source for all Unix-like systems (including OS X). Requires a C compiler to install.Your own custom buildout Most likely generated using ZopeSkel or based on a previous project. Provides the most flexibility.
  5. 5. buildout rootThe directory that contains the rest of the installation.Windows C:Plone41Unified installer /usr/local/Plone/zinstance or $HOME/zinstanceCustom buildout Wherever you put it
  6. 6. instance scriptScript used to start Plone:bin/instance fgWindows C:Plone41bininstance fgOS X & Unified installer ${ ${buildout_root}/bin/instance fg } or ${ ${buildout_root}/bin/client1 fg }
  7. 7. First, do no harm
  8. 8. multi-staged deployment • Keep at least one copy of the site separate from the production copy, to test changes. • Keep all changes in version control (svn, git, etc.) so you can reproduce your environment. • Use buildouts extends to handle differences between environments.
  9. 9. Aspelis rule of deploymentCode & configuration flow from the development site to the production site; dataflows from the production site to the development site.
  10. 10. Back up your data before you make changes! 1. Make sure your buildout configuration is under version control. 2. Back up the data: $ bin/snapshotbackup -- or -- $ bin/backup(collective.recipe.backup is included in the Unified installer buildout.)
  11. 11. Restoring from backup1. Stop the instance2. Use your version control system to revert to the old version of the buildout, and re-run it.3. Restore the data: $ bin/snapshotrestore -- or -- $ bin/restore4. Start the instance.
  12. 12. The simplest backupCopy the entire buildout.
  13. 13. Preparing to install
  14. 14. Finding add-ons • Python Package Index (PyPI): http://pypi.python.org/pypi • Plone.org products directory: http://plone.org/products • Plone Open Comparison: http://plone.opencomparison.org
  15. 15. Plone version compatibility
  16. 16. DependenciesSimplest way to tell what it depends on is actually installing. :(Use the buildout.dumppickedversions extension:[buildout]extensions = buildout.dumppickedversions(Included in the Unified installer buildout.)
  17. 17. What does it do? • Does it do some trivial customization, or introduce a brand new experimental subsystem? • Does it do anything malicious? • Is it possible to uninstall?Ask others about their experience with it (on IRC or the mailing lists).
  18. 18. A simple installation
  19. 19. Buildout.cfg formatParts Each part has a header in square brackets: [buildout]Variables Each part contains multiple variables below the header: [buildout] extends = http://dist.plone.org/release/4.1.2/versions.cfg parts = instance Variables can interpolate other variables [instance] eggs = ${buildout:eggs}
  20. 20. Adding PloneFormGenAdd the name of the distribution to the eggs variable.Which part?[instance]eggs = Plone Products.PloneFormGenBut in the Unified installer buildout the instance eggs are based on thebuildout eggs:[instance]eggs = ${buildout:eggs}So you can add to buildout eggs:[buildout]eggs = Plone Products.PloneFormGen
  21. 21. Run buildout$ bin/buildoutFor verbose info:$ bin/buildout -vConfirm it was installedExamine the instance script.
  22. 22. Identifying picked versionsIf we used buildout.dumppickedversions, it shows us which versions were"picked":*************** PICKED VERSIONS ****************[versions]Products.PloneFormGen = 1.7b5Products.PythonField = 1.1.3Products.TALESField = 1.1.3Products.TemplateFields = 1.2.5#Required by:#Products.PloneFormGen 1.7b5collective.js.jqueryui = 1.8.5.2
  23. 23. Pinning picked versionsAdd them to the versions buildout part:[versions]Products.PloneFormGen = 1.7b5Products.PythonField = 1.1.3Products.TALESField = 1.1.3Products.TemplateFields = 1.2.5#Required by:#Products.PloneFormGen 1.7b5collective.js.jqueryui = 1.8.5.2Now if you re-run buildout, it should show no picked versions.
  24. 24. Inferior pinningWhy not do this?[buildout]eggs = Products.PloneFormGen==1.7b5Because the version doesnt get used if PloneFormGen is a dependency ofsomething else.
  25. 25. Being strict about pinningDisallow picked versions:[buildout]allow-picked-versions = false
  26. 26. Starting ZopeUse the instance script in foreground mode to make failures obvious:$ bin/instance fg
  27. 27. Activating the add-onSite Setup > Add-ons
  28. 28. A complex installation
  29. 29. Installing Dexterity[buildout]extends = http://good-py.appspot.com/release/dexterity/1.0.3?plone=4.1.2[instance]eggs = plone.app.dexterity
  30. 30. good-py • A tool for building and distributing known good sets • One KGS can extend another • A KGS can be constrained by a particular platform
  31. 31. Upgrading an add-on1. Update the version pins for the add-on and any dependencies.2. Re-run buildout and restart Zope.3. Go to Add-ons control panel and check if there are upgrade steps to run.
  32. 32. What could possibly go wrong?
  33. 33. Incompatible version pinsExample:The version, 1.1.2, is not consistent with the requirement,plone.app.jquerytools>=1.2dev.While: Installing instance.Error: Bad version 1.1.2Reason: PloneFormGen requires plone.app.jquerytools >= 1.2dev, but I have itpinned to 1.1.2.How did I know?:Getting required collective.js.jqueryui required by Products.PloneFormGen 1.7b6.Picked: collective.js.jqueryui = 1.8.13.1The version, 1.1.2, is not consistent with the requirement,plone.app.jquerytools>=1.2dev.While: Installing instance.Error: Bad version 1.1.2Solution: Upgrade plone.app.jquerytools (with care).
  34. 34. PyPI times outSymptom: Error message about the egg not being available.Solution: Temporarily use a mirror of the package index:[buildout]index = http://d.pypi.python.org/simple
  35. 35. ZCML not loadedSymptom: The product you installed doesnt show up in the Add-ons controlpanel.Reason: Many add-ons "announce" themselves to Plone so that Plone loads theirconfiguration, but some are missing this.Solution: Include the packages ZCML in buildout, re-run buildout, and restart:[instance]zcml = my.package
  36. 36. Other errors while starting upSeeking help: • Send the full traceback to the add-ons author • Ask in #plone channel on IRC • Ask on the plone-users mailing list
  37. 37. Room for improvement
  38. 38. plonelint tool
  39. 39. "Dry run mode" for buildout
  40. 40. Communal Known Good Set (KGS)
  41. 41. UI for installing packages
  42. 42. Questions
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×