Oops, where's my site?
How to install Plone add-ons
and live to tell the tale
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
Starting on the same page
The flavors of Plone installers
(Available from plone.org)

Windows installer
     Only option for Windows.

OS X
       For Mac OS X. Doesn't 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.
buildout root
The directory that contains the rest of the installation.

Windows
     C:Plone41

Unified installer
      /usr/local/Plone/zinstance or $HOME/zinstance

Custom buildout
     Wherever you put it
instance script
Script used to start Plone:

bin/instance fg

Windows

       C:Plone41bininstance fg

OS X & Unified installer

       ${
       ${buildout_root}/bin/instance fg
                      }

      or

       ${
       ${buildout_root}/bin/client1 fg
                      }
First, do no harm
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 buildout's extends to handle differences between environments.
Aspeli's rule of deployment
Code & configuration flow from the development site to the production site; data
flows from the production site to the development site.
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.)
Restoring from backup
1. Stop the instance

2. 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/restore

4. Start the instance.
The simplest backup
Copy the entire buildout.
Preparing to install
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
Plone version compatibility
Dependencies
Simplest 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.)
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).
A simple installation
Buildout.cfg format
Parts

        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}
Adding PloneFormGen
Add the name of the distribution to the eggs variable.

Which part?

[instance]
eggs =
    Plone
    Products.PloneFormGen

But in the Unified installer buildout the instance eggs are based on the
buildout eggs:

[instance]
eggs = ${buildout:eggs}

So you can add to buildout eggs:

[buildout]
eggs =
    Plone
    Products.PloneFormGen
Run buildout
$ bin/buildout

For verbose info:

$ bin/buildout -v


Confirm it was installed
Examine the instance script.
Identifying picked versions
If we used buildout.dumppickedversions, it shows us which versions were
"picked":

*************** PICKED VERSIONS ****************
[versions]
Products.PloneFormGen = 1.7b5
Products.PythonField = 1.1.3
Products.TALESField = 1.1.3
Products.TemplateFields = 1.2.5

#Required by:
#Products.PloneFormGen 1.7b5
collective.js.jqueryui = 1.8.5.2
Pinning picked versions
Add them to the versions buildout part:

[versions]
Products.PloneFormGen = 1.7b5
Products.PythonField = 1.1.3
Products.TALESField = 1.1.3
Products.TemplateFields = 1.2.5

#Required by:
#Products.PloneFormGen 1.7b5
collective.js.jqueryui = 1.8.5.2

Now if you re-run buildout, it should show no picked versions.
Inferior pinning
Why not do this?

[buildout]
eggs = Products.PloneFormGen==1.7b5

Because the version doesn't get used if PloneFormGen is a dependency of
something else.
Being strict about pinning
Disallow picked versions:

[buildout]
allow-picked-versions = false
Starting Zope
Use the instance script in foreground mode to make failures obvious:

$ bin/instance fg
Activating the add-on
Site 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 =
    plone.app.dexterity
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
Upgrading an add-on
1. 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.
What could possibly go wrong?
Incompatible version pins
Example:

The version, 1.1.2, is not consistent with the requirement,
'plone.app.jquerytools>=1.2dev'.
While:
  Installing instance.
Error: Bad version 1.1.2

Reason: PloneFormGen requires plone.app.jquerytools >= 1.2dev, but I have it
pinned 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.1
The version, 1.1.2, is not consistent with the requirement,
'plone.app.jquerytools>=1.2dev'.
While:
  Installing instance.
Error: Bad version 1.1.2

Solution: Upgrade plone.app.jquerytools (with care).
PyPI times out
Symptom: 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
ZCML not loaded
Symptom: The product you installed doesn't show up in the Add-ons control
panel.

Reason: Many add-ons "announce" themselves to Plone so that Plone loads their
configuration, but some are missing this.

Solution: Include the package's ZCML in buildout, re-run buildout, and restart:

[instance]
zcml =
    my.package
Other errors while starting up
Seeking help:

 • Send the full traceback to the add-on's author

 • Ask in #plone channel on IRC

 • Ask on the plone-users mailing list
Room for improvement
plonelint tool
"Dry run mode" for buildout
Communal Known Good Set
         (KGS)
UI for installing packages
Questions

More Related Content

PPTX
CakePHP - Admin Acl Controlled
PDF
Building a Drupal site with Git
PDF
3 introduction-php-mvc-cakephp-m3-getting-started-slides
PPTX
Managed Beans: When, Why and How
ODP
Java and XPages
PDF
Laravel Forge: Hello World to Hello Production
PDF
Nina Zakharenko - Introduction to Git - Start SLC 2015
PPTX
Laravel Beginners Tutorial 1
CakePHP - Admin Acl Controlled
Building a Drupal site with Git
3 introduction-php-mvc-cakephp-m3-getting-started-slides
Managed Beans: When, Why and How
Java and XPages
Laravel Forge: Hello World to Hello Production
Nina Zakharenko - Introduction to Git - Start SLC 2015
Laravel Beginners Tutorial 1

