{ "info": { "author": "Marc Brinkmann", "author_email": "git@marcbrinkmann.de", "bugtrack_url": null, "classifiers": [], "description": "WSGI-deployment made easy\n=========================\n\nscotch is a toolkit to deploy many WSGI-applications onto a single server.\nIt will allow you to specify how an app should be deployed\nand generate nginx, uwsgi-configuration files and virtualenvs.\n\n\nQuick start\n~~~~~~~~~~~\n\nFirst, install scotch (preferably on a Debian or Ubuntu system). Then create\na file named ``/etc/scotch/apps-enabled/dram.cfg`` as follows::\n\n [app]\n src=git@github.com:mbr/scotch-sample-app\n\n\nNow simply run (as root)::\n\n $ scotch deploy dram\n\nafter which the sample app should greet you at http://localhost. See the\n`source `_ of the sample\napplication for some ideas on how an app can be configured.\n\n\nOperation overview\n------------------\n\nFirst, scotch is set up on the system by providing a suitable global\nconfiguration, called the site configuration. The shipped default is\nsuitable for Debian stable and Ubuntu LTS deployments,\nother distros may need different settings.\n\nIn theory multiple application and webservers are supported through the\nplugin architecture, however currently scotch ships only with `nginx\n`_ and `uWSGI `_\nsupport, so make sure these are installed.\n\nApps\n~~~~\n\nEach app has its own configuration configuration file,\nfound at /etc/scotch/apps-enabled. Deploying an app is done by\ntriggering the two-step deployment process by running::\n\n $ scotch deploy myapp\n\n\nThe first step is called **checkout**. A new *instance* of the app will be\ncreated (per default in ``/var/local/scotch/appname``). An instance is a\ndirectory that contains (almost) all of the deployment.\n\nThe application's source code is copied into the source dir at\ninstance_dir/``src``. The default source is a git repository,\nhowever the resulting copy will just be a plain directory.\n\nAfterwards a new `virtualenv `_ is\ncreated and dependencies of the app are installed.\n\nNow that that it is runnable, the app will **register** as the second step;\ni.e. the configuration files for web and application servers will be\ngenerated and the affected servers will be reloaded or restartet.\nAfterwards, the app is live.\n\nWhen using nginx and uwsgi, you can check the ``sites-enabled`` and\n``scotch-apps`` subdirectories of ``/etc/nginx/`` for nginx configuration,\nas well as ``/etc/uwsgi/apps-enabled`` for the uwsgi ini files created.\n\n\nConfiguration files\n-------------------\n\nConfiguration files for scotch are loaded in the following order for each app\ninstance. Files loaded later can overwrite values from files loaded earlier:\n\n1. Built-in defaults (for scotch and plugins).\n2. Site configuration: ``./scotch.cfg``, ``~/.scotch.cfg`` and\n ``/etc/scotch.cfg``. These locations can be overridden by the ``-c``\n command line option, which is helpful for non-root testing.\n3. App configuration, in ``/etc/scotch/apps.enabled/myapp.cfg`` (for an app\n named \"myapp\"). This path is configurable as ``${paths:configuration}``\n (see below).\n\n\nConfiguration file syntax\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nConfiguration files use the ``configparser`` module `found in the Python 3\nstdlib `_ or `its\nbackport `_ on Python 2. The\n`extended interpolation `_ is also used.\n\n\nSite configuration\n~~~~~~~~~~~~~~~~~~\n\nThe site configuration is meant to be used to smooth away differences\nbetween different distributions and web or application servers.\n\nFor educational purposes, here is an example for a more exotic\n``/etc/scotch.cfg``::\n\n [app]\n interpreter=/usr/local/custom-python/bin/python\n venv_path=/virtualenvs/${name}\n\n [paths]\n configuration=/nfs/conf/scotch\n instances=/nfs/scotch-instances\n\n\nThis will enables a custom compiled interpreter and configuration and\ninstances store on an (assumed) nfs volume, while virtual environments are\nkept on the local machine. Note that configuration files are just merged\ntogether, there's no technical distinction between a defaults-file,\nsite configuration or app configuration.\n\n\nApp configuration\n~~~~~~~~~~~~~~~~~\n\nEach app configuration can override any option of the configuration,\nhowever most often those in the [app] section are overriden. See the\ndefaults file (https://github.com/mbr/scotch/blob/master/scotch/defaults.cfg)\nfor commented options.", "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/mbr/scotch", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "scotch", "package_url": "https://pypi.org/project/scotch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/scotch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mbr/scotch" }, "release_url": "https://pypi.org/project/scotch/0.3/", "requires_dist": null, "requires_python": null, "summary": "Simplifies WSGI application deployment.", "version": "0.3" }, "last_serial": 1064246, "releases": { "0.1dev": [], "0.3": [ { "comment_text": "", "digests": { "md5": "f15b4fbb6263a27c6dac5c2c000db017", "sha256": "fc01d010a380cc1176e934b7b010a46a14cb60df8346efa7e66bda9d5c27c738" }, "downloads": -1, "filename": "scotch-0.3.tar.gz", "has_sig": true, "md5_digest": "f15b4fbb6263a27c6dac5c2c000db017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8676, "upload_time": "2014-04-18T10:10:49", "url": "https://files.pythonhosted.org/packages/17/3b/c2698320120713cd326762719d62157829b3707ed7265361154b215ca579/scotch-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f15b4fbb6263a27c6dac5c2c000db017", "sha256": "fc01d010a380cc1176e934b7b010a46a14cb60df8346efa7e66bda9d5c27c738" }, "downloads": -1, "filename": "scotch-0.3.tar.gz", "has_sig": true, "md5_digest": "f15b4fbb6263a27c6dac5c2c000db017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8676, "upload_time": "2014-04-18T10:10:49", "url": "https://files.pythonhosted.org/packages/17/3b/c2698320120713cd326762719d62157829b3707ed7265361154b215ca579/scotch-0.3.tar.gz" } ] }