######################################################################################################################## # PLONE BUILDOUT # # # WARNING ABOUT BUILOOUT BOOTSTRAP WARNING # -------------------------------------------- # If you are using the standalone (choose to answer inside_minitage=no), you must ensure to do the # $python bootstrap.py dance with a python compatible with the targeted zope installation (python 2.4/plone3 python 2.6/plone4) # eg: cd test && python2.4 bootstrap.py && bin/buildout -vvvvvvc # # # Minitage users, don't worry about that, all is setted for you in the two minibuilds created for you, # just issue minimerge -v after installing the minilay in your MINITAGE/minilays directory. # # # Create a first plonesite object # --------------------------------- # run buildout -c install plonesite # # # DEVELOP MODE # --------------- # To develop your application, run the buildout-dev.cfg buildout, it extends this one but: # * it comes with development tools. # * it configures the instance to be more verbose (debug mode & verbose security) # # # PRODUCTION MODE # --------------- # To make your application safe for production, run the 'buildout-prod.cfg buildout'. # It extends this one with additionnal crontabs and backup scripts and some additionnal instances creation. # # # PLONE Official buildouts Integration # -------------------------------------------- # The original etc/plone/plone3.version.cfg is the original pinned version file for your plone3 release maintened by the official plone folks. # The original etc/plone/plone3.buildout.cfg is the one maintened by the plone.org's guys through the package ZopeSkel (plone3_buildout). # The parts in this buildout extends/overwrite this file, you can read it to get additionnal documentation. # You must enter speicfic project settings in the etc/test.cfg file. # # # LAYOUT # --------- # Think you have the most important sections of this buildout configuration in etc/test.cfg # Base buildouts: # |-- buildout-dev.cfg -> buildout for development # |-- buildout-prod.cfg -> buildout for production # |-- minitage/minitage.buildout-dev.cfg -> buildout for development with minitage support (including xml libs, ldap, dbs; python, dependencies & common eggs cache for things like lxml or PIL) # `-- minitage/minitage.buildout-prod.cfg -> buildout for production with minitage support (including xml libs, ldap, dbs; python, dependencies & common eggs cache for things like lxml or PIL) # # # Crons # |-- cron_scripts= # | |-- fss_daily.sh -> backup script for fss # # # Configuration files # |-- etc # |-- |-- base.cfg -> this base buildout # | |-- sys.cfg -> Sysadmin related informations like paths, ports, users and log levels # # Per os install helpers to install popular tools around zope/plone dev (not supported, just here for your conveniance, READ BEFORE USING THEM) # And you'd better have to learn how to bootstrap some minitage environement out there, funny and secure! # | |-- os/debian.sh -> debian specific # | |-- os/opensuse-dev.sh -> opensuse/dev specific # | |-- os/opensuse.sh -> suse specific # | |-- os/osx.sh -> osx specific # | `-- os/ubuntu.sh -> ubuntu specific # # Minitage support # | |-- minitage/minitage.cfg -> some buildout tweaks to run in the best of the world with minitage # # Project specific # | |-- project/cluster.cfg -> define new zope instances here & also their FileSystemStorage if any. # | |-- project/sources.cfg -> externals sources of your project # | |-- project/patches.cfg -> patches used on the project # | |-- project/versions.cfg -> minimal version pinning for installing your project # | |-- project/test.cfg -> your project needs (packages, sources, products # | |-- project/test-kgs.cfg -> Generated KGS for your project (minitage's printer or buildout.dumppickledversion) # # Configuration templates # | |-- templates/balancer.conf.template_tmpl -> haproxy template. # | | Copy or ln the generated file 'etc/loadbalncing/balancer.conf' to your haproxy installation if any. # | |-- templates/fss_daily.sh.in_tmpl -> FSS daily backup script template # | |-- templates/logrotate.conf.template_tmpl -> logrotate configuration file template for your Zope logs # # Plone specific # | |-- plone/plone3.buildout.cfg -> official plone3 buildout # | |-- plone/plone3.versions.cfg -> official plone3 buildout kgs # | |-- plone/experimental.cfg -> experimental plone code # | |-- plone/dancing.cfg -> singing & dancing particular buildout # # Paster (WSGI) # | |-- wsgi/prod.ini -> paster production configuration for running in wsgi mode # | |-- wsgi/dev.ini -> paster development configuration for running in wsgi mode # # Backends # | |-- backends/relstorage.cfg -> relstorage configuration if any # | |-- backends/zeo.cfg -> zeoserver configuration if any # | |-- backends/zodb.cfg -> Filestorage configuration if any # | |-- backends/solr.cfg -> Solr configuration if any # | `-- backends/fss.cfg -> FSS configuration if any # # # KGS FILE # ---------- # We provide a part to generate the etc/test-kgs.cfg file. # This will allow you to freeze software versions known to work with your project and make reproducible environment. # This file will be generated the first time that you run buildout. # To un it, just run bin/buildout -vvvvvvv -c install kgs # To unlock the versions, cmment out the according statement "etc/test-kgs}.cfg in the extends option of the test.cfg gile. # # # FOR RELSTORAGE SUPPORT # ------------------------- # * We use the ZODB as an egg which is patched during installation, please see # the zoopy section and also the minitage.recipe documentation on patching an # egg. # The egg is on your cache with a particular version, the classical ZODB3 egg wont be touched if you have one. # WHAT IS VERY IMPORTANT is that [zopepy] part must run BEFORE [instance] to get the version with appropriate patches pinned. # # # As we support WSGI, there is an important thing to know: # 'zopelib' is an egg from repoze where live the zope code, we # totally do not NEED it, it's useless and make things buggy. # We build zopelib as a fake egg, as we have already zope in our # PYTHONPATH. # If you raelly want zopelib as an egg, (un)comment things in the buildout(develop, patch). But i am use, you dont have to ! # TO run in WSGI with repoze.zope2: # bin/paster serve etc/wsgi/dev.ini # bin/paster serve etc/wsgi/prod.ini # # # A word about minitage.paste instances # -------------------------------------- # You are maybe wondering why this big buildout do not have out of the box those fancy monitoring, load-balancing or speedy databases support. # # For the author, System programs that are not well integrated via buildout and most of all not written in python don't really have to be deployed via that buildout. # And most of all, you ll surelly have head aches to make those init-scripts or rotation logs configurations right. # Because the recipe which do them don't support it or other problems more or less spiritual. # # Keep in mind that in Unix, one thing must do one purpose, and do it well. And many sysadmins don't want to run a buildout # to generate a configuration file or build their loadbalancer, They want to edit in place, at most fetch the configuration file from somewhere and adapt,that's all. # # Nevertheless, as usual, they are exceptions: # - supervisor which is well integrated. So supervisor is deployed along in the production buildout if any. # - We generate through buildout a haproxy configuration file # # That's because we support that throught 'minitage.paste.instances'. Those are templates which create some instance of some program # inside a subdirectory which is: # * sys/ inside a minitage project # * ADirectoryOfYourChoice/ if your are not using minitage # This significate that you can install a lot of things along with your project with: # - minitage/bin/easy_install -U minitage.paste (or get it via buildout) # - paster create -t projectname|subdirectoryName inside_minitage=y|n # Where TEMPLATE_NAME can be (run paster create --list-templates|grep minitage.instances to get an up2date version): # * minitage.instances.apache: Template for creating an apache instance # * minitage.instances.env: Template for creating a file to source to get the needed environnment variables for playing in the shell or for other templates # * minitage.instances.mysql: Template for creating a postgresql instance # * minitage.instances.nginx: Template for creating a nginx instance # * minitage.instances.paste-initd: Template for creating init script for paster serve # * minitage.instances.postgresql: Template for creating a postgresql instance # * minitage.instances.varnish: Template for creating a varnish instance # * minitage.instances.varnish2: Template for creating a varnish2 instance # Note that if you are using minitage, you ll have better to add dependencies inside your minibuild and run minimerge to build them prior to run the paster command # For example, to add a postgresql instance to your project, you will have to issue those steps: # * $EDITOR minitage/minilays/%(project)s_minilay/$(project)s -> add postgresql-8.4 to the dependencies list # * minimerge -v $(project)s # install what was not, and surely at least postgresql-8.4 # * minitage/bin/paster create -t minitage.instance.postgresql ${project} # * Then to start the postgres : zope/$(project)s/sys/etc/init.d/$(project)s_postgresql restart ######################################################################################################################## [buildout] timeout=3 extensions = buildout.minitagificator mr.developer extends-cache = ${buildout:directory}/etc/cache # this allow you to run buildout on offline mode and to use only the downloaded plonev3.versions.cfg extends -= http://dist.plone.org/1elease/3.3.4/versions.cfg extends = plone/plone3.versions.cfg plone/plone3.buildout.cfg project/patches.cfg project/sources.cfg sys.cfg backends/solr.cfg project/newsletter.cfg project/versions.cfg project/test-kgs.cfg project/test.cfg parts += backup instance-newsletter # fss-newsletter # fss solr solrinstance backup mkdirs omelette find-links = ${groups:find-links} eggs += zopelib develop += ${buildout:directory}/src.mrdeveloper/zopelib # see http://pypi.python.org/pypi/mr.developer for documentation versions = versions sources = sources # auto tracked developement products, see test.cfg [sources] # Zope operating instances are created elsewhere. # For options see http://pypi.python.org/pypi/plone.recipe.zope2install [zope2] # fake eggs are required to satisfy Zope dependencies while # zope is not yet eggified. fake-zope-eggs = true additional-fake-eggs += ZConfig pytz skip-fake-eggs += ZODB3 # eggs & scripts installation [zopepy] recipe = minitage.recipe.scripts # Important for you to note the installation of the ZODB as an egg . We will not # use the zodb code from the zope source distribution !!!!!!! eggs = ${instance:eggs} interpreter = zopepy env-file=${buildout:directory}/etc/test.env # here is defined the Zope instance running your plone site # beware that zopepy part must run before isntance in order to have the right version # pinned for relstorage [instance] order=${zopepy:recipe} http-address=${hosts:instance}:${ports:instance} user = ${zope:user}:${zope:password} session-timeout-minutes = ${cache:session-timeout-minutes} verbose-security=${zope:verbose-security} debug-mode=${zope:debug-mode} event-log-level=${zope:event-log-level} z2-log-level=${zope:z2-log-level} extra-paths+= ${zope2:location}/lib/python ${buildout:extra-paths} # KGS generation [kgs] recipe=minitage.recipe.printer quiet= eggs=${instance:eggs} [backup] recipe = collective.recipe.backup # Traditionnal Plone products to install [productdistros] recipe = plone.recipe.distros urls=${groups:products-urls} version-suffix-packages = ${groups:version-suffix-packages} nested-packages = ${groups:nested-packages} [omelette] recipe = collective.recipe.omelette eggs = ${instance:eggs} products = ${instance:products} packages = ${zope2:location}/lib/python ./ # Command below is important # if not, fss tests or tests using fss in their configuration will fail [mkdirs] recipe = plone.recipe.command update-command = ${mkdirs:command} command += # vim: set ft=cfg: