SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
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!

Contenu connexe

Tendances

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

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!