What's hot (20)

PPTX
PPT
Q4E and Eclipse IAM, Maven integration for Eclipse
PPT
Building and Deployment of Drupal sites with Features and Context
PDF
PDF
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
PDF
All the Laravel things: up and running to making $$
PPT
Maven, Eclipse And OSGi Working Together
KEY
Eclipse IAM, Maven Integration For Eclipse
PDF
Virtual CD4PE Workshop
PDF
MidwestPHP 2016 - Adventures in Laravel 5
PDF
PDF
Automating your workflow with Gulp.js
PDF
Chef for beginners module 1
PDF
All the Laravel Things – Up & Running to Making $$
PDF
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
PDF
Console Apps: php artisan forthe:win
PPTX
PHP & JavaScript & CSS Coding style
PPTX
Invoke component demo in mule
PDF
Phing
PPTX
DevRock #01 What's new ASP.net 5
Q4E and Eclipse IAM, Maven integration for Eclipse
Building and Deployment of Drupal sites with Features and Context
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
All the Laravel things: up and running to making $$
Maven, Eclipse And OSGi Working Together
Eclipse IAM, Maven Integration For Eclipse
Virtual CD4PE Workshop
MidwestPHP 2016 - Adventures in Laravel 5
Automating your workflow with Gulp.js
Chef for beginners module 1
All the Laravel Things – Up & Running to Making $$
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
Console Apps: php artisan forthe:win
PHP & JavaScript & CSS Coding style
Invoke component demo in mule
Phing
DevRock #01 What's new ASP.net 5
Ad

Similar to Oops, where's my site? (20)

ODP
ZopeSkel & Buildout packages
ODP
Jbossworld Presentation
ODP
Continuous deployment-at-flipkart
PDF
Martin Aspeli Extending And Customising Plone 3
PPT
How to host an app for $20 in 20min using buildout and hostout
PDF
Chocolatey - making the process of installing software on windows easy as pie
ZIP
Zenoss: Buildout
DOCX
CodeShip
PPTX
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
PPT
What's new in p2 (2009)?
PDF
How to Install and Configure Jenkins on Centos 7
PPTX
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
PDF
Continuous Web Performance Monitoring with Jenkins
PPTX
Os dev tool box
PPTX
Virtualization
PPT
Where's the source, Luke? : How to find and debug the code behind Plone
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
PPTX
ODP
Buildout: creating and deploying repeatable applications in python
ODP
Buildout: How to maintain big app stacks without losing your mind
ZopeSkel & Buildout packages
Jbossworld Presentation
Continuous deployment-at-flipkart
Martin Aspeli Extending And Customising Plone 3
How to host an app for $20 in 20min using buildout and hostout
Chocolatey - making the process of installing software on windows easy as pie
Zenoss: Buildout
CodeShip
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
What's new in p2 (2009)?
How to Install and Configure Jenkins on Centos 7
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Continuous Web Performance Monitoring with Jenkins
Os dev tool box
Virtualization
Where's the source, Luke? : How to find and debug the code behind Plone
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Buildout: creating and deploying repeatable applications in python
Buildout: How to maintain big app stacks without losing your mind
Ad

More from David Glick (6)

PDF
PloneNG: What's new in Plone 4.2, 4.3, and beyond
PDF
Dexterity in the Wild
PDF
A Dexterity Intro for Recovering Archetypes Addicts
PDF
Integrating Plone with E-Commerce and Relationship Management: A Case Study i...
PDF
Building Content Types with Dexterity
ODP
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
PloneNG: What's new in Plone 4.2, 4.3, and beyond
Dexterity in the Wild
A Dexterity Intro for Recovering Archetypes Addicts
Integrating Plone with E-Commerce and Relationship Management: A Case Study i...
Building Content Types with Dexterity
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Architecture types and enterprise applications.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PPT
What is a Computer? Input Devices /output devices
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Unlock new opportunities with location data.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Five Habits of High-Impact Board Members
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
August Patch Tuesday
Assigned Numbers - 2025 - Bluetooth® Document
Taming the Chaos: How to Turn Unstructured Data into Decisions
DP Operators-handbook-extract for the Mautical Institute
Architecture types and enterprise applications.pdf
O2C Customer Invoices to Receipt V15A.pptx
Module 1.ppt Iot fundamentals and Architecture
What is a Computer? Input Devices /output devices
CloudStack 4.21: First Look Webinar slides
Benefits of Physical activity for teenagers.pptx
Zenith AI: Advanced Artificial Intelligence
Unlock new opportunities with location data.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Getting Started with Data Integration: FME Form 101
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
observCloud-Native Containerability and monitoring.pptx
Five Habits of High-Impact Board Members
Univ-Connecticut-ChatGPT-Presentaion.pdf
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Web Crawler for Trend Tracking Gen Z Insights.pptx
August Patch Tuesday

