SlideShare a Scribd company logo
GenericSetup
De-mystified
      Clayton Parker
Plone Symposium East 2009




            nowhere to go but
           open source
   s ix fe e tup . co m / i mm e rs e
Who am I?


•   Lead Developer at Six Feet Up, Inc.
•   claytron on IRC




                                          s ixf eet up. c om/ i mme r se
What’s in store?

•   The what and why of GenericSetup
•   Importing and exporting
•   Best practices
•   portal_setup vs. portal_quickinstaller




                                             s ixf eet up. c om/ i mme r se
What?

•   portal_quickinstaller replacement
•   CustomizationPolicy replacement
•   Site configuration
•   Upgrades




                                        s ixf eet up. c om/ i mme r se
Why?


   “Persistence means always having to
     say you’re sorry” - Seaver’s Law




                                         s ixf eet up. c om/ i mme r se
Install.py == sadness


                    s ixf eet up. c om/ i mme r se
GenericSetup Profiles


•   Base profile
•   Extension profile




                       s ixf eet up. c om/ i mme r se
What’s in a profile?
    <genericsetup:registerProfile
        name=quot;defaultquot;
        title=quot;My Packagequot;
        directory=quot;profiles/defaultquot;
        description=quot;My Package install profilequot;
        provides=quot;Products.GenericSetup.interfaces.EXTENSIONquot;
        />



•   profile-<package_name>:<profile_name>
•   profile-my.package:default
•   my.package:default

                                                      s ixf eet up. c om/ i mme r se
On the filesystem
   my.package/my/package/
    |
    |- configure.zcml
    |- exportimport/
    |
    |- profiles/
    |   |
    |   |- default/
    |       |
    |       |- metadata.xml
    |       |- my.package-default.txt
    |       |- <other profile files>
    |
    |- setuphandlers.py
    |- upgrades.py

                                        s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
metadata.xml
<?xml version=quot;1.0quot;?>
<metadata>
  <version>1.0</version>
  <dependencies>
    <dependency>profile-my.theme:default</dependency>
    <dependency>profile-my.other.package:default</dependency>
  </dependencies>
</metadata>




                                                   s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
Careful with that axe, Eugene...




                                   s ixf eet up. c om/ i mme r se
s ixf eet up. c om/ i mme r se
Tell me more


•   Profile for initial site setup
•   Upgrade steps




                                    s ixf eet up. c om/ i mme r se
Upgrade steps
   <genericsetup:upgradeStep
       title=quot;Setup calendarquot;
       description=quot;Modify the calendar settingsquot;
       source=quot;0.9quot;
       destination=quot;1.0quot;
       handler=quot;.upgrades.setupCalendarquot;
       sortkey=quot;10quot;
       profile=quot;my.package:defaultquot;
       />




                                               s ixf eet up. c om/ i mme r se
Upgrade steps
 from Products.CMFCore.utils import getToolByName

 def setupCalendar(context):
     ctool = getToolByName(context, 'portal_calendar')
     cal_types = list(ctool.calendar_types)
     if 'MyEventType' not in cal_types:
         cal_types.append('MyEventType')
         ctool.calendar_types = cal_types




                                                s ixf eet up. c om/ i mme r se
Best Practices

•   Uninstall profiles
•   Trim the export
•   Be aware of other profiles




                                s ixf eet up. c om/ i mme r se
<property name=quot;metaTypesNotToListquot; type=quot;linesquot;>
        <element value=quot;ATBooleanCriterionquot;/>
        <element value=quot;ATDateCriteriaquot;/>
        <element value=quot;ATDateRangeCriterionquot;/>
        <element value=quot;ATListCriterionquot;/>
        ...
       </property>



<property name=quot;metaTypesNotToListquot; type=quot;linesquot; purge=quot;Falsequot;>
 <element value=quot;Imagequot;/>
 <element value=quot;Filequot;/>
</property>




                                                    s ixf eet up. c om/ i mme r se
portal_setup vs. portal_quickinstaller




                                     s ixf eet up. c om/ i mme r se
