{ "info": { "author": "Darie Petrov", "author_email": "darie@cambriansoft.org", "bugtrack_url": null, "classifiers": [], "description": "Overview\n--------\n\nploybot is a Fabric_ based tool for setting up Python WSGI apps on what I like to\ncall the SNUG stack:\n\n* Supervisord_ for starting processes and keeping them alive.\n* Nginx_ for proxying between your WSGI app and the big bad web.\n* Ubuntu_ as the OS of choice, enabling resolution of system dependencies with\n apt. Debian might work as well but hasn't been tested.\n* Gunicorn_ for serving your WSGI app.\n\n(I suppose it could also be the GUNS stack but that sounds far less friendly.)\n\nKey Features\n~~~~~~~~~~~~\n\n* Deploy your site to one or more servers with a single command ('ploybot push').\n* Automatic configuration of Nginx, Supervisord, and Gunicorn to get your site running.\n* Isolation of each site into a separate Virtualenv_\n* Support for differing app config depending on which role you deploy to (a \n different DB in staging than production, for example).\n\nInstallation\n~~~~~~~~~~~~\n\nUse pip::\n\n pip install ploybot\n\nYou can also install the current development version straight from bitbucket::\n\n pip install hg+http://bitbucket.org/dori/ploybot#egg=ploybot\n\nCommands\n--------\n\n(Almost) all of the commands below require that you specify a role name, like\n'ploybot dosomething -R dev'.\n\nCommands can generally be run from the site root directory or any subdirectory\nof it.\n\npush\n~~~~\n\n::\n\n ploybot push -R rolename\n\nThis command is the main reason for ploybot's existence. It does the work required\nto get your app running on a host (or set of hosts) given the configuration\nspecified in site.yaml and the selected role .yaml file. 'push' does the\nfollowing:\n\n1. SSHes to the remote server(s) specified in the role config.\n2. Creates a zipped up rollback archive of the old site if there's one\n there already.\n3. Creates a virtualenv for the site.\n4. Installs apt and python dependencies.\n5. Copies the site from your local machine to a temporary directory on the\n remote server.\n6. Writes config file includes for nginx and supervisord.\n7. Moves your code from the temp dir into its production location\n (/srv/ by default).\n8. Tells nginx and supervisord to reload their configs.\n\n\nrollback\n~~~~~~~~\n\n::\n\n ploybot rollback -R rolename\n\nThis command is for when you have those 'OMG I BROKE THE SITE' moments. It will\nSSH to the push_hosts specified in your role file and restore the most recent\narchive of the site. ploybot keeps 3 rollback copies of your site, so you could\npotentially run 'ploybot rollback' 3 times to go back to the state from 3\ndeployments ago.\n\nrun\n~~~\n\n::\n\n ploybot run -R rolename\n\nThis command runs the site from the local machine, on port 8000. (Nothing is\npushed of copied.) Static directories listed in the *static_dirs* section of\nsite.yaml will also be served. (CherryPy is used for this magic.)\n\ninstall_server_deps\n~~~~~~~~~~~~\n\n::\n\n ploybot install_server_deps -R rolename\n\nWhen you get a shiny new server with that fresh Ubuntu smell, it needs just a\ntiny bit of setup before it will know how to serve ploybot-deployed sites. This\ncommand does that. It installs nginx and supervisord, and gives each of them a\nwildcard include in their configs for loading from /srv//conf.\n\npip_deps\n~~~~\n\n::\n\n ploybot pip_deps\n\nThis command wraps 'pip install' to install all of the python packages listed\nin requirements.txt into your local python environment. It's handy for grabbing all\nthe dependencies when you're working with a new virtualenv on an existing\nproject.\n\n\ncreate_virtualenv\n~~~~\n\n::\n\n ploybot create_virtualenv\n\nCreates a virtual environment for the app to be deployed.\n\n\nconfigure_nginx\n~~~~\n\n ploybot configure_nginx\n \nConfigures nginx\n\n\nswitch_nginx\n~~~~\n\n ploybot switch_nginx\n \nReloads nginx config\n\n\nconfigure_supervisor\n~~~~\n\n ploybot configure_supervisor\n \nConfigures supervisor\n\n\nstart_process\n~~~~\n\n ploybot start_process\n \nStarts process\n\n\nstop_other_versions\n~~~~\n\n ploybot stop_other_versions\n \nKills other running proccesses of this app\n\n\nskel\n~~~~\n\n::\n\n ploybot skel sitename\n\nCreates a directory with a basic ploybot file and directory structure.\n\nLayout\n------\n\nA ploybot-enabled project should be layed out something like this::\n\n mysite.com\n \u251c\u2500\u2500 deps.yaml\n \u251c\u2500\u2500 fabfile.py\n \u251c\u2500\u2500 membrane.py\n \u251c\u2500\u2500 roles\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 dev.yaml\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 staging.yaml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 production.yaml\n \u251c\u2500\u2500 site.yaml\n \u2514\u2500\u2500 my-django-project\n\nSome of those files/folders are required, other are optional:\n\nRequired\n~~~~~~~~\n\n1. site.yaml - This is the main config file (comparable to app.yaml in Google\n App Engine)\n2. deps.yaml - Lists Python packages, Ubuntu apt packages, and apt build \n dependencies that need to be installed on the server running your site.\n3. fabfile.py - A Fabric_-compatible fabfile that imports ploybot's Fabric \n functions.\n4. roles/\\*.yaml - One or more 'role' files that contain the config to be \n passed into your app depending on the deployment context.\n\nAll of the required files will be created for you with the 'ploybot skel' command.\n\nOptional\n~~~~~~~~\n\n1. membrane.py - For Django projects it's nice to have a little shim to expose\n the project as a WSGI app. I like to call mine membrane.py. You can use \n whatever you like, or nothing at all, depending on your setup.\n2. my-django-project - ploybot isn't restricted to Django; any valid WSGI app on \n your Python path should be servable. But for Django projects I think it \n makes sense to stick them right there.\n\n.. _Supervisord: http://supervisord.org/\n.. _Nginx: http://nginx.org/\n.. _Ubuntu: http://www.ubuntu.com/\n.. _Gunicorn: http://gunicorn.org/\n.. _Fabric: http://docs.fabfile.org/\n.. _Virtualenv: http://virtualenv.openplans.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/dori/ploybot", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "ploybot", "package_url": "https://pypi.org/project/ploybot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ploybot/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/dori/ploybot" }, "release_url": "https://pypi.org/project/ploybot/0.1/", "requires_dist": null, "requires_python": null, "summary": "A modular Fabric-based tool for deploying WSGI apps.", "version": "0.1" }, "last_serial": 611917, "releases": { "0.1": [] }, "urls": [] }