Buildout: Fostering
   Repeatability
         Clayton Parker
   Plone Symposium East 2009




               nowhere to go...
Who am I?


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




                                          s ix...
What’s in store?
•   What is buildout?
•   How to get one
•   Syntax
•   Pinning
•   Recipes
•   Command line usage


    ...
Why buildout?




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




                      s ixf eet up. c om/ i mme r se
Roll Your Own


•   Installer
•   ZopeSkel




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

 $ easy_install ZopeSkel
 $ paster create --list-templates
 ...
 plone3_buildout:    A buildout for Plone 3 proj...
Lingo


 s ixf eet up. c om/ i mme r se
Syntax
   [buildout]
   parts = zope2 instance

   # copied from dist.plone.org/release
   extends = plone-versions.cfg
  ...
Advanced Syntax
  Variable Substitution
     ${part:option}

     ${zope2:location}
     ${buildout:directory}
     option...
Reserved Characters


        :$ % { }


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




          s ixf eet up. c om/ i mme r se
[buildout]
...
extends = http://dist.plone.org/release/3.2.2/versions.cfg
versions = versions




                        ...
[versions]
# Buildout infrastructure
plone.recipe.zope2install = 2.6
plone.recipe.zope2instance = 2.7
zc.buildout = 1.1.1
...
[buildout]
...
extends = http://dist.plone.org/release/3.2.2/versions.cfg
versions = versions

[versions]
plone.recipe.zop...
mybuildout
         |
         |-buildout.cfg
         |-versions.cfg



[buildout]
...
extends =
    http://dist.plone.or...
Recipes


          s ixf eet up. c om/ i mme r se
[plonesite]
recipe = collective.recipe.plonesite
instance = instance
zeoserver = zeoserver
site-id = Plone
admin-user = ad...
Command Line




               s ixf eet up. c om/ i mme r se
Baby Steps
  $ cd path/to/mybuildout

  $ python2.4 bootstrap.py
  Creating directory 'mybuildout/bin'.
  Creating directo...
Options
•   -v and -q
    •    increase and decrease verbosity
•   -n and -N
    •    Newest and non-newest modes
•   -O a...
Update your buildout

   $ bin/buildout -v

   $ bin/buildout -Nvvv

   $ bin/buildout -No

   $ bin/buildout -t 10




  ...
Assignments
   $ bin/buildout instance:debug-mode=on

   $ bin/buildout buildout:log-level=70

   $ bin/buildout -N instan...
Commands

  $ bin/buildout install

  $ bin/buildout -Nv install zope2 instance

  $ bin/buildout -nv install instance



...
What did we learn?
•   What is buildout?
•   How to get one
•   Syntax
•   Pinning
•   Recipes
•   Command line usage


  ...
Links
•   http://buildout.org
•   http://pypi.python.org/pypi/zc.buildout
•   https://svn.sixfeetup.com/svn/public/buildou...
Learn Plone by building a website from A to Z
1 non-profit project • 10 workshops • 14 mentors • 3 days


      s ixf eetup...
Photo Credits
•   http://flickr.com/photos/monsieurlam/2645956083/
•   http://flickr.com/photos/_boris/2796908072/
•   http:...
Upcoming SlideShare
Loading in...5
×

Buildout: Fostering Repeatability

1,764

Published on

This is a 'talk' version of my Plone Conference tutorial with some updated slides.

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