def install(portal):
    quot;quot;quot;Run the GS profile to install this packagequot;quot;quot;
    out = StringIO()
    runProfile(portal, 'profile-my.package:default')
    print >>out, quot;Installed my.packagequot;
    return out.getvalue()

def uninstall(portal, reinstall=False):
    quot;quot;quot;Run the GS profile to install this packagequot;quot;quot;
    out = StringIO()
    if not reinstall:
        runProfile(portal, 'profile-my.package:uninstall')
        print >>out, quot;Uninstalled my.packagequot;
    return out.getvalue()




                                                  s ixf eet up. c om/ i mme r se
Make me a Zope 2 style product

<five:registerPackage package=quot;.quot; initialize=quot;.initializequot;/>




                                                   s ixf eet up. c om/ i mme r se
What did we learn?

•   The what and why of GenericSetup
•   Importing and exporting
•   Best practices
•   portal_setup vs. portal_quickinstaller




                                             s ixf eet up. c om/ i mme r se
Links


•   http://www.sixfeetup.com/swag/generic-setup-quick-reference-card
•   http://plone.org/documentation/manual/generic-setup/




                                                       s ixf eet up. c om/ i mme r se
Learn Plone by building a website from A to Z
1 non-profit project • 10 workshops • 14 mentors • 3 days


      s ixf eetup. com/im merse
                  Register by June 30th
                     and save $255!

More Related Content

What's hot

Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Nicholas Dionysopoulos
 
Epistemologia Y Etica
Epistemologia Y EticaEpistemologia Y Etica
Epistemologia Y Eticaguest975e56
 
Soundslide
SoundslideSoundslide
Soundslidetouptoup
 
True beauty is on the inside, but your users are shallow.
True beauty is on the inside, but your users are shallow.True beauty is on the inside, but your users are shallow.
True beauty is on the inside, but your users are shallow.
Loek van Gent
 
GAEO
GAEOGAEO
Soundslide
SoundslideSoundslide
Soundslidetsang021
 
Growing pains - PosKeyErrors and other malaises
Growing pains - PosKeyErrors and other malaisesGrowing pains - PosKeyErrors and other malaises
Growing pains - PosKeyErrors and other malaises
Philip Bauer
 
This Item Is No Longer Available
This Item Is No Longer AvailableThis Item Is No Longer Available
This Item Is No Longer Availablejoshncindy
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事
Sofish Lin
 
Old man emu by john williamson
Old man emu by john williamsonOld man emu by john williamson
Old man emu by john williamsonRobyn Scott
 
Set Focus SQL Portfolio
Set Focus SQL PortfolioSet Focus SQL Portfolio
Set Focus SQL Portfoliobrentbybee
 
Test Fest 2009
Test Fest 2009Test Fest 2009
Test Fest 2009
Pierre Joye
 
The Code
The CodeThe Code
The Code
Gary Barber
 
Mocking - Visug session
Mocking - Visug sessionMocking - Visug session
Mocking - Visug session
Maarten Balliauw
 

What's hot (18)

Seasion5
Seasion5Seasion5
Seasion5
 
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
 
Epistemologia Y Etica
Epistemologia Y EticaEpistemologia Y Etica
Epistemologia Y Etica
 
負荷分散の話
負荷分散の話負荷分散の話
負荷分散の話
 
Bfglog
BfglogBfglog
Bfglog
 
Soundslide
SoundslideSoundslide
Soundslide
 
True beauty is on the inside, but your users are shallow.
True beauty is on the inside, but your users are shallow.True beauty is on the inside, but your users are shallow.
True beauty is on the inside, but your users are shallow.
 
GAEO
GAEOGAEO
GAEO
 
Soundslide
SoundslideSoundslide
Soundslide
 
Growing pains - PosKeyErrors and other malaises
Growing pains - PosKeyErrors and other malaisesGrowing pains - PosKeyErrors and other malaises
Growing pains - PosKeyErrors and other malaises
 
This Item Is No Longer Available
This Item Is No Longer AvailableThis Item Is No Longer Available
This Item Is No Longer Available
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事
 
