{ "info": { "author": "John Carr", "author_email": "john.carr@isotoma.com", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Framework :: Buildout :: Recipe", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX" ], "description": "Post-deploy\n===========\n\nThis recipe is for people wanting to ease themselves into configuration\nmanagement. It provides the power of a full configuration management system\n(Yaybu) but in a way that integrates with your buildout configuration.\n\nYou can:\n\n * Use it as a way to check a task is complete using its \"simulate\" mode. If\n someone forgets to symlink in a new config file, simulate will show you!\n\n * Monitor for files being manually modified outside of your buildout process.\n Wire the simulate command into Nagios and alert when the exit code isn't 254\n as that means your service needs attention!\n\n * And obviously, automate tasks that you normally run after buildout that\n require elevated priveleges such as setting up log rotation, enabling apache\n vhosts and setting up cron jobs.\n\nOf course it can be called by another configuration management tool like\nPuppet, Chef or even another Yaybu instance when you are ready to level up.\nThis is a great pattern to let your main server CM worry about the big picture\nand the CM shipped with your buildout worry about the little details.\n\n\nBasic use\n---------\n\nConsider a simple yaybu configuration::\n\n resources.append:\n - Execute:\n name: some-script\n command: ${buildout.buildout.directory}/bin/somescript\n user: root\n creates: ${buildout.buildout.directory}/stuff.cfg\n\nYou could wire this into buildout like so::\n\n [buildout]\n parts =\n postdeploy\n\n [postdeploy]\n recipe = isotoma.recipe.postdeploy\n config = config.yay\n\nTo look at the 'expanded' form of your configuration - with all the variables\nfilled in - you can now (after running buildout) do::\n\n $ ./bin/postdeploy show\n resources:\n - Execute:\n name: /var/somedir/bin/somescript\n user: root\n creates: /var/somedir/stuff.cfg\n\nThis command optionally takes ``-v`` which shows a more verbose dump of your\nconfiguration.\n\nYou can simulate what would happen if the config was applied without harming\nthe system using the ``simulate`` command::\n\n $ ./bin/postdeploy simulate\n /---------------------------- Execute[some-script] -----------------------------\n | # /var/somedir/bin/somescript\n \\-------------------------------------------------------------------------------\n\nThis command will have an exit code of 254 if it thinks no changes are\nrequired, 0 if it successfully simulated applying some changes and anything\nelse indicates a problem with your configuration. It makes an ideal monitoring\ntool as it can warn of manual hacks or incomplete deployments.\n\nFinally you can apply the configuration with ``apply``::\n\n $ ./bin/postdeploy simulate\n /---------------------------- Execute[some-script] -----------------------------\n | # /var/somedir/bin/somescript\n | Here is the stdout from your command\n | ....\n | ....\n | Success!\n \\-------------------------------------------------------------------------------\n\n\nMandatory Parameters\n--------------------\n\nconfig\n A Yay file to apply to this computer. It will have access to metadata in\n your buildout.\n\n\nOptional Parameters\n-------------------\n\nsearchpath\n A set of directories or URLs to search for assets needed to full configure\n this site.\n\nhistory.track\n A list of values to monitor. This is useful when you have a list of parts\n that are buildout managed but need symlinking in postdeploy. Using history\n tracking you can make sure they are removed from the system if they are\n removed from buildout.\n\n For example::\n\n [buildout]\n parts =\n ${parts:apache}\n postdeploy\n\n [vhost1]\n \n\n [parts]\n apache = \n vhost1\n vhost2\n\n [postdeploy]\n recipe = isotoma.recipe.postdeploy\n history.track =\n parts:apache\n\n And in your Yaybu configuration::\n\n resources.append:\n .foreach vhost in history.parts.apache:\n - Link:\n name: /etc/apache2/sites-enabled/${buildout.sitename}-${vhost}\n policy: remove\n\n The first time you run buildout a datafile with the current state is\n created, Now if you remove ``vhost2`` from your buildout and run postdeploy\n Yaybu will ensure your symlink is removed. This data persists across\n multiple buildouts so is safe even if you forget to run postdeploy.\n\n There are multiple history types. The default is ``removed``. Another\n example is ``max`` which will keep track of the largest value a field has\n ever held. This is useful if you have buildout with a scaleable number of\n services and want to make sure old services are stopped when you update\n buildout::\n\n [postdeploy]\n history.track =\n environment:zopes max\n\n I could then do something like this from my Yaybu configuration::\n\n .foreach i in range(buildout.environment.zopes, history.environment.zopes):\n - Execute:\n name: stop-forgotten-zope-${i}\n command: kill-command zope${i}\n unless: some-manual-pid-check\n\nhistory.db\n You don't normally need to change this setting.\n\n Because this recipe has to support Python 2.4 it can't use Yay as its main\n datastore. This is the path to a Python shelf.\n\n The default is ``${buildout:directory}/var/${partname}-history.db``\n\nhistory.yay\n You don't normally need to change this setting.\n\n The data from ``history.db`` is persisted as yay, it is loaded from here\n when you run ``bin/postdeploy``.\n\n The default is ``${buildout:directory}/var/${partname}-history.yay``\n\nexecutable\n A python executable to use. Defaults to the same one used to invoke\n buildout. This is to support Python 2.4 buildouts as Yaybu requires 2.6 or\n 2.7.\n\n\nRepository\n----------\n\nThis software is available from our `recipe repository`_ on github.\n\n.. _`recipe repository`: http://github.com/isotoma/isotoma.recipe.deploy\n\n\nLicense\n-------\n\nCopyright 2012 Isotoma Limited\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\n\nChangelog\n=========\n\n0.0.6 (2012-04-08)\n------------------\n\n- Nothing changed yet.\n\n\n0.0.5 (2012-04-07)\n------------------\n\n- Don't include empty mappings in output\n\n\n0.0.4 (2012-04-03)\n------------------\n\n- Process command line options first.\n\n\n0.0.3 (2012-03-20)\n------------------\n\n- Now supports tracking maximum versions of fields::\n\n [postdeploy]\n history.track =\n environment:zopes max\n\n The default tracking action is called ``removed``.\n\n In this example, ``history.environment.zopes`` would be the largest number of\n zopes this buildout deployment has had. The use case for this is that your\n buildout just destroyed the start/stop scripts for those olds zopes and you\n want to make sure they were actually stopped. I could then do something like\n this from my Yaybu configuration::\n\n .foreach i in range(buildout.environment.zopes, history.environment.zopes):\n - Execute:\n name: stop-forgotten-zope-${i}\n command: kill-command zope${i}\n unless: some-manual-pid-check\n\n\n0.0.2 (2012-03-17)\n------------------\n\n- Any sections that are simple metadata and not referenced from a part will now\n be available in postdeploy configuration. Note that if a section isn't\n referenced by an installed part and uses variables then it can't be included:\n the act of inspecting it might cause additional buildout recipes to be\n executed.\n\n\n0.0.1 (2012-03-16)\n------------------\n\n- Fix packaging\n\n\n0.0.0 (2012-03-16)\n------------------\n\n- Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/isotoma.recipe.postdeploy", "keywords": "proxy buildout postdeploy", "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "isotoma.recipe.postdeploy", "package_url": "https://pypi.org/project/isotoma.recipe.postdeploy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/isotoma.recipe.postdeploy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/isotoma.recipe.postdeploy" }, "release_url": "https://pypi.org/project/isotoma.recipe.postdeploy/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Buildout recipes for postdeploy.", "version": "0.0.6" }, "last_serial": 793488, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "0e7958d26bca61f8eb5e0029d630a34c", "sha256": "733e7d7e6bf410186364e88c03c5238ba5d84424df5138f4865cc1c5cd4f3c5a" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.0.tar.gz", "has_sig": false, "md5_digest": "0e7958d26bca61f8eb5e0029d630a34c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7533, "upload_time": "2012-03-16T18:41:30", "url": "https://files.pythonhosted.org/packages/f5/5d/8b14a9c0e0b9568ff3b19c3bec1db620e84586502a786fce90f594ebb90f/isotoma.recipe.postdeploy-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "d65fe509c0918c8f6f2f55f385b6ffe2", "sha256": "534cf482d4e1555b4092ab81aed39ab281754de0b8a5c6a6daba57b399e4afd2" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d65fe509c0918c8f6f2f55f385b6ffe2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2012-03-16T22:18:57", "url": "https://files.pythonhosted.org/packages/9c/a2/8ae662cf5cf33779133c1a40d6ea638bce111ce681733ba2c7ac5a51ffb2/isotoma.recipe.postdeploy-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "515e276c532e7b9b2e31ad89467d6915", "sha256": "a9d8352e87c559184068372fdd296fcee18c9d7a9fedd2880656d2c5eafc19ae" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "515e276c532e7b9b2e31ad89467d6915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7660, "upload_time": "2012-03-17T12:35:13", "url": "https://files.pythonhosted.org/packages/ee/2c/4373adb9c4bc8135c76187aeca2b10250329b3ee7c725be2118008b0bd51/isotoma.recipe.postdeploy-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "747b8734b6225b0633cf526814deb2b3", "sha256": "4e75b38d45aef2d1a468bfbc562932b5b6543263372e8863250249bbf16f962c" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.3.tar.gz", "has_sig": false, "md5_digest": "747b8734b6225b0633cf526814deb2b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10918, "upload_time": "2012-03-20T19:55:53", "url": "https://files.pythonhosted.org/packages/68/4c/c105fe1f90d0ff9ce2dba6375996856f0c36d2e40fe740dd64ef3ece7101/isotoma.recipe.postdeploy-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a63f8958cd42bdce2e44c58295cb0455", "sha256": "7c36a251c6a26a871136ebf0dedd67a116179a1b2702acecb206db8f008c2ee7" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a63f8958cd42bdce2e44c58295cb0455", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10959, "upload_time": "2012-04-03T15:01:08", "url": "https://files.pythonhosted.org/packages/28/b7/9174ae647a7956508353d54a482dbfa166495438206a6f4d33830f164c33/isotoma.recipe.postdeploy-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "8d82828f3636922c77c722baa8c16ee8", "sha256": "7e313b8ae2acda2f61f8d785b7b5ab162be9a9951a32809ab7265efc1d5ff217" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8d82828f3636922c77c722baa8c16ee8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11035, "upload_time": "2012-04-07T13:35:53", "url": "https://files.pythonhosted.org/packages/aa/82/a917cf0f95b11b96979469cda2b66e6cceab15fe3646adbc5bfa85c2f7a8/isotoma.recipe.postdeploy-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f616f48b9d89a6bf79045f5e48cb44d2", "sha256": "e65d759ab768c400320f6197e1409063d7aa872e9aae26cd9b11ed2ff407a050" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f616f48b9d89a6bf79045f5e48cb44d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11101, "upload_time": "2012-04-08T20:51:25", "url": "https://files.pythonhosted.org/packages/ad/3e/1c99a8e21376f69671d2232648bd55211153092d8d8fc1bf33db619f9a63/isotoma.recipe.postdeploy-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f616f48b9d89a6bf79045f5e48cb44d2", "sha256": "e65d759ab768c400320f6197e1409063d7aa872e9aae26cd9b11ed2ff407a050" }, "downloads": -1, "filename": "isotoma.recipe.postdeploy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f616f48b9d89a6bf79045f5e48cb44d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11101, "upload_time": "2012-04-08T20:51:25", "url": "https://files.pythonhosted.org/packages/ad/3e/1c99a8e21376f69671d2232648bd55211153092d8d8fc1bf33db619f9a63/isotoma.recipe.postdeploy-0.0.6.tar.gz" } ] }