{ "info": { "author": "Steve Pentland", "author_email": "swarmerproject@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: System :: Distributed Computing", "Topic :: Utilities" ], "description": "# Swarmer\n[![Build Status](https://travis-ci.com/stevepentland/swarmer.svg?branch=master)](https://travis-ci.com/stevepentland/swarmer)\n\nPython application and API to run services from within a docker swarm.\n\n# *NOTE*\nThere have been some significant changes between versions 0.2.6 and version 0.3.0 that\nchange the way swarmer is installed and works to provide authentication to private\ndocker registries. This documentation will be updated soon to reflect that.\n\n# How it works\nThe swarmer lives in a service inside a docker swarm. Once exposed, it offers an\nAPI to activate one shot docker service runs. There is a companion application to this\nservice that is responsible for reporting the results back to this service. Once all\ntasks within a job are complete, the complete set of results is posted back to a specified\ncallback URL.\n\n## Clients\n\nWhile any client that is compatible of running your subject code from within another container\nbased on the values passed will work, there is a default client you can view. This list\nwill be updated when more default clients become available:\n\n- [swarmer-client-js](https://github.com/stevepentland/swarmer-client-js)\n\n# Dependencies\nTo run, this image requires a redis service to be available, and to receive results, you'll\nneed a callback url accepting POST data (application/json) that is accessible from the your swarm\nlocation.\n\n# Getting started\n\nYou can take the compose example in this repository and run it as it is in your docker swarm\nvia `docker stack deploy -c docker-compose.yml`, changing any of the values that you see fit.\n\nOnce started, there will be a service exposed at the address of your swarm that you can \npost jobs to. \n\n## The initial request\n\nWhen you want to submit a new job, you send a request to the `/submit` endpoint, with a \ncontent type of `application/json` and a body with the following:\n\n```json\n{\n \"image_name\": \"some-image:latest\",\n \"callback_url\": \"your postback url\"\n}\n```\n\nYou will receive a response with an identifier, this is a unique job id you can use to submit\ntasks to your job. \n\n## Adding tasks\n\nOnce your job has been created, you can submit a list of tasks to it. This is done via the\n`/submit//tasks` POST endpoint, where `identifier` is the id value you were\ngiven when the job was created. The body of this request should look like the following:\n\n```\n{\n \"tasks\": [\n {\n \"task_name\": \"\",\n \"task_args\": [\"arg-one\", \"arg-two\", ...]\n },\n ...\n ]\n}\n```\nOnce the tasks have been submitted, they will begin running immediately.\n\n## Checking the status of a job\n\nIf you have a running job that you would like to check on, you can send\na GET request to the `/status/` resource, where `identifier`\nis the id value of your job.\n\n# Getting your results\n\nOnce all the tasks for your job are complete, the URL you specified\nin the `callback_url` field will receive a POST request with the \ncollected results. The general format is:\n\n```json\n{\n \"__image\": \"your image\",\n \"__callback_url\": \"your url\",\n \"tasks\": [\n {\n \"name\": \"task name\",\n \"status\": 0,\n \"args\": [\"your\", \"args\"],\n \"result\": {\n \"stdout\": \"the output written to stdout\",\n \"stderr\": \"the output written to stderr\"\n }\n },\n ...\n ]\n}\n```\n\nFor each task, the `status` field represents the exit\nstatus of the task process, while the `result` object\ncontains the output that your task wrote to the two \noutput streams.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stevepentland/swarmer", "keywords": "docker swarm", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "swarmer", "package_url": "https://pypi.org/project/swarmer/", "platform": "", "project_url": "https://pypi.org/project/swarmer/", "project_urls": { "Homepage": "https://github.com/stevepentland/swarmer" }, "release_url": "https://pypi.org/project/swarmer/0.5.0/", "requires_dist": [ "redis (==2.10.6)", "falcon (==1.4.1)", "docker (==3.5.1)", "docker-pycreds (==0.3.0)", "ulid-py (==0.0.7)", "requests (==2.20.0)", "gunicorn (==19.9.0)", "jsonschema (==2.6.0)", "boto3 (<1.10,>=1.9) ; extra == 'aws'" ], "requires_python": ">=3.6, <4", "summary": "Docker Swarm One-Shot Service Runner", "version": "0.5.0" }, "last_serial": 4574198, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "35ecac743eade15422a476b585c2824f", "sha256": "b4e1e28fe1b100a408a6021eb6a6d855d1135365c12f4eca80a454bd1bc15ecb" }, "downloads": -1, "filename": "swarmer-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "35ecac743eade15422a476b585c2824f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 17512, "upload_time": "2018-11-23T04:27:40", "url": "https://files.pythonhosted.org/packages/86/5a/0990b092365ad70d63a7ca071b400b1758f0271cfd9cf86b913144cb13e8/swarmer-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d744d44b02cfab593f8ba3c405d26a58", "sha256": "585d5d38a5a245e59b67398e1333439ca1ad016877314a03e3f833fc5890b87c" }, "downloads": -1, "filename": "swarmer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d744d44b02cfab593f8ba3c405d26a58", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 14132, "upload_time": "2018-11-23T04:27:42", "url": "https://files.pythonhosted.org/packages/5d/28/9558133c7ceb86b1c47de71295092f6f785ccbd1a4a8249d49428409a277/swarmer-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "75425e03cd43f500dffdb018e6830249", "sha256": "c5c1aa0f7106f01fc245fa2aebd143f3e51c898816c561a7872d8c50d5a4df14" }, "downloads": -1, "filename": "swarmer-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "75425e03cd43f500dffdb018e6830249", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 19181, "upload_time": "2018-11-25T05:05:19", "url": "https://files.pythonhosted.org/packages/c8/03/86d659e056c049ecfbe34c3c63e4e370c0c6b711151c9dcf1a58afcccd45/swarmer-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab2331aa8e9d299a0c69f0bc8e782ff", "sha256": "557ea7b45ea9e3e94a055f644a44abea3b0aaf3fc897862487e5760ef60990f2" }, "downloads": -1, "filename": "swarmer-0.4.0.tar.gz", "has_sig": false, "md5_digest": "6ab2331aa8e9d299a0c69f0bc8e782ff", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 15334, "upload_time": "2018-11-25T05:01:30", "url": "https://files.pythonhosted.org/packages/70/46/61dbc1f16fb90c5de85cd4f24bf9dd90ee197eabe489a830ffae1a3186a6/swarmer-0.4.0.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "0df76b1521671ba67f6e4f398f989446", "sha256": "d0b9b28a1a9f45dc0b7f237e2e8a586d7290824fa853d406262fcdb705c3cf98" }, "downloads": -1, "filename": "swarmer-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0df76b1521671ba67f6e4f398f989446", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 19185, "upload_time": "2018-11-26T14:26:32", "url": "https://files.pythonhosted.org/packages/86/f1/b3e09c9f58005bc1d9c3b6558acaf92016bcc88b1becdea6c1fdfceebee0/swarmer-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6eb7d9958c4bbb92c9e0120ea3a500a9", "sha256": "5140cbf8ae29145a8209d5e7565f4337a7418ed12fafbaa1c77b358685af6e0b" }, "downloads": -1, "filename": "swarmer-0.4.2.tar.gz", "has_sig": false, "md5_digest": "6eb7d9958c4bbb92c9e0120ea3a500a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 15340, "upload_time": "2018-11-26T14:26:33", "url": "https://files.pythonhosted.org/packages/67/fa/6292887518565509c9f83b5771445f5e955134a38ab86c71afc24216c006/swarmer-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "02f4ba3eab365c3389622e1df7ad9c5c", "sha256": "0c37095d72fceaf0f7eedb824f765f2d012595e35a8e213acf330bc48e8f78bc" }, "downloads": -1, "filename": "swarmer-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "02f4ba3eab365c3389622e1df7ad9c5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 18925, "upload_time": "2018-11-26T23:49:53", "url": "https://files.pythonhosted.org/packages/c2/1c/5b2d18a59e10cd1ca688d49a05f101246f50fe53df3c30117588fbfa4c32/swarmer-0.4.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ecf6b280276aa70883410ebcab542469", "sha256": "6627c3ffe044408e2310fa5f06c42ae31461dc842b37ee85cb12f07d155a1c27" }, "downloads": -1, "filename": "swarmer-0.4.3.tar.gz", "has_sig": false, "md5_digest": "ecf6b280276aa70883410ebcab542469", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 15103, "upload_time": "2018-11-26T23:49:55", "url": "https://files.pythonhosted.org/packages/7f/8a/3fdc9ca9b7170eed43ab43535c104a9674aeb17145f5991b84272d25c9a1/swarmer-0.4.3.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "bbda80bb0a9dc52f410fdf5f8d386787", "sha256": "00f8b7e6273523d0666317d419471a2e9b674489455cf0485f786e0a76f2c3d8" }, "downloads": -1, "filename": "swarmer-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bbda80bb0a9dc52f410fdf5f8d386787", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 19133, "upload_time": "2018-11-27T01:55:47", "url": "https://files.pythonhosted.org/packages/75/b0/bb7c8a7c4707985070e5ea1fd4cb11ed5e6bf4a77a4ebf878e554896313f/swarmer-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d12a8c2c336ab41f6dbde366f8a9a865", "sha256": "0b4543e82643655207974141f594ff6dd81b8df85b0fe6ec32ba61b800794f31" }, "downloads": -1, "filename": "swarmer-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d12a8c2c336ab41f6dbde366f8a9a865", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 15335, "upload_time": "2018-11-27T01:55:49", "url": "https://files.pythonhosted.org/packages/75/c8/7eae86a97016d871885b24106d59c41f470601a33a3852a5fbac1725b79e/swarmer-0.5.0.tar.gz" } ], "0.6.0rc1": [ { "comment_text": "", "digests": { "md5": "6e47477e3a882af7f25f934371414e7a", "sha256": "2e21406689afa8a01b942d622e200ad708e5204a44d5211fc8eac97160d21e8d" }, "downloads": -1, "filename": "swarmer-0.6.0rc1-py3-none-any.whl", "has_sig": false, "md5_digest": "6e47477e3a882af7f25f934371414e7a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 20843, "upload_time": "2018-12-08T03:45:28", "url": "https://files.pythonhosted.org/packages/d1/51/bf6c52958fd7f8e19ad1e900e6ba90efce1f83b6154c81e69dd3330c84fc/swarmer-0.6.0rc1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac42658a57850e66af1fc8014cf590b6", "sha256": "f47db6961a432f84d2230a7facb3de6254db512bb4443bd9f4b17dc58222cb6d" }, "downloads": -1, "filename": "swarmer-0.6.0rc1.tar.gz", "has_sig": false, "md5_digest": "ac42658a57850e66af1fc8014cf590b6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 16083, "upload_time": "2018-12-08T03:45:29", "url": "https://files.pythonhosted.org/packages/e8/7a/486536af053f5a87d0715864f2df6fa14263975db6c94a3b7a78bc67e078/swarmer-0.6.0rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bbda80bb0a9dc52f410fdf5f8d386787", "sha256": "00f8b7e6273523d0666317d419471a2e9b674489455cf0485f786e0a76f2c3d8" }, "downloads": -1, "filename": "swarmer-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bbda80bb0a9dc52f410fdf5f8d386787", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 19133, "upload_time": "2018-11-27T01:55:47", "url": "https://files.pythonhosted.org/packages/75/b0/bb7c8a7c4707985070e5ea1fd4cb11ed5e6bf4a77a4ebf878e554896313f/swarmer-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d12a8c2c336ab41f6dbde366f8a9a865", "sha256": "0b4543e82643655207974141f594ff6dd81b8df85b0fe6ec32ba61b800794f31" }, "downloads": -1, "filename": "swarmer-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d12a8c2c336ab41f6dbde366f8a9a865", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 15335, "upload_time": "2018-11-27T01:55:49", "url": "https://files.pythonhosted.org/packages/75/c8/7eae86a97016d871885b24106d59c41f470601a33a3852a5fbac1725b79e/swarmer-0.5.0.tar.gz" } ] }