{ "info": { "author": "4teamwork AG", "author_email": "mailto:info@4teamwork.ch", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers" ], "description": "ftw.deploy\n==========\n\n``ftw.deploy`` provides opinionated tooling for git-push based deployment setups.\nThe tool helps installing hooks and deployment scripts.\n\n.. contents:: Table of Contents\n\n\nInstallation\n------------\n\n``ftw.deploy`` simply provides a ``deploy`` command as console script.\nIt requires Python 3!\n\nThe package can be installed with ``pip`` in combination with your favorite\nway of isolation / virtual-env.\n\nExample:\n\n.. code::\n\n $ python3 -m venv ftw.deploy\n $ cd ftw.deploy\n $ source bin/activate\n $ ./bin/pip install ftw.deploy\n\n # sym-link the deploy script into your PATH\n $ ln -s `pwd`/bin/deploy ~/bin\n $ deploy --help\n\n\nUsage\n-----\n\nAfter installation, should have a ``deploy`` command available.\nThe most recent documentation is available with ``deploy help``.\n\n\n**Initialize deploy scripts**\n\nThe first step in a fresh project is to initialize the deployment scripts.\nThis can be done with ``deploy init plone``.\nThis will create scripts in the folders ``deploy`` and ``scripts``.\n\n**Installing deployment and configuring the remote**\n\nNext, install the deployment on the server by cloning the repository and\nperforming installation steps.\nThen adapt ``scripts/setup-git-remotes`` with the deployment location and execute it.\n\n**Setup hook**\n\nFor installing the ``post-receive`` hook and configuring the repository execute the\n``deploy setup [remote]`` command.\n\n**Update scripts**\n\nYou can update existing scripts in a project with ``deploy update``.\n\n**Installing an update**\n\nWhen all is set up, you can simply push on the ``master``-branch of the remote in\norder to install an update. Examples:\n\n.. code::\n\n git push prod master\n git push test my-branch:master\n git push prod test/master:master\n\n**Rerun a deployment**\n\nIf you need to rerun a deployment, simply use ``deploy rerun [remote]``.\n\n**Connect to the deployment with ssh**\n\n``ftw.deploy`` provides a shortcut for connecting with ssh and cd'ing into\nthe deployment directory ``deploy ssh [remote]``.\n\n\nTemplates\n---------\n\nPlone\n~~~~~\n\nThe plone template contains push deployment scripts which are optimized for use in\ncombination with `ftw.buildouts `_.\n\n\nCustom update script\n++++++++++++++++++++\n\nThe ``deploy/after_push`` script can be configured to run another script\nthan ``deploy/update_plone``.\n\nFor example you could add a ``scripts/nightly-reinstall`` and then add to\nyour nightly buildout configuration file:\n\n.. code::\n\n [buildout]\n deployment-update-plone-script = scripts/nightly-reinstall\n\nBe aware that this must be in the ``buildout.cfg`` of the deployment (which\nmay be a symlink), but it can not be extended since the buildout config file\nis not parsed recursively for this option.\n\n\nAdvanced Usage\n--------------\n\nVPN without SSH\n~~~~~~~~~~~~~~~\n\nWhen the deployment is in a VPN without SSH access, we cannot push to the\ndeployment.\nIn this situation the ``deploy/pull`` script can be used for simulating a push.\nIt pulls from the upstream (the branch must have an upstream defined) and runs\nthe deployment scripts.\n\n\nZero Downtime\n~~~~~~~~~~~~~\n\nWhen upgrades need to be installed, the script normally takes the site offline\nin order to prevent conflicting writes to the database while the upgrades run.\n\nWhen having a zero downtime environment, such as when only a publihser writes\nthe database (which is stopped while running upgrades), it is safe to keep the\nsite running for anonymous users.\n\nIn order to enable this behavior you must set the ``deployment-zero-downtime``\noption in the buildout configurations which should be upgraded in zero downtime\nmode.\n\n**WARNING:** The ``deployment-zero-downtime`` must be in the ``buildout.cfg`` file\nof the deployment. It does not work when using ``extend`` for this option since\nthe option is directly read from ``buildout.cfg``.\n\nExample:\n\n.. code::\n\n [buildout]\n extends =\n ...\n\n deployment-zero-downtime = true\n\nDeploy one commit with zero downtime\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen deploying a commit with upgrade steps, the site will be taken offline\nunless zero downtime is configured.\nBut sometimes we want to deploy a commit with (fast) upgrades to a\nnon-zero-downtime deployment, but without downtime.\nFor marking a commit as \"zero-downtime proof\", you can push it to the branch\n`zero-downtime` on the deployment remote, before doing a regular deployment.\n\n.. code::\n\n $ git push testing master:zero-downtime\n $ git push testing master\n\n\nActivate zero downtime by environment variable\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen using deploy/pull, we can activate the zero downtime strategy\nwith an environment variable:\n\nExample:\n\n.. code::\n\n $ ZERO_DOWNTIME=true deploy/pull\n\n\nDevelopment\n-----------\n\nIn order to develop ``ftw.deploy``, you need to install\n`pipenv `_ and follow these instructions:\n\n.. code::\n\n $ git clone git@github.com:4teamwork/ftw.deploy.git\n $ cd ftw.deploy\n $ pipenv install --dev\n $ pipenv shell\n $ deploy --help\n $ pytest\n\n\nCopyright\n---------\n\nThis package is copyright by `4teamwork `_.\n\n``ftw.deploy`` is licensed under GNU General Public License, version 2.\n\nChangelog\n=========\n\n\n1.2.0 (2019-02-04)\n------------------\n\n- Add --tunnel option to deploy ssh. [jone]\n\n\n1.1.0 (2018-12-21)\n------------------\n\n- Fix bug causing crash when not in a git repository. [jone]\n\n- Provide \"deploy ssh\" command. [jone]\n\n\n1.0.0 (2018-12-21)\n------------------\n\n- Initial implementation. [jone]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/4teamwork/ftw.deploy", "keywords": "ftw deploy", "license": "GPL2", "maintainer": "", "maintainer_email": "", "name": "ftw.deploy", "package_url": "https://pypi.org/project/ftw.deploy/", "platform": "", "project_url": "https://pypi.org/project/ftw.deploy/", "project_urls": { "Homepage": "https://github.com/4teamwork/ftw.deploy" }, "release_url": "https://pypi.org/project/ftw.deploy/1.2.0/", "requires_dist": null, "requires_python": "", "summary": "Tooling and scripts for git push based deployment at 4teamwork.", "version": "1.2.0" }, "last_serial": 5823444, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "19057e625b2cb741cd1b08bcd0dc347a", "sha256": "fb0e357752ea70688b6ab8489992d9515638519f730bec9aa469708330958eee" }, "downloads": -1, "filename": "ftw.deploy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "19057e625b2cb741cd1b08bcd0dc347a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24192, "upload_time": "2018-12-21T08:10:45", "url": "https://files.pythonhosted.org/packages/ff/97/941e08bb7cca24070bc9aceea09e783fbdcdab46398e0e13b5c2c29931e1/ftw.deploy-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "f8bba18d3c87b2890629a93b02a76fa1", "sha256": "906de719e4640c361d86c03bb59129342b19e58eee9ffe4f07b656256a422be2" }, "downloads": -1, "filename": "ftw.deploy-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f8bba18d3c87b2890629a93b02a76fa1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25079, "upload_time": "2018-12-21T09:41:13", "url": "https://files.pythonhosted.org/packages/47/64/8c588d347d4d34e64ec5b2aceb9c10d22cdce0753bd30e730bb9233a85f1/ftw.deploy-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "142214c637f8d8ef858b6a735d9a0ed7", "sha256": "6fa141c4ddf0e4e9785fdda8448b9807f449de36c0acd2e5a67088fe566803f6" }, "downloads": -1, "filename": "ftw.deploy-1.2.0.tar.gz", "has_sig": false, "md5_digest": "142214c637f8d8ef858b6a735d9a0ed7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25602, "upload_time": "2019-02-04T16:45:03", "url": "https://files.pythonhosted.org/packages/64/b7/204edd87d7c79505f28e109f91814b727b0c69370559aef8abf528470edf/ftw.deploy-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "142214c637f8d8ef858b6a735d9a0ed7", "sha256": "6fa141c4ddf0e4e9785fdda8448b9807f449de36c0acd2e5a67088fe566803f6" }, "downloads": -1, "filename": "ftw.deploy-1.2.0.tar.gz", "has_sig": false, "md5_digest": "142214c637f8d8ef858b6a735d9a0ed7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25602, "upload_time": "2019-02-04T16:45:03", "url": "https://files.pythonhosted.org/packages/64/b7/204edd87d7c79505f28e109f91814b727b0c69370559aef8abf528470edf/ftw.deploy-1.2.0.tar.gz" } ] }