Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Buildout for the Future

on

  • 2,069 views

Buildout is a great tool for creating repeatable environments. But what happens when things change and you are left with a broken buildout? This talk will focus on creating a buildout that can survive ...

Buildout is a great tool for creating repeatable environments. But what happens when things change and you are left with a broken buildout? This talk will focus on creating a buildout that can survive the test of time. The talk will cover how to keep your packages pinned so that releases don't cause you headaches. We will also discuss how to set up your own package server in order to make sure that you always have the packages that you need.

Statistics

Views

Total Views
2,069
Views on SlideShare
2,068
Embed Views
1

Actions

Likes
3
Downloads
32
Comments
1

1 Embed 1

http://coderwall.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Buildout for the Future Buildout for the Future Presentation Transcript

  • Buildout for the Future Clayton Parker, Senior Web Developer PLONE CONFERENCE 2010 Thursday, October 28, 2010
  • Who Am I? PLONE CONFERENCE 2010 • claytron • Python dev since 2003 • Plone Core Committer • Foundation Member Thursday, October 28, 2010
  • What Will We PLONE CONFERENCE 2010 Learn? • Pinning • Indexes • Buildout Tricks Thursday, October 28, 2010
  • Problems with PLONE CONFERENCE 2010 Buildout • PyPi • Lost/deleted packages • Version conflicts Thursday, October 28, 2010
  • Pinning Versions PLONE CONFERENCE 2010 • [versions] • Local config • Extended URLs Thursday, October 28, 2010
  • Versions PLONE CONFERENCE 2010 [buildout] # tell buildout to use the [versions] part versions = versions [versions] my.package = 1.0 some.other.package = 2.0 Thursday, October 28, 2010
  • Plone Versions PLONE CONFERENCE 2010 [buildout] extends = http://dist.plone.org/release/4.0.1/versions.cfg Thursday, October 28, 2010
  • Plone versions.cfg PLONE CONFERENCE 2010 [buildout] extends = http://download.zope.org/Zope2/index/2.12.11/versions.cfg [versions] # Buildout infrastructure plone.recipe.zope2instance = 4.0.4 plone.recipe.zeoserver = 1.1.1 ... # External dependencies Markdown = 2.0.3 PIL = 1.1.6 ... # Plone release Plone= 4.0.1 ... Thursday, October 28, 2010
  • Zope versions.cfg PLONE CONFERENCE 2010 [buildout] versions = versions [versions] Zope2 = 2.12.11 ... Thursday, October 28, 2010
  • Our versions.cfg PLONE CONFERENCE 2010 ## buildout.cfg [buildout] extends = http://dist.plone.org/release/4.0.1/versions.cfg versions.cfg ## versions.cfg [versions] my.package = 1.0 some.other.package = 2.0 Thursday, October 28, 2010
  • Getting Versions PLONE CONFERENCE 2010 $ bin/buildout -v ... Installing instance We have the distribution that satisfies 'Plone==4.0.1'. We have the distribution that satisfies 'plone.app.caching==1.0b1'. We have the distribution that satisfies 'plone.app.ldap==1.2.3'. We have the distribution that satisfies 'plone.reload==1.5'. We have the distribution that satisfies 'zope.testrecorder==0.4'. We have the distribution that satisfies 'Products.PDBDebugMode==1.1'. We have the distribution that satisfies 'Products.PrintingMailHost==0.7'. We have the distribution that satisfies 'Products.DocFinderTab==1.0.4'. We have the distribution that satisfies 'Products.signalstack==1.0rc2'. We have the distribution that satisfies 'Products.PTProfiler==1.4'. We have the distribution that satisfies 'Products.DCWorkflowGraph==0.4'. We have the distribution that satisfies 'ipdb==0.2'. We have the distribution that satisfies 'plone.recipe.zope2instance==4.0.4'. Getting required 'Zope2==2.12.11' We have the distribution that satisfies 'Zope2==2.12.11'. Thursday, October 28, 2010
  • Dump Picked PLONE CONFERENCE 2010 Versions [buildout] extensions = buildout.dumppickedversions Thursday, October 28, 2010
  • Dump Picked PLONE CONFERENCE 2010 Versions $ bin/buildout -v ... *************** PICKED VERSIONS **************** [versions] PILwoTk = 1.1.6.4 Products.DCWorkflowGraph = 0.4 Products.DocFinderTab = 1.0.4 Products.PDBDebugMode = 1.1 Products.PTProfiler = 1.4 Products.PrintingMailHost = 0.7 Products.signalstack = 1.0rc2 ipdb = 0.2 plone.app.caching = 1.0b1 plone.app.ldap = 1.2.3 zope.testrecorder = 0.4 *************** /PICKED VERSIONS *************** Thursday, October 28, 2010
  • Extended URLs PLONE CONFERENCE 2010 [buildout] extends = # Plone's set of version dependencies http://dist.plone.org/release/4.0.1/versions.cfg # specific versions for plone.app.caching package http://good-py.appspot.com/release/plone.app.caching/1.0b1 # our version overrides and add-on packages versions.cfg Thursday, October 28, 2010
  • Public Indexes PLONE CONFERENCE 2010 • PyPi • Mirrors • Plone dist • http://dist.plone.org/ • Company dist • http://dist.company.com/public/ Thursday, October 28, 2010
  • Find Links PLONE CONFERENCE 2010 [buildout] find-links = http://dist.plone.org/release/4.0.1/ [buildout] plone-version = 4.0.1 extends = http://dist.plone.org/release/${:plone-version}/versions.cfg find-links = http://dist.plone.org/release/${:plone-version}/ Thursday, October 28, 2010
  • Private Indexes PLONE CONFERENCE 2010 • Customer eggs • Customer archives • Not ready for pypi • Branches / trunk Thursday, October 28, 2010
  • Solutions PLONE CONFERENCE 2010 • Apache / nginx • Plone Software Center • basketweaver • haufe.eggserver • ClueReleaseManager Thursday, October 28, 2010
  • Apache PLONE CONFERENCE 2010 • Use directory listings • Basic auth for protection • mod_ldap for integration Thursday, October 28, 2010
  • Config PLONE CONFERENCE 2010 <Location /private/myproject> AuthType Basic AuthName "myproject" # hook up to ldap or a password file # ... </Location> Thursday, October 28, 2010
  • lovely.buildouthttp PLONE CONFERENCE 2010 • Access private egg repos • Also tied into download recipes myproject,https://dist.example.com/private/myproject,username,password Thursday, October 28, 2010
  • Releasing Eggs PLONE CONFERENCE 2010 • jarn.mkrelease • zest.releaser Thursday, October 28, 2010
  • ~/.pypirc PLONE CONFERENCE 2010 [distutils] index-servers = pypi plone.org [pypi] username: username password: password [plone.org] repository: http://plone.org/products username: username password: password Thursday, October 28, 2010
  • ~/.mkrelease PLONE CONFERENCE 2010 [defaults] distbase = distdefault = public [aliases] public = dist.company.com:/var/dist/public myproject = dist.company.com:/var/dist/private/myproject world = public pypi plone-world = world plone.org Thursday, October 28, 2010
  • mkrelease PLONE CONFERENCE 2010 $ mkrelease -d myproject $ mkrelease -d public $ mkrelease -d plone-world Thursday, October 28, 2010
  • Buildout Profiles PLONE CONFERENCE 2010 • Debugging / local dev • Production Thursday, October 28, 2010
  • Profiles PLONE CONFERENCE 2010 my-buildout "## buildout.cfg "## parts "## profiles $   "## base.cfg $   "## debug.cfg $   "## local.cfg $   "## prod.cfg $   &## versions.cfg &## var Thursday, October 28, 2010
  • Annotate PLONE CONFERENCE 2010 • Check config • Debug issues • Verify settings Thursday, October 28, 2010
  • Annotate PLONE CONFERENCE 2010 $ bin/buildout annotate $ bin/buildout -c profiles/prod.cfg annotate Thursday, October 28, 2010
  • Check out .co m/d emos s ixfeetup Thursday, October 28, 2010