Old man emu by john williamson
Old man emu by john williamsonOld man emu by john williamson
Old man emu by john williamson
 
Set Focus SQL Portfolio
Set Focus SQL PortfolioSet Focus SQL Portfolio
Set Focus SQL Portfolio
 
Test Fest 2009
Test Fest 2009Test Fest 2009
Test Fest 2009
 
Soundslide
SoundslideSoundslide
Soundslide
 
The Code
The CodeThe Code
The Code
 
Mocking - Visug session
Mocking - Visug sessionMocking - Visug session
Mocking - Visug session
 

Similar to Generic Setup De-Mystified

JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph Pickl
Christoph Pickl
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Thorsten Kamann
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
Julian Simpson
 
Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1
Jeff Potts
 
Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Compare Infobase Limited
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
jeresig
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
Javier Eguiluz
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Jazkarta, Inc.
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в MagentoMagecom Ukraine
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
Eric Steele
 
Buildout: Fostering Repeatability
Buildout: Fostering RepeatabilityBuildout: Fostering Repeatability
Buildout: Fostering Repeatability
Clayton Parker
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
Wildan Maulana
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
Jess Chadwick
 
Troubleshooting Plone
Troubleshooting PloneTroubleshooting Plone
Troubleshooting PloneRicado Alves
 
Turbogears Presentation
Turbogears PresentationTurbogears Presentation
Turbogears Presentation
didip
 
Php
PhpPhp
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
IndicThreads
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Michael Wales
 

Similar to Generic Setup De-Mystified (20)

JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph Pickl
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1
 
Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
Buildout: Fostering Repeatability
Buildout: Fostering RepeatabilityBuildout: Fostering Repeatability
Buildout: Fostering Repeatability
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
 
Troubleshooting Plone
Troubleshooting PloneTroubleshooting Plone
Troubleshooting Plone
 
Turbogears Presentation
Turbogears PresentationTurbogears Presentation
Turbogears Presentation
 
Php
PhpPhp
Php
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
Satchmo
SatchmoSatchmo
Satchmo
 

More from Clayton Parker

Customizing Your Shell With Dotfiles
Customizing Your Shell With DotfilesCustomizing Your Shell With Dotfiles
Customizing Your Shell With Dotfiles
Clayton Parker
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
Clayton Parker
 
Fuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy MatchingFuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy Matching
Clayton Parker
 
Exploring Code with Pry!
Exploring Code with Pry!Exploring Code with Pry!
Exploring Code with Pry!
Clayton Parker
 
Zen and the Art of Python
Zen and the Art of PythonZen and the Art of Python
Zen and the Art of Python
Clayton Parker
 
So you think you can pdb?
So you think you can pdb?So you think you can pdb?
So you think you can pdb?
Clayton Parker
 
Managing Chaos: Merging 120 Sites into a single Plone Multisite Solution
Managing Chaos: Merging 120 Sites into a single Plone Multisite SolutionManaging Chaos: Merging 120 Sites into a single Plone Multisite Solution
Managing Chaos: Merging 120 Sites into a single Plone Multisite Solution
Clayton Parker
 
Current State of Python Packaging
Current State of Python PackagingCurrent State of Python Packaging
Current State of Python Packaging
Clayton Parker
 
Notre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with LineageNotre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with Lineage
Clayton Parker
 
Pioneer a Strategic Change in Content Organization with Plone
Pioneer a Strategic Change in Content Organization with PlonePioneer a Strategic Change in Content Organization with Plone
Pioneer a Strategic Change in Content Organization with Plone
Clayton Parker
 
Using Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the WorldUsing Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the World
Clayton Parker
 
Make Plone Search Act Like Google Using Solr
Make Plone Search Act Like Google Using SolrMake Plone Search Act Like Google Using Solr
Make Plone Search Act Like Google Using Solr
Clayton Parker
 
Migrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifierMigrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifier
Clayton Parker
 
Buildout for the Future
Buildout for the FutureBuildout for the Future
Buildout for the Future
Clayton Parker
 
