{ "info": { "author": "Feike Steenbergen", "author_email": "feike.steenbergen@zalando.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython" ], "description": "========\nGotthard\n========\nGotthard is a command line tool to simplify connecting to a PostgreSQL instance via a bastion_ host.\nThis tool is created in the context of zalando-stups_, however it could be used without it.\n\n.. contents::\n :local:\n :depth: 2\n\nInstallation\n============\n\n.. code-block:: bash\n\n $ sudo pip3 install --upgrade gotthard\n\nConfiguration\n=============\nGotthard does not have its own configuration. It uses the `piu configuration`_ file.\n\nUsage\n=====\nGotthard can provide help with the commands itself:\n\n.. code-block:: bash\n\n $ gotthard --help\n\nGotthard can run in two basic modes: in the foreground and in the background.\n\nWhen running in the background, gotthard establishes a tunnel and keeps the tunnel running in the background.\n\n.. code-block:: bash\n\n $ gotthard shipping.logistics.db.example.com\n\nWhen running in the foreground, the tunnel is established and the command you specify is executed.\nOnce your command finishes, the tunnel is closed. If you need to pass options to the command, you\nwill have to add the ``--`` to signify that the following options should not be interpreted by gotthard.\n\n.. code-block:: bash\n\n $ gotthard shipping.logistics.db.example.com psql\n $ gotthard shipping.logistics.db.example.com -- psql -U myusername\n\nStups: Requesting access to odd\n-------------------------------\nWhen using even & odd, the command will only succeed if you have been granted access to the odd host you are\ntrying to connect to. You can request access manually, but you can also have gotthard take care of this. When\nspecifying a reason, gotthard will actually execute a ``piu request-access`` for you.\n\n.. code-block:: bash\n\n $ gotthard shipping.logistics.db.example.com --reason=\"Investigating INCIDENT-123\" psql\n\nConnecting to a local Spilo\n---------------------------\nIf you want to connect to a Spilo_ that is running in the same network as your odd-host, you can use\nthe name of the Spilo appliance to connect.\nThis does however require you to be logged in to your AWS account, as we need to query your account.\n\n.. code-block:: bash\n\n $ gotthard shippinglogistics psql\n\nHow does it actually work\n================\nThe way Gotthard works is by setting up an ssh tunnel to the bastion host.\nIt chooses the local port specified a free local port to tunnel the requests to remote side to port 5432.\n\nWhen running in the background, it's task is done: It will report back the details of the tunnel.\n\nWhen running in the foregroed, Gotthard will export the PostgreSQL related `Environment Variables`_ to the process\nit needs to run. Most PostgreSQL client tools will use these environment variables to connect, most of your python or\nperl scripts should adhere to these variables as well.\n\n.. code-block:: bash\n\n $ gotthard shippinglogistics env | grep PG\n PGUSER=username\n PGHOST=localhost\n PGDATABASE=postgres\n PGPORT=52296\n PGSSLMODE=require\n\nExamples\n========\n\nExport a database\n-----------------\n\n.. code-block:: bash\n\n $ gotthard shipping.logistics.db.example.com --reason=\"FEATURE-123\" -- pg_dump -d fancydb -Fc -f fancydb.dump\n\nGet the size of an RDS database\n-------------------------------\n\n.. code-block:: bash\n\n $ query=\"SELECT pg_database_size(CURRENT_CATALOG)\"\n $ gotthard example.us-west-2.rds.amazonaws.com -- psql -U rds_admin -d featuredb -c \"$query\"\n\nDuplicate a Spilo database to your machine\n------------------------------------------\nThis actually requires you to have replication privileges.\n\n.. code-block:: bash\n\n $ gotthard shippinglogistics -- pg_basebackup -D /postgres/mydata\n\n\n\n.. _bastion: https://en.wikipedia.org/wiki/Bastion_host\n.. _zalando-stups: https://github.com/zalando-stups\n.. _piu configuration: http://stups.readthedocs.io/en/latest/components/piu.html#how-to-configure\n.. _Spilo: https://github.com/zalando/spilo\n.. _Environment variables: https://www.postgresql.org/docs/current/static/libpq-envars.html\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zalando-incubator/stups-gotthard", "keywords": "gotthard spilo tunnel postgresql", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "gotthard", "package_url": "https://pypi.org/project/gotthard/", "platform": "", "project_url": "https://pypi.org/project/gotthard/", "project_urls": { "Homepage": "https://github.com/zalando-incubator/stups-gotthard" }, "release_url": "https://pypi.org/project/gotthard/1.10/", "requires_dist": null, "requires_python": "", "summary": "Command line utility to tunnel a PostgreSQL connection", "version": "1.10" }, "last_serial": 4711909, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "a1a7bffa2a2ccf20437495522a96df2e", "sha256": "17dc2203475cc20330715b8cf72b80c4ff9608b8efffc2886aa65c7ebd760bc2" }, "downloads": -1, "filename": "gotthard-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a1a7bffa2a2ccf20437495522a96df2e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7561, "upload_time": "2016-07-26T12:22:45", "url": "https://files.pythonhosted.org/packages/f1/fc/013271ff9e5d562b5b43d60a8793f91df97bb40ac24cb5ac7482c2e29556/gotthard-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28e94d958985479d1d054942d2f3b2a9", "sha256": "81ca08135e676c7a369dbfb05d32aec71cdca800be9afaff95389a493ce122a6" }, "downloads": -1, "filename": "gotthard-0.5.tar.gz", "has_sig": false, "md5_digest": "28e94d958985479d1d054942d2f3b2a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6898, "upload_time": "2016-07-26T12:22:42", "url": "https://files.pythonhosted.org/packages/fd/79/909927760c49b74e50a68206f61bd0b63dbe13c4a4bfecf63381179e17d4/gotthard-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "ed403b56250695cb15530e6d527961b4", "sha256": "ac6df11d33cd347bbb2b49f85f6a217b76d414c7b7a4ae332567aa2ebd55d878" }, "downloads": -1, "filename": "gotthard-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "ed403b56250695cb15530e6d527961b4", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7656, "upload_time": "2016-08-04T15:45:42", "url": "https://files.pythonhosted.org/packages/be/a6/74ada2ee0573930b9aa82b2bfab51b08a75fff45f1554f208af149a6364e/gotthard-0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc44c3dc0baf4f679c59bcda0f4a1206", "sha256": "92bd4d596ef58ae2da52aafa2525650b60d36acd704af4125367e92122c29fcf" }, "downloads": -1, "filename": "gotthard-0.6.tar.gz", "has_sig": false, "md5_digest": "cc44c3dc0baf4f679c59bcda0f4a1206", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6974, "upload_time": "2016-08-04T15:45:39", "url": "https://files.pythonhosted.org/packages/72/db/4e1e6beabfb85f4bc165c3225ba7b2cb02d10d456894e675d1d0b523b502/gotthard-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "8ac9c65fa81fb6db36e4520d39cacd10", "sha256": "252550592e5b0c0150dfb694add625eeea2f8a2381c465042a7753b397d37515" }, "downloads": -1, "filename": "gotthard-0.7-py3-none-any.whl", "has_sig": true, "md5_digest": "8ac9c65fa81fb6db36e4520d39cacd10", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10812, "upload_time": "2016-08-08T10:00:11", "url": "https://files.pythonhosted.org/packages/4d/ae/bdb15e524722fc21a41c7e4cc085facab846cf92b988d51ac89851ccbba9/gotthard-0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "291dfd9f4db79d36260e12003afce78e", "sha256": "8f7d6bb21314248e19349215628b3d92cd22b53c617ece330ffa6a79263376f3" }, "downloads": -1, "filename": "gotthard-0.7.tar.gz", "has_sig": true, "md5_digest": "291dfd9f4db79d36260e12003afce78e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8816, "upload_time": "2016-08-08T10:00:00", "url": "https://files.pythonhosted.org/packages/d8/6b/7f35a92b56efe2784bd90db500e79f2280c32a255ad145ad4ab68575a9d4/gotthard-0.7.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "77f872e6e47858f5f94a688d46d1ee58", "sha256": "2f4357d5f7f7b17dd325e0e97af900c248af4f09af03db7d0d89dd04f3156351" }, "downloads": -1, "filename": "gotthard-0.9-py3-none-any.whl", "has_sig": true, "md5_digest": "77f872e6e47858f5f94a688d46d1ee58", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10812, "upload_time": "2016-08-16T05:03:35", "url": "https://files.pythonhosted.org/packages/25/0d/a5a68c8efd6ad02c4165899ce7306fab55d2bd65621b5b64bf6bba25fae4/gotthard-0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c0f3ae4114f95f492f23281e4ae9628", "sha256": "5c11d5b361421c47bb6156ee5413394545d7fbeecfd6d3138aa416ef32b2b755" }, "downloads": -1, "filename": "gotthard-0.9.tar.gz", "has_sig": true, "md5_digest": "1c0f3ae4114f95f492f23281e4ae9628", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8815, "upload_time": "2016-08-16T05:03:30", "url": "https://files.pythonhosted.org/packages/3b/9d/9c2c63034ed7b4b8268e3830b2281fa6d26f72f25e2529c24eb22b886e09/gotthard-0.9.tar.gz" } ], "1.10": [ { "comment_text": "", "digests": { "md5": "5f3e903d886142708bf2952b7c6e24e8", "sha256": "c3d410c86536e2633d8edb3b314197e4bf125f5953612607b20ce973e8fadcf3" }, "downloads": -1, "filename": "gotthard-1.10-py3-none-any.whl", "has_sig": false, "md5_digest": "5f3e903d886142708bf2952b7c6e24e8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10932, "upload_time": "2017-03-02T21:00:53", "url": "https://files.pythonhosted.org/packages/03/ae/6f6ce6c3ca969849c6557dcfc2376e4e5dac3be57dfd645c0edceaf56c73/gotthard-1.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c23c0a04e57cb898e2cc820430aa3f1", "sha256": "3d4fa6633d3bebbaff55975356d8af0e896874d6c49123169c3b62883ffa611d" }, "downloads": -1, "filename": "gotthard-1.10.tar.gz", "has_sig": false, "md5_digest": "8c23c0a04e57cb898e2cc820430aa3f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8908, "upload_time": "2017-03-02T21:00:50", "url": "https://files.pythonhosted.org/packages/22/68/422f401eb39fa16263dc863c25debb77246b8635a7b64a6e318ff867804e/gotthard-1.10.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f3e903d886142708bf2952b7c6e24e8", "sha256": "c3d410c86536e2633d8edb3b314197e4bf125f5953612607b20ce973e8fadcf3" }, "downloads": -1, "filename": "gotthard-1.10-py3-none-any.whl", "has_sig": false, "md5_digest": "5f3e903d886142708bf2952b7c6e24e8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10932, "upload_time": "2017-03-02T21:00:53", "url": "https://files.pythonhosted.org/packages/03/ae/6f6ce6c3ca969849c6557dcfc2376e4e5dac3be57dfd645c0edceaf56c73/gotthard-1.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c23c0a04e57cb898e2cc820430aa3f1", "sha256": "3d4fa6633d3bebbaff55975356d8af0e896874d6c49123169c3b62883ffa611d" }, "downloads": -1, "filename": "gotthard-1.10.tar.gz", "has_sig": false, "md5_digest": "8c23c0a04e57cb898e2cc820430aa3f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8908, "upload_time": "2017-03-02T21:00:50", "url": "https://files.pythonhosted.org/packages/22/68/422f401eb39fa16263dc863c25debb77246b8635a7b64a6e318ff867804e/gotthard-1.10.tar.gz" } ] }