{ "info": { "author": "Ryan Kelly", "author_email": "ryan@rfk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2" ], "description": "djsupervisor: easy integration between django and supervisord\n==============================================================\n\n\nDjango-supervisor combines the process-management awesomeness of supervisord\nwith the convenience of Django's management scripts.\n\n\nRationale\n---------\n\nRunning a Django project these days often entails much more than just starting\nup a webserver. You might need to have Django running under FCGI or CherryPy,\nwith background tasks being managed by celeryd, periodic tasks scheduled by\ncelerybeat, and any number of other processes all cooperating to keep the\nproject up and running.\n\nWhen you're just developing or debugging, it's a pain having to start and\nstop all these different processes by hand.\n\nWhen you're deploying, it's a pain to make sure that each process is hooked\ninto the system startup scripts with the correct configuration.\n\nDjango-supervisor provides a convenient bridge between your Django project\nand the supervisord process control system. It makes starting all the\nprocesses required by your project as simple as::\n\n $ python myproject/manage.py supervisor\n\n\nAdvantages\n----------\n\nDjango-supervisor is admittedly quite a thin layer on top of the wonderful\nfunctionality provided by supervisord. But by integrating tightly with\nDjango's management scripts you gain several advantages:\n\n * manage.py remains the single point of control for running your project.\n * Running all those processes is just as easy in development as it\n is in production.\n * You get auto-reloading for *all* processes when running in debug mode.\n * Process configuration can depend on Django settings and environment\n variables, and have paths relative to your project and/or apps.\n\n\nConfiguration\n-------------\n\nDjango-supervisor is a wrapper around supervisord, so it uses the same\nconfiguration file format. Basically, you write an ini-style config file\nwhere each section defines a process to be launched. Some examples can be\nfound below, but you'll want to refer to the supervisord docs for all the\nfiner details:\n\n http://www.supervisord.org\n\n\nTo get started, just include \"djsupervisor\" in your INSTALLED_APPS and drop\na \"supervisord.conf\" file in your project directory, right next to the main\nmanage.py script.\n\nA simple example config might run both the Django development server and the\nCelery task daemon::\n\n [program:webserver]\n command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py runserver --noreload\n \n [program:celeryd]\n command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py celeryd -l info\n\n\nNow when you run the \"supervisor\" management command, it will detect this\nfile and start the two processes for you.\n\nNotice that the config file is interpreted using Django's templating engine.\nThis lets you do fun things like locate files relative to the project root\ndirectory.\n\nBetter yet, you can make parts of the config conditional based on project\nsettings or on the environment. For example, you might start the development\nserver when debugging but run under FCGI in production::\n\n [program:webserver]\n {% if settings.DEBUG %}\n command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py runserver\n {% else %}\n command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py runfcgi host=127.0.0.1 port=8025\n {% endif %}\n \n\nUsage\n-----\n\nDjango-supervisor provides a new Django manangement command named \"supervisor\"\nwhich allows you to control all of the processes belonging to your project.\n\nWhen run without arguments, it will spawn supervisord to launch and monitor\nall the configured processs. Here's some example output using the config\nfile shown in the previous section::\n\n $ python myproject/manage.py supervisor\n 2011-06-07 23:46:45,253 INFO RPC interface 'supervisor' initialized\n 2011-06-07 23:46:45,253 INFO supervisord started with pid 4787\n 2011-06-07 23:46:46,258 INFO spawned: 'celeryd' with pid 4799\n 2011-06-07 23:46:46,275 INFO spawned: 'webserver' with pid 4801\n 2011-06-07 23:46:47,456 INFO success: webserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)\n 2011-06-07 23:46:56,512 INFO success: celeryd entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)\n\nBy default the \"supervisor\" command will stay in the foreground and print\nstatus updates to the console. Pass the --daemonize option to have it \nrun in the background. You can also tweak its behaviour using all of\nsupervisord's standard options in the config file.\n\nOnce the supervisor is up and running, you can interact with it to control the\nrunning processes. Running \"manage.py supervisor shell\" will launch the\ninteractive supervisorctl command shell. From here you can view process\nstatus and start/stop/restart individual processes::\n\n $ python myproject/manage.py supervisor shell\n celeryd RUNNING pid 4799, uptime 0:03:17\n webserver RUNNING pid 4801, uptime 0:03:17\n supervisor> \n supervisor> help\n\n default commands (type help ):\n =====================================\n add clear fg open quit remove restart start stop update \n avail exit maintail pid reload reread shutdown status tail version\n\n supervisor> \n supervisor> stop celeryd\n celeryd: stopped\n supervisor> \n supervisor> status\n celeryd STOPPED Jun 07 11:51 PM\n webserver RUNNING pid 4801, uptime 0:04:45\n supervisor> \n\n\nYou can also issue individual process-manangement commands directly on the \ncommand-line::\n\n $ python myproject/manage.py supervisor start celeryd\n celeryd: started\n $\n $ python myproject/manage.py supervisor status\n celeryd RUNNING pid 4937, uptime 0:00:55\n webserver RUNNING pid 4801, uptime 0:09:05\n $\n $ python myproject/manage.py supervisor shutdown\n Shut down\n $\n\n\nFor details of all the available management commands, consult the supervisord\ndocumentation.\n\n\nCommand-Line Options\n~~~~~~~~~~~~~~~~~~~~\n\nThe \"supervisor\" command accepts the following options:\n\n --daemonize run the supervisord process in the background\n --pidfile store PID of supervisord process in this file\n --loggile write supervisord logs to this file\n --project-dir use this as the django project directory\n --launch=program launch program automatically at supervisor startup\n --nolaunch=program don't launch program automatically at startup\n --exclude=program remove program from the supervisord config\n --include=program include program in the supervisord config\n --autoreload=program restart program when code files change\n --noreload don't restart programs when code files change\n\n\nExtra Goodies\n-------------\n\nDjango-supervisor provides some extra niceties on top of the configuration\nlanguage of supervisord.\n\n\nTemplating\n~~~~~~~~~~\n\nAll supervisord.conf files are rendered through Django's templating system.\nThis allows you to interpolate values from the settings or environment, and\nconditionally switch processes on or off. The template context for each\nconfiguration file contains the following variables::\n\n PROJECT_DIR the top-level directory of your project (i.e. the\n directory containing your manage.py script).\n\n APP_DIR for app-provided config files, the top-level\n directory containing the application code.\n\n PYTHON full path to the current python interpreter.\n\n SUPERVISOR_OPTIONS the command-line options passed to manage.py. \n \n settings the Django settings module, as seen by your code.\n\n environ the os.environ dict, as seen by your code.\n\nIf your project has other configuration files that need to interpolate these\nvalues, you can refer to them via the \"templated\" filter, like this::\n\n [program:nginx]\n command=nginx -c {{ \"nginx.conf\"|templated }}\n\nThe file path is relative to your project directory. Django-supervisor will\nread the specified file, pass it through its templating logic, write out a\nmatching \"nginx.conf.templated\" file, and insert the path to this file as the\nresult of the filter.\n\n\nDefaults, Overrides and Excludes\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDjango-supervisor recognises some special config-file options that are useful\nwhen merging multiple app-specific and project-specific configuration files.\n\nThe [program:__defaults__] section can be used to provide default options\nfor all other [program] sections. These options will only be used if none\nof the config files found by django-supervisor provide that option for\na specific program.\n\nThe [program:__overrides__] section can be used to override options for all\nconfigured programs. These options will be applied to all processes regardless\nof what any other config file has to say.\n\nFinally, you can completely disable a [program] section by setting the option\n\"exclude\" to true. This is mostly useful for disabling process definitions\nprovided by a third-party application.\n\nHere's an example config file that shows them all in action::\n\n ; We want all programs to redirect stderr by default,\n ; unless specifically configured otherwise.\n [program:__defaults__]\n redirect_stderr=true\n\n ; We force all programs to run as user \"nobody\"\n [program:__overrides__]\n user=nobody\n\n ; Don't reload programs when python code changes.\n [program:autoreload]\n exclude=true\n\n\n\nAutomatic Control Socket Config\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe supervisord and supervisorctl programs interact with each other via an\nXML-RPC control socket. This provides a great deal of flexibility and control\nover security, but you have to configure it just so or things won't work.\n\nFor convenience during development, django-supervisor provides automatic\ncontrol socket configuration. By default it binds the server to localhost\non a fixed-but-randomish port, and sets up a username and password based on\nsettings.SECRET_KEY.\n\nFor production deployment, you might like to reconfigure this by setting up\nthe [inet_http_server] or [unix_http_server] sections. Django-supervisor\nwill honour any such settings you provide.\n\n\n\nAutoreload\n~~~~~~~~~~\n\nWhen running in debug mode, django-supervisor automatically defines a process\nnamed \"autoreload\". This is very similar to the auto-reloading feature of\nthe Django development server, but works across all configured processes.\nFor example, this will let you automatically restart both the dev server and\nceleryd whenever your code changes.\n\nTo prevent an individual program from being auto-reloaded, set its \"autoreload\"\noption to false::\n\n [program:non-python-related]\n autoreload=false\n\nTo switch off the autoreload process entirely, you can pass the --noreload \noption to supervisor or just exclude it in your project config file like so::\n\n [program:autoreload]\n exclude=true", "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/rfk/django-supervisor", "keywords": "django supervisord process", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-supervisor", "package_url": "https://pypi.org/project/django-supervisor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-supervisor/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/rfk/django-supervisor" }, "release_url": "https://pypi.org/project/django-supervisor/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "easy integration between djangocl and supervisord", "version": "0.4.0" }, "last_serial": 2323717, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3c2e5d14d263369556ded09eccae9e23", "sha256": "4054888105d1e7d4ec840af03e23e41b65db179aca4d9e3349d373ff8babd0c4" }, "downloads": -1, "filename": "django-supervisor-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3c2e5d14d263369556ded09eccae9e23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11341, "upload_time": "2011-06-07T16:23:35", "url": "https://files.pythonhosted.org/packages/75/a3/29720ffbfc2a457570325c74cf97a010cc09c8f340c441867767ac0206ee/django-supervisor-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "94a7c89c313002f72ec43dae35ee274f", "sha256": "911959782bb80e35cf1d3c53e490a3661ee2f36b34dc1889c3cbd226c82a82f0" }, "downloads": -1, "filename": "django-supervisor-0.1.1.tar.gz", "has_sig": false, "md5_digest": "94a7c89c313002f72ec43dae35ee274f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15664, "upload_time": "2011-06-08T04:29:31", "url": "https://files.pythonhosted.org/packages/e3/5b/95bc604e413abf5df4b6811268d487fa096b3da2ea6409f832ce24b1b9d9/django-supervisor-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7620dd99c9b502d8d6e4c493d2c6f073", "sha256": "a026206ac69295dce7662e5f235af0872ad5cc9d536a12039d41b9b0445cae07" }, "downloads": -1, "filename": "django-supervisor-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7620dd99c9b502d8d6e4c493d2c6f073", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18086, "upload_time": "2011-06-09T06:12:28", "url": "https://files.pythonhosted.org/packages/6f/76/cf96666883b0fef36b726e8db3917036523c300c64896328f1df3e94d3d1/django-supervisor-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3c95e395fe967d12aa961025a0ebd95d", "sha256": "2247e93058fdb539532aedc631ffd57bc584a5261d2280026f33585e48a15194" }, "downloads": -1, "filename": "django-supervisor-0.2.1.tar.gz", "has_sig": false, "md5_digest": "3c95e395fe967d12aa961025a0ebd95d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19283, "upload_time": "2011-06-22T06:35:44", "url": "https://files.pythonhosted.org/packages/63/7d/413597506be5a0a04b9d3895d5d304c1ba6a46ec1de23ae89d8e68e2a0e6/django-supervisor-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "1c21b1a79b580cea55fe00e82e6d72ef", "sha256": "d61110996f7f691ee058707a70832d22a5ae7c633b20c6bb35efb78216509c45" }, "downloads": -1, "filename": "django-supervisor-0.2.2.tar.gz", "has_sig": false, "md5_digest": "1c21b1a79b580cea55fe00e82e6d72ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15166, "upload_time": "2011-06-26T08:50:50", "url": "https://files.pythonhosted.org/packages/65/f9/72bb63ce20b1fdf282c8717ad3659433ed5ce53f6a28e37213b4fe12c47b/django-supervisor-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "525689750339906c682fd36ea3962bb9", "sha256": "bc18901acdd707bb15fc2ab8c75de5f5d228023af6dcd90c5ee9f1208804065a" }, "downloads": -1, "filename": "django-supervisor-0.2.3.tar.gz", "has_sig": false, "md5_digest": "525689750339906c682fd36ea3962bb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19549, "upload_time": "2011-08-11T11:13:29", "url": "https://files.pythonhosted.org/packages/f7/01/7556ac06c23027ae2233d6b5274256511ea38767215ae1b35ca9c7d79ad9/django-supervisor-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "44127714f69b414968d18d9f80afa1ef", "sha256": "d42d039dd609c5e30c268619b855e5cbf0a93671a72ba03a5bfa995aa1596267" }, "downloads": -1, "filename": "django-supervisor-0.2.4.tar.gz", "has_sig": false, "md5_digest": "44127714f69b414968d18d9f80afa1ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20305, "upload_time": "2012-01-12T08:44:17", "url": "https://files.pythonhosted.org/packages/28/2c/2e7151ede85d60ec14907941a00bf5f1c8335f2e76b434326ae8c0bdbe50/django-supervisor-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "653eb64ea196595b146920cb0a6f98ee", "sha256": "71c79c77fd5a98b57e681766315a5fe7f04e19c243a4a7b9fe5fc61dc8a910d0" }, "downloads": -1, "filename": "django-supervisor-0.2.5.tar.gz", "has_sig": false, "md5_digest": "653eb64ea196595b146920cb0a6f98ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20139, "upload_time": "2012-01-24T12:08:58", "url": "https://files.pythonhosted.org/packages/db/18/7450f938c9fb4c8df950904dde736ffb19eaf4531f204f545d3d827262dd/django-supervisor-0.2.5.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "d0ffe280edd1b293eacf11a65087ad66", "sha256": "20a0aaa9f893cdb518131364f8cd8ff266d0761748eb539a0289fabcbdb29a86" }, "downloads": -1, "filename": "django-supervisor-0.2.7.tar.gz", "has_sig": false, "md5_digest": "d0ffe280edd1b293eacf11a65087ad66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21181, "upload_time": "2012-03-02T06:51:40", "url": "https://files.pythonhosted.org/packages/99/5b/38ef80a7d0d45a8f1adcb2c5f305eb235615ceca68139856b9713f3a93cf/django-supervisor-0.2.7.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d2e800a94918eb592867c4a8ef3829dd", "sha256": "d79edc080502d3a64e4e35bdb930507f0f95d4959f2655df95b647d5b6e9b260" }, "downloads": -1, "filename": "django-supervisor-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d2e800a94918eb592867c4a8ef3829dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21044, "upload_time": "2012-07-13T09:41:48", "url": "https://files.pythonhosted.org/packages/a6/ab/163d206235ab1c4f423a2bfe90065cd8085283db2d40403b97ec1f825770/django-supervisor-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "de4863165d5db78293ad4e3c2e15012e", "sha256": "29c2b169014e543037c238b1d914dc4488a14e894edeff151ca8afdce894921c" }, "downloads": -1, "filename": "django-supervisor-0.3.1.tar.gz", "has_sig": false, "md5_digest": "de4863165d5db78293ad4e3c2e15012e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20873, "upload_time": "2012-10-07T23:25:38", "url": "https://files.pythonhosted.org/packages/85/d6/abb33dc385d42202e03a4ba68240222ec855171bc9f4ffb80bbf911d9044/django-supervisor-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "820fd67123658fec56835730c2ff32fc", "sha256": "0b84b124f63ec0ab91f84b462537be02021bf2e6ec74ed2e6365a2a1a938c99f" }, "downloads": -1, "filename": "django-supervisor-0.3.2.tar.gz", "has_sig": false, "md5_digest": "820fd67123658fec56835730c2ff32fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21816, "upload_time": "2013-11-18T05:28:05", "url": "https://files.pythonhosted.org/packages/65/01/bcb90600985a497274af93fde9d2a6cdacbeb6bb82e9cd45d8fc002a56e7/django-supervisor-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "2e8b16a9888e80fefa5ecae6313761f9", "sha256": "12e502691fd54a811134681d29646e156ad6732d44ab2585e35cc4c47c918a7c" }, "downloads": -1, "filename": "django-supervisor-0.3.3.tar.gz", "has_sig": false, "md5_digest": "2e8b16a9888e80fefa5ecae6313761f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21492, "upload_time": "2015-10-24T03:59:15", "url": "https://files.pythonhosted.org/packages/dd/46/cff6b6f33c609d2af8efd0b874d308bd57fe88bd7c772a8966e0d16dd278/django-supervisor-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "fc17be234331345759d30a801512188c", "sha256": "e3ab46f8ba1ef6fe855bf3a3444252b6b63a8d71ba94f6a1045e3692501bfdf0" }, "downloads": -1, "filename": "django-supervisor-0.3.4.tar.gz", "has_sig": false, "md5_digest": "fc17be234331345759d30a801512188c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21601, "upload_time": "2015-12-07T01:27:23", "url": "https://files.pythonhosted.org/packages/b4/02/d88db0f441212a2fcd367808947fc9f81b93927d4fe5367336cf410beabc/django-supervisor-0.3.4.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "b53ad27a7a4be74075e5694f7f93b4e2", "sha256": "7f31daa0aa0a2d4aef802b6758bd64d1f9397f0aa42bf5b8e601a5856172d195" }, "downloads": -1, "filename": "django-supervisor-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b53ad27a7a4be74075e5694f7f93b4e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21669, "upload_time": "2016-09-04T06:56:16", "url": "https://files.pythonhosted.org/packages/5d/06/dbb523e743fc142a4895607d7dcb7986b9da81fddc59f22a6afd79643ff3/django-supervisor-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b53ad27a7a4be74075e5694f7f93b4e2", "sha256": "7f31daa0aa0a2d4aef802b6758bd64d1f9397f0aa42bf5b8e601a5856172d195" }, "downloads": -1, "filename": "django-supervisor-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b53ad27a7a4be74075e5694f7f93b4e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21669, "upload_time": "2016-09-04T06:56:16", "url": "https://files.pythonhosted.org/packages/5d/06/dbb523e743fc142a4895607d7dcb7986b9da81fddc59f22a6afd79643ff3/django-supervisor-0.4.0.tar.gz" } ] }