SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
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!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie Generic Setup De-Mystified

JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklChristoph 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 MavenThorsten Kamann
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as codeJulian Simpson
 
Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1Optaros Surf Code Camp Walkthrough 1
Optaros Surf Code Camp Walkthrough 1Jeff 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 Librariesjeresig
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4Javier 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 InteractivityEric Steele
 
Buildout: Fostering Repeatability
Buildout: Fostering RepeatabilityBuildout: Fostering Repeatability
Buildout: Fostering RepeatabilityClayton Parker
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan 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 Presentationdidip
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing frameworkIndicThreads
 
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
 

Ähnlich wie 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
 

Mehr von Clayton Parker

Customizing Your Shell With Dotfiles
Customizing Your Shell With DotfilesCustomizing Your Shell With Dotfiles
Customizing Your Shell With DotfilesClayton Parker
 
Fuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy MatchingFuzzy Feelings for Fuzzy Matching
Fuzzy Feelings for Fuzzy MatchingClayton 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 PythonClayton 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 SolutionClayton Parker
 
Current State of Python Packaging
Current State of Python PackagingCurrent State of Python Packaging
Current State of Python PackagingClayton Parker
 
Notre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with LineageNotre Dame Seamless Syndication with Lineage
Notre Dame Seamless Syndication with LineageClayton 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 PloneClayton 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 WorldClayton 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 SolrClayton 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 transmogrifierClayton Parker
 
Buildout for the Future
Buildout for the FutureBuildout for the Future
Buildout for the FutureClayton Parker
 
Laying Pipe with Transmogrifier
Laying Pipe with TransmogrifierLaying Pipe with Transmogrifier
Laying Pipe with TransmogrifierClayton 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 PloneClayton Parker
 
Code with Style - PyOhio
Code with Style - PyOhioCode with Style - PyOhio
Code with Style - PyOhioClayton 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 ProjectsClayton Parker
 

Mehr von 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
 

Kürzlich hochgeladen

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Kürzlich hochgeladen (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

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!