Laying Pipe with Transmogrifier
Laying Pipe with TransmogrifierLaying Pipe with Transmogrifier
Laying Pipe with Transmogrifier
Clayton Parker
 
LDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in PloneLDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in Plone
Clayton Parker
 
Code with Style - PyOhio
Code with Style - PyOhioCode with Style - PyOhio
Code with Style - PyOhio
Clayton Parker
 
Code with style
Code with styleCode with style
Code with style
Clayton Parker
 
Using Buildout to Develop and Deploy Python Projects
Using Buildout to Develop and Deploy Python ProjectsUsing Buildout to Develop and Deploy Python Projects
Using Buildout to Develop and Deploy Python Projects
Clayton Parker
 

More from Clayton Parker (20)

Customizing Your Shell With Dotfiles
Customizing Your Shell With DotfilesCustomizing Your Shell With Dotfiles
Customizing Your Shell With Dotfiles
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
 
Fuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy MatchingFuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy Matching
 
Exploring Code with Pry!
Exploring Code with Pry!Exploring Code with Pry!
Exploring Code with Pry!
 
Zen and the Art of Python
Zen and the Art of PythonZen and the Art of Python
Zen and the Art of Python
 
So you think you can pdb?
So you think you can pdb?So you think you can pdb?
So you think you can pdb?
 
Managing Chaos: Merging 120 Sites into a single Plone Multisite Solution
Managing Chaos: Merging 120 Sites into a single Plone Multisite SolutionManaging Chaos: Merging 120 Sites into a single Plone Multisite Solution
Managing Chaos: Merging 120 Sites into a single Plone Multisite Solution
 
Current State of Python Packaging
Current State of Python PackagingCurrent State of Python Packaging
Current State of Python Packaging
 
Notre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with LineageNotre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with Lineage
 
Pioneer a Strategic Change in Content Organization with Plone
Pioneer a Strategic Change in Content Organization with PlonePioneer a Strategic Change in Content Organization with Plone
Pioneer a Strategic Change in Content Organization with Plone
 
Using Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the WorldUsing Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the World
 
Make Plone Search Act Like Google Using Solr
Make Plone Search Act Like Google Using SolrMake Plone Search Act Like Google Using Solr
Make Plone Search Act Like Google Using Solr
 
Migrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifierMigrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifier
 
Buildout for the Future
Buildout for the FutureBuildout for the Future
Buildout for the Future
 
Buildout future
Buildout futureBuildout future
Buildout future
 
Laying Pipe with Transmogrifier
Laying Pipe with TransmogrifierLaying Pipe with Transmogrifier
Laying Pipe with Transmogrifier
 
LDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in PloneLDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in Plone
 
Code with Style - PyOhio
Code with Style - PyOhioCode with Style - PyOhio
Code with Style - PyOhio
 
Code with style
Code with styleCode with style
Code with style
 
