{ "info": { "author": "Ben Firshman", "author_email": "ben@firshman.co.uk", "bugtrack_url": null, "classifiers": [], "description": "Loom \n====\n[![Build Status](https://travis-ci.org/bfirsh/loom.png?branch=master)](https://travis-ci.org/bfirsh/loom)\n\nElegant deployment with [Fabric](http://fabfile.org) and Puppet.\n\nLoom does the stuff Puppet doesn't do well or at all: bootstrapping machines, giving them roles, deploying Puppet code and installing reusable Puppet modules. It's useful for both serverless and master/agent Puppet installations.\n\nIt also includes some Fabric tasks for building and uploading app code \u2013\u00a0something that is particularly complex to do with Puppet.\n\nInstall\n-------\n\n $ sudo pip install loom\n\nGetting started\n---------------\n\nFirst of all, you create `fabfile.py` and define your hosts:\n\n from fabric.api import *\n from loom import puppet\n from loom.tasks import *\n\n env.user = 'root'\n env.environment = 'prod'\n env.roledefs = {\n 'web': ['prod-web-1.example.com', 'prod-web-2.example.com'],\n 'db': ['prod-db-1.example.com'],\n }\n\nYou can then define any third-party Puppet modules you want in a file called `Puppetfile`:\n\n forge \"http://forge.puppetlabs.com\"\n mod \"puppetlabs/nodejs\"\n mod \"puppetlabs/mysql\"\n\n(This is for [librarian-puppet](http://librarian-puppet.com/), a tool for installing reusable Puppet modules. It can also install from Git, etc.)\n\nYour own modules are put in a directory called `modules/` in the same directory as `fabfile.py`. Roles are defined in a magic module called `roles` which contains manifests for each role. (If you've used Puppet before, this is a replacement for `node` definitions.)\n\nFor example, `modules/roles/manifests/db.pp` defines what the db role is:\n\n class roles::db {\n include mysql\n # ... etc\n }\n\nAnd that's it!\n\nLet's set up a database server. First, bootstrap the host (in this example, the single db host you defined in `env.roledefs`):\n\n $ fab -R db puppet.install\n\nThen install third party Puppet modules, upload your local modules, and apply them:\n\n $ fab -R db puppet.update puppet.apply\n\nEvery time you make a change to your modules, you can run that command to apply them. Because this is just Fabric, you can write a task in `fabfile.py` to do it too:\n\n @task\n def deploy_puppet():\n execute(puppet.update)\n execute(puppet.apply)\n\nThen you could use the included \"all\" task to update Puppet on all your hosts:\n\n $ fab all deploy_puppet\n\nApps\n----\n\nLoom includes a bunch of Fabric tasks for building and uploading code. It assumes you've set up a role for the app (e.g., \"web\"), and that role has all of the packages you require and an Upstart init script to start the app.\n\nApps in Loom are configured using `env.apps`. It is a dictionary where the key is the name of the app and the value is a dictionary with these keys:\n\n - **repo** (required): A Git URL of the repo that contains your app.\n - **role** (required): The role that the app will be uploaded to.\n - **build**: A script to run locally before uploading (e.g. to build static assets or install local dependencies).\n - **post-upload**: A script to run on each server after uploading.\n - **init**: The name of the Upstart script to start/restart after uploading.\n\nYou must also define a directory for your apps to live in with `env.app_root`.\n\nFor example, suppose this was your `fabfile.py`:\n\n from fabric.api import *\n from loom import app, puppet\n from loom.tasks import *\n\n env.user = 'root'\n env.environment = 'prod'\n env.roledefs = {\n 'web': ['prod-web-1.example.com', 'prod-web-2.example.com'],\n 'db': ['prod-db-1.example.com'],\n }\n env.app_root = '/home/ubuntu'\n env.apps['web'] = {\n \"repo\": \"https://user:pass@github.com/mycompany/mycompany-web.git\",\n \"role\": \"web\",\n \"build\": \"script/build\",\n \"init\": \"web\",\n }\n\nYou then need a `modules/roles/manifests/web.pp` that sets up `/etc/init/web.conf` to run your app in `/home/ubuntu/web`.\n\nTo deploy your app, run:\n\n $ fab app.deploy:web\n\nThis will: \n\n 1. Pull your GitHub repository locally.\n 2. Run `script/build`.\n 3. Upload your code to `/home/ubuntu/web` on both `prod-app-1.example.com` and `prod-app-2.example.com`.\n 4. Run `sudo restart web`.\n\n\nOS support\n----------\n\nIt's only been tested on Ubuntu 12.04. I would like to support more things. Send patches!\n\nAPI\n---\n\nLook at the source for now. It's all Fabric tasks, and they're pretty easy to read. (Sorry.)\n\nRunning the tests\n-----------------\n\n $ pip install -r dev-requirements.txt\n $ script/test\n\nContributors\n------------\n * [Ben Firshman](https://fir.sh)\n * [Andreas Jansson](http://andreas.jansson.me.uk/)\n * [Steffen L. Norgren](http://github.com/xironix)\n * [Spencer Herzberg](https://github.com/sherzberg)\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bfirsh/loom", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "loom", "package_url": "https://pypi.org/project/loom/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/loom/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/bfirsh/loom" }, "release_url": "https://pypi.org/project/loom/0.0.18/", "requires_dist": null, "requires_python": null, "summary": "Elegant deployment with Fabric and Puppet.", "version": "0.0.18" }, "last_serial": 1085512, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1716d319296823786b637a284e42abed", "sha256": "4a0e930d9a266d2f84535df3e6e701853ffc983c2aed674e131f265b7f82c4f2" }, "downloads": -1, "filename": "loom-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1716d319296823786b637a284e42abed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6565, "upload_time": "2012-10-09T18:39:03", "url": "https://files.pythonhosted.org/packages/d3/b5/6041c8f24274cf1176d3bdb46b95e18ad2adeb79f4ab0126ab793e2a4d3e/loom-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "50530821ac5f861eaa66cc940972c852", "sha256": "04e0ea97e5e27d96392c6590ef6ed786dddc73823ea830d1609dfa8177a21820" }, "downloads": -1, "filename": "loom-0.0.10.tar.gz", "has_sig": false, "md5_digest": "50530821ac5f861eaa66cc940972c852", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9962, "upload_time": "2013-04-12T10:08:46", "url": "https://files.pythonhosted.org/packages/5c/49/5bc94417db5021e0d9120ceed9d77e25f41022bbbf0743e41672201a6911/loom-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "0a41db2b16160bc8cbb3ad2213b21f2c", "sha256": "23e935f52fb6fa26b6a93a5438cdd5aa9b8ba3a97b98a3460cacf4454607e2bc" }, "downloads": -1, "filename": "loom-0.0.11.tar.gz", "has_sig": false, "md5_digest": "0a41db2b16160bc8cbb3ad2213b21f2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10720, "upload_time": "2013-09-10T15:47:32", "url": "https://files.pythonhosted.org/packages/69/2d/8854e75b9359cd23b0df1b2469f4070b32c7d6e263bde8fefcdac4a05b0a/loom-0.0.11.tar.gz" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "55c9e8a12d0843586a5ccf869e766393", "sha256": "bce599f79cd87d9437c1ddd9d9ba45c9c9a38218bda7e7d1e0d9ed8b7f5c9beb" }, "downloads": -1, "filename": "loom-0.0.12.tar.gz", "has_sig": false, "md5_digest": "55c9e8a12d0843586a5ccf869e766393", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10948, "upload_time": "2013-10-04T14:04:53", "url": "https://files.pythonhosted.org/packages/84/af/73e359acd38238a297b72c4e2ba1d5bbc2f3e8e2a243a1d9ed05288258d3/loom-0.0.12.tar.gz" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "76bfc94eefe92a806cac5bc96198de72", "sha256": "0d46f903c6a1a8df3a53ba555f3cf84ed2b35b9217fb551f0de6cc6ad2595558" }, "downloads": -1, "filename": "loom-0.0.13.tar.gz", "has_sig": false, "md5_digest": "76bfc94eefe92a806cac5bc96198de72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10608, "upload_time": "2014-01-03T15:33:40", "url": "https://files.pythonhosted.org/packages/b2/9e/4fdd09bb3ef6441fc71cc4f494a9a8ce88d282bb9c302d5cf444c4682d6d/loom-0.0.13.tar.gz" } ], "0.0.14": [ { "comment_text": "", "digests": { "md5": "1135cbeeb0d415fa34b26ceff0181a3f", "sha256": "26b7f1f6cda7ff19e8ed5e92db186823908764931b27e5ca8e139be360ec30f2" }, "downloads": -1, "filename": "loom-0.0.14.tar.gz", "has_sig": false, "md5_digest": "1135cbeeb0d415fa34b26ceff0181a3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7171, "upload_time": "2014-01-06T12:18:36", "url": "https://files.pythonhosted.org/packages/c6/37/ce340798246ee20fb45316885bbb21278ac64df67e8451c9ebbc78181407/loom-0.0.14.tar.gz" } ], "0.0.16": [ { "comment_text": "", "digests": { "md5": "05c65f2aecf9da1d1167cf269a1b09fc", "sha256": "739eb7a9fdec67353285401990f007bf9f7fc6b79e1a4e06be9e12c9d5d8db20" }, "downloads": -1, "filename": "loom-0.0.16.tar.gz", "has_sig": false, "md5_digest": "05c65f2aecf9da1d1167cf269a1b09fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10679, "upload_time": "2014-01-06T15:47:01", "url": "https://files.pythonhosted.org/packages/76/b9/a553d9ef402ac1438e60b0f910a0fefac9d631a71f5dbe0ce46bee4c9935/loom-0.0.16.tar.gz" } ], "0.0.17": [ { "comment_text": "", "digests": { "md5": "a0a545918a0ee6651fb87becc6fac841", "sha256": "f9afa008277b4335b36545019c22796360d1d23824b4da67d9258402bf405809" }, "downloads": -1, "filename": "loom-0.0.17.tar.gz", "has_sig": false, "md5_digest": "a0a545918a0ee6651fb87becc6fac841", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8853, "upload_time": "2014-01-06T15:52:55", "url": "https://files.pythonhosted.org/packages/f3/ff/85474403d982185b3e66de27de61adaad3bea6c1967e51093edb2d54b2c6/loom-0.0.17.tar.gz" } ], "0.0.18": [ { "comment_text": "", "digests": { "md5": "00bf799ddeef43a3511ae580d60bb88a", "sha256": "d5f0c00ac47dec28b15b670a8d0b416716a1b324c96ecd147bd661d88896348a" }, "downloads": -1, "filename": "loom-0.0.18.tar.gz", "has_sig": false, "md5_digest": "00bf799ddeef43a3511ae580d60bb88a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10732, "upload_time": "2014-05-08T15:33:40", "url": "https://files.pythonhosted.org/packages/52/05/b61e584487cadecda4042f4d3db80db2efe3cdad80c38f5a9be2b7dca9b5/loom-0.0.18.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6b22fdea5eb187e1389fd21d9d369790", "sha256": "f75a87884fa1b32a3b7d21aa214bdb0407455808669a1d68c1d914e179421bfc" }, "downloads": -1, "filename": "loom-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6b22fdea5eb187e1389fd21d9d369790", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8197, "upload_time": "2012-10-09T18:45:32", "url": "https://files.pythonhosted.org/packages/e8/a4/01c496355d2da7957e098b0a3a2313c1a603c493fe3544b0c40b80ac0db6/loom-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1d4e596d94b4bc07b67dce9920379848", "sha256": "b3ac4b2eadca3eb7cedb962af32cdb7b6ab874a75e7d25d7ce3395be93aa95f6" }, "downloads": -1, "filename": "loom-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1d4e596d94b4bc07b67dce9920379848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8199, "upload_time": "2012-10-19T12:04:05", "url": "https://files.pythonhosted.org/packages/bd/6f/b745b3f0fdce44c6365301b68e838ddc67d0a770b23d55847eac683c35c3/loom-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "2b0599076eec9d0e2202c9bfeb51d328", "sha256": "5c0921c72ff82e702d5f47d54d71a806a31916b0e1b5a3332db933366849e69d" }, "downloads": -1, "filename": "loom-0.0.4.tar.gz", "has_sig": false, "md5_digest": "2b0599076eec9d0e2202c9bfeb51d328", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8196, "upload_time": "2012-10-21T01:07:28", "url": "https://files.pythonhosted.org/packages/5f/f3/0019eadf5835906adef9ead8553e70da144b55118e708c01ed56be1e6dec/loom-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "a73606091800606288caf0f51874169f", "sha256": "cdc2ea30ca878c9f239432e3e66c52fa1ce574cde37d9e2e0ce22f81fd626910" }, "downloads": -1, "filename": "loom-0.0.5.tar.gz", "has_sig": false, "md5_digest": "a73606091800606288caf0f51874169f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8195, "upload_time": "2012-10-21T01:09:14", "url": "https://files.pythonhosted.org/packages/da/d2/21c70bacdadc179311051b9f1355e4c3f1c052600a8b9277e5b824c24012/loom-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f8ddc91b4d7c8f09270deb03c67539a0", "sha256": "b70d7911de3182a2434bfe0a5365af94b3c6a25dee021ec82e9e0aa1100aa17e" }, "downloads": -1, "filename": "loom-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f8ddc91b4d7c8f09270deb03c67539a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8349, "upload_time": "2012-11-04T19:35:09", "url": "https://files.pythonhosted.org/packages/38/22/ce37418237ebb2515d633db4420359504ed5f20b8ca7e34bfc6d8e4a964c/loom-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "4de8f3c5eb9b711f85886833d9c377fe", "sha256": "1494541bc5edd8e4a2b621835a9692b6fcad846ad7026ef0329c47e32d69cdf7" }, "downloads": -1, "filename": "loom-0.0.7.tar.gz", "has_sig": false, "md5_digest": "4de8f3c5eb9b711f85886833d9c377fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8461, "upload_time": "2012-11-07T19:39:45", "url": "https://files.pythonhosted.org/packages/90/79/ab569bdeb58ba4ddc0bcaeb3c7a215f09fd1e9fff31fd4799dbecc2ed9ba/loom-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "7e336e45100b0cbc17891084be2fbec7", "sha256": "c77eca6d912b017678ddbc07b2d1f7d97c929ed8172693a35905dadc8fe3257d" }, "downloads": -1, "filename": "loom-0.0.8.tar.gz", "has_sig": false, "md5_digest": "7e336e45100b0cbc17891084be2fbec7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8395, "upload_time": "2013-01-02T18:00:36", "url": "https://files.pythonhosted.org/packages/34/a6/2cd2ca669debcc581c1dc5dff2fc313a50c52a2f5ae1baf34937bb716083/loom-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "334e88c3a5691564d6990ff74dee50d9", "sha256": "0fd7e8ec6743a2e04c62db3a87c4c59585b592007e4051983704bb2930a0b09c" }, "downloads": -1, "filename": "loom-0.0.9.tar.gz", "has_sig": false, "md5_digest": "334e88c3a5691564d6990ff74dee50d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9971, "upload_time": "2013-04-11T23:15:22", "url": "https://files.pythonhosted.org/packages/1a/de/869d559640609c9f7a14939c6c365f7e8671c29a6e4b773ec995fd3de755/loom-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "00bf799ddeef43a3511ae580d60bb88a", "sha256": "d5f0c00ac47dec28b15b670a8d0b416716a1b324c96ecd147bd661d88896348a" }, "downloads": -1, "filename": "loom-0.0.18.tar.gz", "has_sig": false, "md5_digest": "00bf799ddeef43a3511ae580d60bb88a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10732, "upload_time": "2014-05-08T15:33:40", "url": "https://files.pythonhosted.org/packages/52/05/b61e584487cadecda4042f4d3db80db2efe3cdad80c38f5a9be2b7dca9b5/loom-0.0.18.tar.gz" } ] }