No Downloads
Views
Total Views
1,764
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Buildout: Fostering Repeatability

  1. 1. Buildout: Fostering Repeatability 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. 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. 3. What’s in store? • What is buildout? • How to get one • Syntax • Pinning • Recipes • Command line usage s ixf eet up. c om/ i mme r se
  4. 4. Why buildout? s ixf eet up. c om/ i mme r se
  5. 5. Eliminate Confusion s ixf eet up. c om/ i mme r se
  6. 6. Roll Your Own • Installer • ZopeSkel s ixf eet up. c om/ i mme r se
  7. 7. ZopeSkel $ easy_install ZopeSkel $ paster create --list-templates ... plone3_buildout: A buildout for Plone 3 projects $ paster create -t plone3_buildout mybuildout s ixf eet up. c om/ i mme r se
  8. 8. Lingo s ixf eet up. c om/ i mme r se
  9. 9. Syntax [buildout] parts = zope2 instance # copied from dist.plone.org/release extends = plone-versions.cfg versions = versions [zope2] recipe = plone.recipe.zope2install url = ${versions:zope2-url} fake-zope-eggs = True additional-fake-eggs = ZODB3 ZConfig [instance] recipe = plone.recipe.zope2instance zope2-location = ${zope2:location} user = admin:admin eggs = Plone s ixf eet up. c om/ i mme r se
  10. 10. Advanced Syntax Variable Substitution ${part:option} ${zope2:location} ${buildout:directory} option = ${buildout:directory}/somefolder Option Addition and Removal options = foo bar options += baz options -= foo s ixf eet up. c om/ i mme r se
  11. 11. Reserved Characters :$ % { } s ixf eet up. c om/ i mme r se
  12. 12. Pinning s ixf eet up. c om/ i mme r se
  13. 13. [buildout] ... extends = http://dist.plone.org/release/3.2.2/versions.cfg versions = versions s ixf eet up. c om/ i mme r se
  14. 14. [versions] # Buildout infrastructure plone.recipe.zope2install = 2.6 plone.recipe.zope2instance = 2.7 zc.buildout = 1.1.1 zc.recipe.egg = 1.1.0 zope2-url = http://www.zope.org/Products/Zope/2.10.7/ Zope-2.10.7-final.tgz # Plone release Plone = 3.2.2 Products.ATContentTypes = 1.2.7 Products.ATReferenceBrowserWidget = 2.0.3 plone.app.viewletmanager = 1.2.1 plone.app.vocabularies = 1.0.6 plone.app.workflow = 1.1.5 plone.browserlayer = 1.0.0 plone.contentrules = 1.1.0 s ixf eet up. c om/ i mme r se
  15. 15. [buildout] ... extends = http://dist.plone.org/release/3.2.2/versions.cfg versions = versions [versions] plone.recipe.zope2install = 3.0 s ixf eet up. c om/ i mme r se
  16. 16. mybuildout | |-buildout.cfg |-versions.cfg [buildout] ... extends = http://dist.plone.org/release/3.2.2/versions.cfg versions.cfg versions = versions s ixf eet up. c om/ i mme r se
  17. 17. Recipes s ixf eet up. c om/ i mme r se
  18. 18. [plonesite] recipe = collective.recipe.plonesite instance = instance zeoserver = zeoserver site-id = Plone admin-user = admin products = profiles-initial = my.package:initial profiles = my.package:default s ixf eet up. c om/ i mme r se
  19. 19. Command Line s ixf eet up. c om/ i mme r se
  20. 20. Baby Steps $ cd path/to/mybuildout $ python2.4 bootstrap.py Creating directory 'mybuildout/bin'. Creating directory 'mybuildout/parts'. Creating directory 'mybuildout/develop-eggs'. Generated script 'mybuildout/bin/buildout'. $ bin/buildout $ bin/instance start s ixf eet up. c om/ i mme r se
  21. 21. Options • -v and -q • increase and decrease verbosity • -n and -N • Newest and non-newest modes • -O and -o • online and offline mode • -t • socket timeout s ixf eet up. c om/ i mme r se
  22. 22. Update your buildout $ bin/buildout -v $ bin/buildout -Nvvv $ bin/buildout -No $ bin/buildout -t 10 s ixf eet up. c om/ i mme r se
  23. 23. Assignments $ bin/buildout instance:debug-mode=on $ bin/buildout buildout:log-level=70 $ bin/buildout -N instance:debug-mode=on -v $ bin/buildout -Nv plonesite:enabled=false $ bin/buildout plonesite:site-replace=true s ixf eet up. c om/ i mme r se
  24. 24. Commands $ bin/buildout install $ bin/buildout -Nv install zope2 instance $ bin/buildout -nv install instance s ixf eet up. c om/ i mme r se
  25. 25. What did we learn? • What is buildout? • How to get one • Syntax • Pinning • Recipes • Command line usage s ixf eet up. c om/ i mme r se
  26. 26. Links • http://buildout.org • http://pypi.python.org/pypi/zc.buildout • https://svn.sixfeetup.com/svn/public/buildout/debug.cfg • http://www.sixfeetup.com/swag/buildout-quick-reference-card • http://plone.org/documentation/tutorial/buildout • http://pypi.python.org s ixf eet up. c om/ i mme r se
  27. 27. 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!
  28. 28. Photo Credits • http://flickr.com/photos/monsieurlam/2645956083/ • http://flickr.com/photos/_boris/2796908072/ • http://flickr.com/photos/b-tal/163450213/ • http://flickr.com/photos/bullish1974/2648544508/ • http://flickr.com/photos/haydnseek/87432002/ • http://flickr.com/photos/disowned/1158260369/ • http://flickr.com/photos/7603557@N08/2662531345/ • http://flickr.com/photos/julishannon/2151986631/ • http://flickr.com/photos/julishannon/2152778524/ • http://flickr.com/photos/lollyknit/1155225799/ • http://flickr.com/photos/binary_koala/86227485/ • http://flickr.com/photos/marcoveringa/2951042391 s ixf eet up. c om/ i mme r se
  1. A particular slide catching your eye?

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

×