Using Buildout to Develop and Deploy Python Projects
Using Buildout to Develop and Deploy Python ProjectsUsing Buildout to Develop and Deploy Python Projects
Using Buildout to Develop and Deploy Python Projects
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Generic Setup De-Mystified

  • 1. GenericSetup De-mystified Clayton Parker Plone Symposium East 2009 nowhere to go but open source s ix fe e tup . co m / i mm e rs e
  • 2. Who am I? • Lead Developer at Six Feet Up, Inc. • claytron on IRC s ixf eet up. c om/ i mme r se
  • 3. What’s in store? • The what and why of GenericSetup • Importing and exporting • Best practices • portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
  • 4. What? • portal_quickinstaller replacement • CustomizationPolicy replacement • Site configuration • Upgrades s ixf eet up. c om/ i mme r se
  • 5. Why? “Persistence means always having to say you’re sorry” - Seaver’s Law s ixf eet up. c om/ i mme r se
  • 6. Install.py == sadness s ixf eet up. c om/ i mme r se
  • 7. GenericSetup Profiles • Base profile • Extension profile s ixf eet up. c om/ i mme r se
  • 8. What’s in a profile? <genericsetup:registerProfile name=quot;defaultquot; title=quot;My Packagequot; directory=quot;profiles/defaultquot; description=quot;My Package install profilequot; provides=quot;Products.GenericSetup.interfaces.EXTENSIONquot; /> • profile-<package_name>:<profile_name> • profile-my.package:default • my.package:default s ixf eet up. c om/ i mme r se
  • 9. On the filesystem my.package/my/package/ | |- configure.zcml |- exportimport/ | |- profiles/ | | | |- default/ | | | |- metadata.xml | |- my.package-default.txt | |- <other profile files> | |- setuphandlers.py |- upgrades.py s ixf eet up. c om/ i mme r se
  • 10. s ixf eet up. c om/ i mme r se
  • 11. s ixf eet up. c om/ i mme r se
  • 12. s ixf eet up. c om/ i mme r se
  • 13. s ixf eet up. c om/ i mme r se
  • 14. s ixf eet up. c om/ i mme r se
  • 15. metadata.xml <?xml version=quot;1.0quot;?> <metadata> <version>1.0</version> <dependencies> <dependency>profile-my.theme:default</dependency> <dependency>profile-my.other.package:default</dependency> </dependencies> </metadata> s ixf eet up. c om/ i mme r se
  • 16. s ixf eet up. c om/ i mme r se
  • 17. Careful with that axe, Eugene... s ixf eet up. c om/ i mme r se
  • 18. s ixf eet up. c om/ i mme r se
  • 19. Tell me more • Profile for initial site setup • Upgrade steps s ixf eet up. c om/ i mme r se
  • 20. Upgrade steps <genericsetup:upgradeStep title=quot;Setup calendarquot; description=quot;Modify the calendar settingsquot; source=quot;0.9quot; destination=quot;1.0quot; handler=quot;.upgrades.setupCalendarquot; sortkey=quot;10quot; profile=quot;my.package:defaultquot; /> s ixf eet up. c om/ i mme r se
  • 21. Upgrade steps from Products.CMFCore.utils import getToolByName def setupCalendar(context): ctool = getToolByName(context, 'portal_calendar') cal_types = list(ctool.calendar_types) if 'MyEventType' not in cal_types: cal_types.append('MyEventType') ctool.calendar_types = cal_types s ixf eet up. c om/ i mme r se
  • 22. Best Practices • Uninstall profiles • Trim the export • Be aware of other profiles s ixf eet up. c om/ i mme r se
  • 23. <property name=quot;metaTypesNotToListquot; type=quot;linesquot;> <element value=quot;ATBooleanCriterionquot;/> <element value=quot;ATDateCriteriaquot;/> <element value=quot;ATDateRangeCriterionquot;/> <element value=quot;ATListCriterionquot;/> ... </property> <property name=quot;metaTypesNotToListquot; type=quot;linesquot; purge=quot;Falsequot;> <element value=quot;Imagequot;/> <element value=quot;Filequot;/> </property> s ixf eet up. c om/ i mme r se
  • 24. portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
  • 25. def install(portal): quot;quot;quot;Run the GS profile to install this packagequot;quot;quot; out = StringIO() runProfile(portal, 'profile-my.package:default') print >>out, quot;Installed my.packagequot; return out.getvalue() def uninstall(portal, reinstall=False): quot;quot;quot;Run the GS profile to install this packagequot;quot;quot; out = StringIO() if not reinstall: runProfile(portal, 'profile-my.package:uninstall') print >>out, quot;Uninstalled my.packagequot; return out.getvalue() s ixf eet up. c om/ i mme r se
  • 26. Make me a Zope 2 style product <five:registerPackage package=quot;.quot; initialize=quot;.initializequot;/> s ixf eet up. c om/ i mme r se
  • 27. What did we learn? • The what and why of GenericSetup • Importing and exporting • Best practices • portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
  • 28. Links • http://www.sixfeetup.com/swag/generic-setup-quick-reference-card • http://plone.org/documentation/manual/generic-setup/ s ixf eet up. c om/ i mme r se
  • 29. Learn Plone by building a website from A to Z 1 non-profit project • 10 workshops • 14 mentors • 3 days s ixf eetup. com/im merse Register by June 30th and save $255!