{ "info": { "author": "Marek Andrzejczak", "author_email": "marek_andrzejczak@riseup.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Version Control", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": "Thin Deployer\n=============\n\n[![Build Status](https://travis-ci.org/riotkit-org/thin-deployer.svg?branch=master)](https://travis-ci.org/riotkit-org/thin-deployer)\n![Docker Build Status](https://img.shields.io/docker/build/wolnosciowiec/thin-deployer.svg)\n![GitHub release](https://img.shields.io/github/release/riotkit-org/thin-deployer.svg?style=popout)\n![PyPI](https://img.shields.io/pypi/v/thin-deployer.svg?style=popout)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/thin-deployer.svg)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/thin-deployer.svg)\n[![codecov](https://codecov.io/gh/riotkit-org/thin-deployer/branch/master/graph/badge.svg)](https://codecov.io/gh/riotkit-org/thin-deployer)\n\nSecurely runs your deployment commands triggered by a HTTP call.\n\nExample case:\n- POST an information to the /deploy/my-service\n- Do the git pull && ./deploy.sh\n\nPIP: https://pypi.org/project/Thin-Deployer/\nTravis: https://travis-ci.org/riotkit-org/thin-deployer\nDocker: https://hub.docker.com/r/wolnosciowiec/thin-deployer/\n\nFree software\n-------------\n\nCreated for an anarchist portal, with aim to propagate the freedom and grass-roots social movements where the human and it's needs is on first place, not the capital and profit.\n\n- https://wolnosciowiec.net\n- http://iwa-ait.org\n- http://zsp.net.pl\n\nConfiguration\n-------------\n\nDefault configuration path is ~/.deployer.yml, but can be specified with a switch `--configuration={{ file path }}`\n\nExample:\n```\n\n# service definition (and service name there)\nphpdenyhosts:\n # token used to authorize via \"token\" GET parameter, or \"X-Auth-Token\" header\n token: some-token-goes-here-use-only-at-least-64-characters-long-tokens\n\n # optional: support for notifying Slack and other messengers\n # with wolnosciowiec-notification-client\n use_notification: true\n notification_group: \"logs\"\n\n # working directory to be in to execute every command\n pwd: /var/www/app\n\n # could be empty, if not empty then the deploy will execute\n # only if the INCOMING REQUEST BODY will match this regexp\n # useful for example to deploy only from a proper branch\n request_regexp: \"\\\"branch\\\": \\\"([production|stage]+)\\\"\"\n\n # commands to execute in order\n commands:\n - git pull\n - composer install --no-dev\n\n# (...) there could be more service definitions\n```\n\nInstalling via PIP\n------------------\n\nOne of the ways, a traditional one is to install as a Python package on the host machine.\n\n```bash\npip install Thin-Deployer\nthin-deployer --configuration=/etc/thin-deployer/.deployer.yml\n```\n\nInstalling via Docker\n---------------------\n\nModern and more secure way is to use a docker image to run the thin-deployer inside of an isolated container.\n\n```bash\nsudo docker run -p 8012:8012 -v ./deployer.yml:/root/.deployer.yml --rm --name thin-deployer wolnosciowiec/thin-deployer\n```\n\nRunning dev environment\n-----------------------\n\n```\nmake install_dependencies\n\n# simplest form with all default params\nmake run\n\n# or advanced with possibility to add commandline switches\npython3 ./bin/deployer.py\n```\n\n##### Logging to file\n\nUse `--log-file-prefix={{ path_to_log_file }}` switch to save logs to file.\n\n#### Changing port number and bind address\n\n- `--port={{ port_number }}` switch will change server listen port\n- `--listen={{ ip_addres }}` makes server listen to given address, defaults to 0.0.0.0\n\nExample request to trigger the deployment\n-----------------------------------------\n\n```\nPOST /deploy/phpdenyhosts HTTP/1.1\nHost: localhost:8012\nX-Auth-Token: some-token-goes-here-use-only-at-least-64-characters-long-tokens\n\n```\n\nExample response\n----------------\n\n```\n{\n \"output\": \"Command \\\"ls -la /nonexisting\\\" failed, output: \\\"b''\\\"\"\n}\n```\n\nHeaders:\n- X-Runs-As: UNIX username of a user on which privileges the server is working on\n\nDependencies\n------------\n\n- Python 3\n- python-yaml\n- Tornado Framework\n- py-healthcheck\n- [Wolno\u015bciowiec Notification server set up somewhere](https://github.com/Wolnosciowiec/wolnosciowiec-notification) (optionally - only for notifications)\n- [Wolno\u015bciowiec Notification Shell Client](https://github.com/Wolnosciowiec/wolnosciowiec-notification-shell-client) (optionally - only for notifications)\n\nHealth checking\n---------------\n\nService provides a simple monitoring endpoint at GET /technical/healthcheck\n\nAuthorization is done in two ways.\nIts up to you to use a preferred one in a request to the endpoint.\n\n- A header `X-Auth-Token` with a token as a value\n- Basic authorization data, login can be any, as a password please type the token\n\nExamples of headers:\n- Authorization: YWFhOnRlc3Q=\n- X-Auth-Token: test\n\n#### Configuration\n\nHealth check endpoint is configurable via environment variables.\n\n- `HC_TOKEN={{ token }}` health check access token\n- `HC_MIN_TOKEN_LENGTH={{ min_length }}` minimum length of a token in every service\n- `HC_MAX_DISK_USAGE={{ max_disk_usage_percentage }}` defaults to 90 (it's 90%), when disk usage is higher or equals to this value then an error will be reported\n\nAlternatives\n------------\n\n- Webhook: https://github.com/adnanh/webhook\n\nNotifications\n-------------\n\nEach deployment can produce a notification with output, supported notification format is Slack/Mattermost (webhook url required)\n\nGood practices of securing the service\n--------------------------------------\n\n1. Its good to use long tokens\n2. Hide the service behind a load balancer with a request rate per second limited (to avoid brute force attacks)\n3. Optionally add a basic auth (this may impact usage of the service by external client applications)\n4. Use SSL behind load balancer when service is called from the internet\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Wolnosciowiec/thin-deployer", "keywords": "", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "Thin-Deployer", "package_url": "https://pypi.org/project/Thin-Deployer/", "platform": "", "project_url": "https://pypi.org/project/Thin-Deployer/", "project_urls": { "Homepage": "https://github.com/Wolnosciowiec/thin-deployer" }, "release_url": "https://pypi.org/project/Thin-Deployer/1.1.0/", "requires_dist": [ "py-healthcheck (>=1.6.1)", "PyYAML (>=3.12)", "tornado (>=4.5)", "jsonschema (>=2.6)", "requests (>=2.19)" ], "requires_python": ">=3.6", "summary": "Webhook handler that can be used to deploy on push for example", "version": "1.1.0" }, "last_serial": 5144482, "releases": { "0.0.1.dev49": [ { "comment_text": "", "digests": { "md5": "3ae656711b35212634e73e0974e5dc04", "sha256": "89d71e2cd8e9034e792e4451045bb01760be065538f355f3e3ada04439456e3c" }, "downloads": -1, "filename": "Thin_Deployer-0.0.1.dev49-py3-none-any.whl", "has_sig": false, "md5_digest": "3ae656711b35212634e73e0974e5dc04", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14038, "upload_time": "2018-10-19T15:59:53", "url": "https://files.pythonhosted.org/packages/ea/a7/39e41db4defc741acbb3c9a1c14782593b77f1dae64c7bb26dcf1f10dd04/Thin_Deployer-0.0.1.dev49-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22b482c449aaee510a3a8a8de9a7cf30", "sha256": "b67c068ee053d84558c3cd3beb92e39d8855dc746c0b87634164ea2c261c0cdc" }, "downloads": -1, "filename": "Thin-Deployer-0.0.1.dev49.tar.gz", "has_sig": false, "md5_digest": "22b482c449aaee510a3a8a8de9a7cf30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15878, "upload_time": "2018-10-19T15:59:54", "url": "https://files.pythonhosted.org/packages/e0/2d/50fbb75adb85b4591e34ee6a1d5952bcc32304dd1a12afe90941cf03bf43/Thin-Deployer-0.0.1.dev49.tar.gz" } ], "0.0.1.dev54": [ { "comment_text": "", "digests": { "md5": "fef4b2a15b65ba56cef242a8a27d41cb", "sha256": "772dea50c2066afdb8534788e5783a05f91bb26bcf9a82036490988d88a728e1" }, "downloads": -1, "filename": "Thin_Deployer-0.0.1.dev54-py3-none-any.whl", "has_sig": false, "md5_digest": "fef4b2a15b65ba56cef242a8a27d41cb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14324, "upload_time": "2019-04-13T12:01:40", "url": "https://files.pythonhosted.org/packages/d7/17/e94c1ec73773474de5f4ad33174ed41aafc03894b77f98c32eab602558d4/Thin_Deployer-0.0.1.dev54-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "056e722a96a7fe10e1d59866a2563691", "sha256": "320ff8d1f38627939e9482bb190e2282a63ab75f488b0434217beb742dfa9362" }, "downloads": -1, "filename": "Thin-Deployer-0.0.1.dev54.tar.gz", "has_sig": false, "md5_digest": "056e722a96a7fe10e1d59866a2563691", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16550, "upload_time": "2019-04-13T12:01:41", "url": "https://files.pythonhosted.org/packages/b1/4c/947bdda9bbe7fb17982905551af022e49f61be2ee80b051c445b04426d80/Thin-Deployer-0.0.1.dev54.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ff7bcb94079a6dfcb759d0bcef6d248d", "sha256": "1c9cfda2bd85218b431b0e9ea66baca548508169844346710bf59f6c725d2ab6" }, "downloads": -1, "filename": "Thin_Deployer-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ff7bcb94079a6dfcb759d0bcef6d248d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 13930, "upload_time": "2018-10-19T16:41:50", "url": "https://files.pythonhosted.org/packages/9a/25/3f975b5056978fc3c5dd02bd0e71fadb3f5ea286a32c4837ed1b457e48ca/Thin_Deployer-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "129ef72941a9d501e3f0b57533538528", "sha256": "47d2149c50a0f3a7e1a980ffc1498eedbf602531e2bbf653665e22c7468253f2" }, "downloads": -1, "filename": "Thin-Deployer-1.0.0.tar.gz", "has_sig": false, "md5_digest": "129ef72941a9d501e3f0b57533538528", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 15888, "upload_time": "2018-10-19T16:41:51", "url": "https://files.pythonhosted.org/packages/dc/ce/6fa4fa36078104bedfd643f8249f11276c0b2e6df9c3ce70f1665823af4c/Thin-Deployer-1.0.0.tar.gz" } ], "1.0.1.dev11": [ { "comment_text": "", "digests": { "md5": "d9aba92d2fc899bdbb39adc8f0952af1", "sha256": "5b28af22dad2456cdc2feb297be79a2b1d5855ad7a6c274b6177f3dcc612b56f" }, "downloads": -1, "filename": "Thin_Deployer-1.0.1.dev11-py3-none-any.whl", "has_sig": false, "md5_digest": "d9aba92d2fc899bdbb39adc8f0952af1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14333, "upload_time": "2019-04-13T12:02:08", "url": "https://files.pythonhosted.org/packages/f2/7f/e34d2e17cf6934a99736d267ad2c436eea6565a781e6dead8be54879690a/Thin_Deployer-1.0.1.dev11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "19dc10a001c9a8f292d5b9aa23629394", "sha256": "f00ce285ca5bc626d198c5cf213b713d952a2e2c0299b12f4c7e6d42d3bc6de5" }, "downloads": -1, "filename": "Thin-Deployer-1.0.1.dev11.tar.gz", "has_sig": false, "md5_digest": "19dc10a001c9a8f292d5b9aa23629394", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 16569, "upload_time": "2019-04-13T12:02:09", "url": "https://files.pythonhosted.org/packages/49/18/b2dca670f085b3d324f377d65d5d07221fe91ba937efbde936ae09e575be/Thin-Deployer-1.0.1.dev11.tar.gz" } ], "1.0.1.dev12": [ { "comment_text": "", "digests": { "md5": "620834db9b6bfdbd4f2dcc2ab9b600fd", "sha256": "7dfee40aacb04604d85e79391d8563d27dbfdf5d5e9ff70aaec455639e979054" }, "downloads": -1, "filename": "Thin_Deployer-1.0.1.dev12-py3-none-any.whl", "has_sig": false, "md5_digest": "620834db9b6bfdbd4f2dcc2ab9b600fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14331, "upload_time": "2019-04-14T07:00:24", "url": "https://files.pythonhosted.org/packages/16/69/0f34809dd161e0aba3c26e73d0aff4d417af38cc75ec406a96b84d895b2c/Thin_Deployer-1.0.1.dev12-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c0d9631b73a3fdc1049b7d8555d3bca", "sha256": "6dd40a18bb25348b78a636ffd464c56df052fd94435755f2dcf16dbc7ce07025" }, "downloads": -1, "filename": "Thin-Deployer-1.0.1.dev12.tar.gz", "has_sig": false, "md5_digest": "8c0d9631b73a3fdc1049b7d8555d3bca", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 16590, "upload_time": "2019-04-14T07:00:26", "url": "https://files.pythonhosted.org/packages/d5/0d/92cb2cfc247356da38e864b4e5967e521c6ff9433255829de2c752c9130c/Thin-Deployer-1.0.1.dev12.tar.gz" } ], "1.0.1.dev13": [ { "comment_text": "", "digests": { "md5": "0b6e9383879c540da20d4e474eebf2fd", "sha256": "a2a76c12a5f7224216736b091e3c30b7891e84736515231980d94a1eaf36dadc" }, "downloads": -1, "filename": "Thin_Deployer-1.0.1.dev13-py3-none-any.whl", "has_sig": false, "md5_digest": "0b6e9383879c540da20d4e474eebf2fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14477, "upload_time": "2019-04-15T12:30:50", "url": "https://files.pythonhosted.org/packages/d2/05/5508249175d11b3bfa2625fb7ce2d4915c39a78a3e5d54fd6115601ad593/Thin_Deployer-1.0.1.dev13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2e008a3a1a25ab2efbba73b6a8d99c2", "sha256": "cf484a276c0bf048a8617ea4111e81558efe973ffa73937c29f14dafe64fffed" }, "downloads": -1, "filename": "Thin-Deployer-1.0.1.dev13.tar.gz", "has_sig": false, "md5_digest": "d2e008a3a1a25ab2efbba73b6a8d99c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 16886, "upload_time": "2019-04-15T12:30:51", "url": "https://files.pythonhosted.org/packages/3b/39/163b91309a815a606b6d155ee9e72fa7b725205aa08d41a8f1d3981379aa/Thin-Deployer-1.0.1.dev13.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2c029603fb115c094d6c9f9c2c18cc88", "sha256": "5ed4da30192670b00410955b0c51613119e5b8d7015609cf458346e705f72a4a" }, "downloads": -1, "filename": "Thin_Deployer-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2c029603fb115c094d6c9f9c2c18cc88", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14359, "upload_time": "2019-04-15T12:34:54", "url": "https://files.pythonhosted.org/packages/af/f9/cea8d294968e9ae886f48868cb69fbac75aadbaa18f014bdc467df91736b/Thin_Deployer-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01fd5e8efd395fff02cf88c297806627", "sha256": "b22ee2ccbdf66d7d69433f33ae035d1bc05c16f4b445eddf7448c9fa6a2bd151" }, "downloads": -1, "filename": "Thin-Deployer-1.1.0.tar.gz", "has_sig": false, "md5_digest": "01fd5e8efd395fff02cf88c297806627", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 16876, "upload_time": "2019-04-15T12:34:56", "url": "https://files.pythonhosted.org/packages/e2/57/132b789e42409b7c85d317f7771f59891c171469f0c43b2fe500dabbff52/Thin-Deployer-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c029603fb115c094d6c9f9c2c18cc88", "sha256": "5ed4da30192670b00410955b0c51613119e5b8d7015609cf458346e705f72a4a" }, "downloads": -1, "filename": "Thin_Deployer-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2c029603fb115c094d6c9f9c2c18cc88", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14359, "upload_time": "2019-04-15T12:34:54", "url": "https://files.pythonhosted.org/packages/af/f9/cea8d294968e9ae886f48868cb69fbac75aadbaa18f014bdc467df91736b/Thin_Deployer-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01fd5e8efd395fff02cf88c297806627", "sha256": "b22ee2ccbdf66d7d69433f33ae035d1bc05c16f4b445eddf7448c9fa6a2bd151" }, "downloads": -1, "filename": "Thin-Deployer-1.1.0.tar.gz", "has_sig": false, "md5_digest": "01fd5e8efd395fff02cf88c297806627", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 16876, "upload_time": "2019-04-15T12:34:56", "url": "https://files.pythonhosted.org/packages/e2/57/132b789e42409b7c85d317f7771f59891c171469f0c43b2fe500dabbff52/Thin-Deployer-1.1.0.tar.gz" } ] }