Oops, where's my site?

  • 1. Oops, where's my site? How to install Plone add-ons and live to tell the tale
  • 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. Starting on the same page
  • 4. The flavors of Plone installers (Available from plone.org) Windows installer Only option for Windows. OS X For Mac OS X. Doesn't 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. buildout root The directory that contains the rest of the installation. Windows C:Plone41 Unified installer /usr/local/Plone/zinstance or $HOME/zinstance Custom buildout Wherever you put it
  • 6. instance script Script used to start Plone: bin/instance fg Windows C:Plone41bininstance fg OS X & Unified installer ${ ${buildout_root}/bin/instance fg } or ${ ${buildout_root}/bin/client1 fg }
  • 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 buildout's extends to handle differences between environments.
  • 9. Aspeli's rule of deployment Code & configuration flow from the development site to the production site; data flows from the production site to the development site.
  • 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. Restoring from backup 1. Stop the instance 2. 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/restore 4. Start the instance.
  • 12. The simplest backup Copy the entire buildout.
  • 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
  • 16. Dependencies Simplest 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. 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).
  • 19. Buildout.cfg format Parts 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. Adding PloneFormGen Add the name of the distribution to the eggs variable. Which part? [instance] eggs = Plone Products.PloneFormGen But in the Unified installer buildout the instance eggs are based on the buildout eggs: [instance] eggs = ${buildout:eggs} So you can add to buildout eggs: [buildout] eggs = Plone Products.PloneFormGen
  • 21. Run buildout $ bin/buildout For verbose info: $ bin/buildout -v Confirm it was installed Examine the instance script.
  • 22. Identifying picked versions If we used buildout.dumppickedversions, it shows us which versions were "picked": *************** PICKED VERSIONS **************** [versions] Products.PloneFormGen = 1.7b5 Products.PythonField = 1.1.3 Products.TALESField = 1.1.3 Products.TemplateFields = 1.2.5 #Required by: #Products.PloneFormGen 1.7b5 collective.js.jqueryui = 1.8.5.2
  • 23. Pinning picked versions Add them to the versions buildout part: [versions] Products.PloneFormGen = 1.7b5 Products.PythonField = 1.1.3 Products.TALESField = 1.1.3 Products.TemplateFields = 1.2.5 #Required by: #Products.PloneFormGen 1.7b5 collective.js.jqueryui = 1.8.5.2 Now if you re-run buildout, it should show no picked versions.
  • 24. Inferior pinning Why not do this? [buildout] eggs = Products.PloneFormGen==1.7b5 Because the version doesn't get used if PloneFormGen is a dependency of something else.
  • 25. Being strict about pinning Disallow picked versions: [buildout] allow-picked-versions = false
  • 26. Starting Zope Use the instance script in foreground mode to make failures obvious: $ bin/instance fg
  • 27. Activating the add-on Site Setup > Add-ons
  • 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. 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. Upgrading an add-on 1. 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. What could possibly go wrong?
  • 33. Incompatible version pins Example: The version, 1.1.2, is not consistent with the requirement, 'plone.app.jquerytools>=1.2dev'. While: Installing instance. Error: Bad version 1.1.2 Reason: PloneFormGen requires plone.app.jquerytools >= 1.2dev, but I have it pinned 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.1 The version, 1.1.2, is not consistent with the requirement, 'plone.app.jquerytools>=1.2dev'. While: Installing instance. Error: Bad version 1.1.2 Solution: Upgrade plone.app.jquerytools (with care).
  • 34. PyPI times out Symptom: 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. ZCML not loaded Symptom: The product you installed doesn't show up in the Add-ons control panel. Reason: Many add-ons "announce" themselves to Plone so that Plone loads their configuration, but some are missing this. Solution: Include the package's ZCML in buildout, re-run buildout, and restart: [instance] zcml = my.package
  • 36. Other errors while starting up Seeking help: • Send the full traceback to the add-on's author • Ask in #plone channel on IRC • Ask on the plone-users mailing list
  • 39. "Dry run mode" for buildout
  • 40. Communal Known Good Set (KGS)
  • 41. UI for installing packages