{ "info": { "author": "opper", "author_email": "alex@opper.nl", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "## Jump\n\n### Intro \n\nUtility that builds a 2-level menu based on applications and their available environments. The setup that we have is that\nthis utility resides on a 'jump' server and every time a user connects to that server (via SSH), the menu script is \nexecuted. \n\nIn our current setup, there is 2 kinds of servers: one type which has serverpilot installed and another one which is \na vanilla ubuntu installation (both explained below)\n\nThis script also handles some applications/servers not being in the jumpgate.\n\nThe menu is built based on a JSON response from a server. The response looks like this:\n\n```json\n{\n \"items\": [\n {\n \"id\": \"b84b07c8-738e-4088-969f-0ee4c822fd3a\",\n \"in_jumpgate\": false,\n \"name\": \"test-app\",\n \"servers\": [\n {\n \"display_name\": \"Staging\",\n \"id\": \"939bf2ce-d0e0-42b8-8600-f7f7ef5db72b\",\n \"ip\": \"1.2.3.4\",\n \"is_serverpilot\": true,\n \"name\": \"staging\",\n \"port\": 222,\n \"user\": \"serverpilot\"\n },\n {\n \"display_name\": \"Production\",\n \"id\": \"6a7f9169-5fe3-49d2-8eea-bfafcc53f4de\",\n \"ip\": \"1.2.3.4\",\n \"is_serverpilot\": false,\n \"name\": \"prod\",\n \"port\": 222,\n \"user\": \"root\"\n }\n ]\n }, {\n \"id\": \"81a1afa3-f610-4b64-935f-7e93c025209b\",\n \"in_jumpgate\": true,\n \"last_backup\": 1538352010,\n \"name\": \"another-test-app\",\n \"servers\": [\n {\n \"created_at\": 1533644177,\n \"display_name\": \"Staging\",\n \"id\": \"939bf2ce-d0e0-42b8-8600-f7f7ef5db72b\",\n \"ip\": \"1.2.3.4\",\n \"is_serverpilot\": true,\n \"name\": \"staging\",\n \"port\": 222,\n \"updated_at\": 1533808205,\n \"user\": \"serverpilot\"\n }, {\n \"created_at\": 1533644177,\n \"display_name\": \"Acceptance\",\n \"id\": \"939bf2ce-d0e0-42b8-8600-f7f7ef5db72b\",\n \"ip\": \"1.2.3.4\",\n \"is_serverpilot\": true,\n \"name\": \"acceptance\",\n \"port\": 222,\n \"updated_at\": 1533808205,\n \"user\": \"serverpilot\"\n }\n ]\n }\n ]\n}\n```\n\nThis creates a menu like so:\n\n![](docs/img/app-menu.png)\n\nNote that only the 2nd item is shown because the first one has the property `in_jumpgate` set to False. When you select\nan app, you get a list of its available servers (environments):\n\n![](docs/img/env-menu.png)\n\nAfter selecting an item the SSH connection will be forwarded to that server.\n\n\n### Installation\n\nBefore you install the jumpgate, you need to have the dialog package installed. You can install it either via brew if \nyou're on MacOS or apt or yum or whatever.\n\nYou can install the jumpgate via pip:\n\n`pip install pyjump`\n\nBy default, the jumpgate will look for a file called `.jump.env` in your home directory containing the following values:\n\n- AUTH_KEY: If you use any kind of authentication when retrieving the items. If not, leave it empty.\n- AUTH_HEADER: If you use authentication (via a header) set this to the value of your header.\n- ENDPOINT: API endpoint from where to fetch the list of applications.\n\nIf you want to specify a different location for that file you can using the `--env-file` flag. Like so:\n\n`jump --env-file=/other/location/.env`\n\n### Usage\n\nAs mentioned above, there's 2 ways to use this. One is locally on your machine and another one is in one central server.\nThe latter is perfect for a team since every user just needs to ssh to the central server and everyone will see the same\napplications and servers (for now it does not have permission-checking built in). \n\n#### Locally\n\nIf you'd like to run the script locally (assuming you've run the install script above), you just need to use `jump`.\n\n#### On a central server\n\nAfter installing the script, there's a couple things that you'd need to do.\n\n- In `/etc/skel` create an .ssh folder and generate a privatey (and public) key with `ssh-keygen -t rsa`. What this will\ndo is have each created user have the same key when connecting to a remote server.\n- Copy the generated key to any `authorized_keys` file on any server(s) you want reachable from the script.\n- Add the following inside the `.bash_profile` file: `jump && exit`. This will execute on every user login\nand when the user decides to exit, it will also exit the session on the jump server. \n\nThen you can create any user and have them use the jumpgate.\n\nAs an extra security step, add a user's own key (aka from their own laptop or pc or what have you) to the `authorized_keys`\nfile for their user on the jumpgate.\n\n#### Todo:\n\n- figure way to handle .env file after installation\n- add to pypi for easy install\n\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/opper/jump", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyjump", "package_url": "https://pypi.org/project/pyjump/", "platform": "", "project_url": "https://pypi.org/project/pyjump/", "project_urls": { "Homepage": "https://github.com/opper/jump" }, "release_url": "https://pypi.org/project/pyjump/1.2/", "requires_dist": [ "python-dotenv", "pythondialog", "requests", "click" ], "requires_python": "", "summary": "Utility that builds a 2-level menu based on applications and their available environments.", "version": "1.2" }, "last_serial": 4731682, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "81873549fea005d8986910a3567f15c8", "sha256": "c92bdec40dec7dba86ad1bb2664569144abd1478df69998960acd5f6c9e079fc" }, "downloads": -1, "filename": "pyjump-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "81873549fea005d8986910a3567f15c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5439, "upload_time": "2018-10-04T13:36:49", "url": "https://files.pythonhosted.org/packages/70/ab/10614c0deb95d834000e721022e32d0164a4247d6b08b671ba618301f7ce/pyjump-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d27e6c5b14d418a05eedb34f2c4b8e2f", "sha256": "cd43369543201141d95754232134c1c74095ae4e5766b0ce875709c879b7cc9a" }, "downloads": -1, "filename": "pyjump-1.0.tar.gz", "has_sig": false, "md5_digest": "d27e6c5b14d418a05eedb34f2c4b8e2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4507, "upload_time": "2018-10-04T13:36:51", "url": "https://files.pythonhosted.org/packages/ab/ce/5406a52cff48c1a957db45368c8ff7ddddb706b0f322861fe26b11be5d0b/pyjump-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "57fc4dd5e29e142d1e3b76ceaf21c31e", "sha256": "279320f7a9ee4240ad93afc04b0b945c164aa242880df05d18f93bb02430ff68" }, "downloads": -1, "filename": "pyjump-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "57fc4dd5e29e142d1e3b76ceaf21c31e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5499, "upload_time": "2018-10-05T07:50:52", "url": "https://files.pythonhosted.org/packages/60/78/f683709b54d8544bae609d700984b0cf520d33a0315ffcc2227f755ff42e/pyjump-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a01335df1bc5c585cf4daf370abd05b3", "sha256": "1e6e033a43273e729db936224c13f9bac4b5ee5addeb905b0e74db655805aff2" }, "downloads": -1, "filename": "pyjump-1.1.tar.gz", "has_sig": false, "md5_digest": "a01335df1bc5c585cf4daf370abd05b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4596, "upload_time": "2018-10-05T07:50:54", "url": "https://files.pythonhosted.org/packages/45/28/c21122cfa2f7d44b9bce14374be27fe71b8ea43d52b0148644bf0647d274/pyjump-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "451b8fdbff0eb2c9c786b498d13e715b", "sha256": "b1415f3e46c2f025be864c4156373349e792b65205251995ed03c92881ca5e1f" }, "downloads": -1, "filename": "pyjump-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "451b8fdbff0eb2c9c786b498d13e715b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5591, "upload_time": "2019-01-23T15:02:25", "url": "https://files.pythonhosted.org/packages/e0/0d/13c03484e30799603e76eca9ad11f94c4688be9572e7820ec7d78092e56d/pyjump-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "874c16e985912d75470231feec529b6c", "sha256": "b917398505d87f35b077751f7ee088d3753fbf0fa4f027ddbc480a22b9d13403" }, "downloads": -1, "filename": "pyjump-1.2.tar.gz", "has_sig": false, "md5_digest": "874c16e985912d75470231feec529b6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4677, "upload_time": "2019-01-23T15:02:27", "url": "https://files.pythonhosted.org/packages/d6/b5/5d13f6bcdf001e4c61e85aa80426fb6c4697920ae968f4eb10ef530cf49d/pyjump-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "451b8fdbff0eb2c9c786b498d13e715b", "sha256": "b1415f3e46c2f025be864c4156373349e792b65205251995ed03c92881ca5e1f" }, "downloads": -1, "filename": "pyjump-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "451b8fdbff0eb2c9c786b498d13e715b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5591, "upload_time": "2019-01-23T15:02:25", "url": "https://files.pythonhosted.org/packages/e0/0d/13c03484e30799603e76eca9ad11f94c4688be9572e7820ec7d78092e56d/pyjump-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "874c16e985912d75470231feec529b6c", "sha256": "b917398505d87f35b077751f7ee088d3753fbf0fa4f027ddbc480a22b9d13403" }, "downloads": -1, "filename": "pyjump-1.2.tar.gz", "has_sig": false, "md5_digest": "874c16e985912d75470231feec529b6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4677, "upload_time": "2019-01-23T15:02:27", "url": "https://files.pythonhosted.org/packages/d6/b5/5d13f6bcdf001e4c61e85aa80426fb6c4697920ae968f4eb10ef530cf49d/pyjump-1.2.tar.gz" } ] }