pygrunn - buildout presentation
TRANSCRIPT
GW20e presentatie template
write once, deploy often
Creating repeatable environments with Buildout
About me
Kim Chee LeongPython developer since May 2007
Server administrator
Google Android developer
Introduction
A bit of history
What is buildout and what can I do with it?
Buildout basics and examples
A bit of history
Buildout originated from the Zope/Plone community
Setting up an application deployment was repetitive and tedious
There is a need for creating repeatable DTAP deployments
What is buildout
Support for creating application deployments
Assembling applications from multiple parts, Python or otherwise
An application may actually contain multiple programs, processes, and configuration settings
What can I do with buildout
Deploy DTAP* environments with one buildout
It's repeatable and reusable
* Development, Testing, Acceptance, Production
Simple buildout config
[buildout]develop = src/helloparts = hello-buildout
[hello-buildout]recipe = zc.recipe.egginterpreter = pyeggs = hello
Multiple configuration files
[buildout]extends = buildout-base.cfg supervisor.cfg pound.cfg prd-settings.cfg prd-version.cfg
parts += instance0 ...
Variable substitutions
[cluster]int-ip = 192.168.10.1supervisor-port = 38080
[supervisor]recipe = collective.recipe.supervisorport = ${cluster:int-ip}:${cluster:supervisor-port}serverurl = http://${cluster:int-ip}:${cluster:supervisor-port}programs = 20 instance ${instance:location}/bin/runzope ${instance:location} true 80 pound ${buildout:directory}/bin/poundrun
Buildout recipes
zc.recipe.eggplone.recipe.commandzc.recipe.cmmicollective.recipe.patchcollective.recipe.supervisorgocept.nginxmr.developer
Example buildout config
[buildout]parts = pyramideggs = ZopeSkel
extensions = mr.developersources = sourcesauto-checkout = opsbqueue gw20e.forms
[sources]opsbqueue = svn https://svn.gw20e.com/oosterpoort/eggs/opsbqueue gw20e.forms = svn https://svn.plone.org/svn/collective/gw20e.forms/trunk [pyramid]recipe = zc.recipe.egginterpreter = pyeggs = pyramid opsbqueue gw20e.forms
GW20e default buildout
Running buildout
~/buildout$ python bootstrap.py~/buildout$ ./bin/buildout
Wrapping up
Use buildout deploying applications in complex environments
Powerful buildout recipes
Include non-Python components
Write once, deploy often!
Useful links
http://www.slideshare.net/kaceeleong
http://www.buildout.org/
http://pypi.python.org/
http://pypi.python.org/pypi/zc.buildout
http://pypi.python.org/pypi/djangorecipe
http://www.lorenzogil.com/blog/2010/10/29/python-deployment-tips/
Photo credits
http://www.flickr.com/photos/zoofythejinx/255395476/
http://www.flickr.com/photos/84904494@N00/4448987029/
http://www.flickr.com/photos/jflinchbaugh/3217536666/
http://www.flickr.com/photos/17258892@N05/2588347668/
http://www.flickr.com/photos/sonnyandsandy/33708059/
http://www.flickr.com/photos/a_ninjamonkey/3294014627/