{ "info": { "author": "Ruslan Korniichuk", "author_email": "ruslan.korniichuk@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: Public Domain", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2 :: Only", "Topic :: Scientific/Engineering", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": ".. contents:: Table of contents\n :depth: 2\n\nInstallation\n============\nInstall the rk from PyPI\n------------------------\n::\n\n $ sudo pip install rk\n\nInstall the rk from GitHub\n--------------------------\n::\n\n $ sudo pip install git+git://github.com/korniichuk/rk#egg=rk\n\nUpgrade the rk from PyPI\n------------------------\n::\n\n $ sudo pip install -U rk\n\nor::\n\n $ sudo pip install --upgrade rk\n\n.. important:: The rk set to dafault the `kernels dict`_ ``kernels.json``. Save the current `kernels dict`_ to home dir before upgrade, and replace default `kernels dict`_ file after.\n\nUninstall the rk\n----------------\n::\n\n $ sudo pip uninstall rk\n\nDevelopment installation\n========================\n::\n\n $ git clone git://github.com/korniichuk/rk.git\n $ cd rk\n $ sudo pip install .\n\nQuickstart\n==========\n\n.. image:: ./img/quickstart_0001_728px.png\n :alt: quickstart [youtube video]\n :target: https://youtu.be/joEIPZJUB94\n\n**First**, make sure that you can login to a remote machine without entering password. The most basic form of the command is::\n\n $ ssh REMOTE_HOST\n\nIf your username is different on a remote machine, you can specify it by using this syntax::\n\n $ ssh REMOTE_USERNAME@REMOTE_HOST\n\nExample::\n\n $ ssh albert@192.168.0.1\n\n.. note:: You can `setup SSH for auto login without a password`_ like this: ``$ rk ssh``.\n\n**Second**, install a template of a remote jupyter kernel to `kernels location`_::\n\n $ rk install-template\n\n**Third**, change the ``kernel.json`` file::\n\n $ sudo gedit /usr/local/share/jupyter/kernels/template/kernel.json\n\nThe ``kernel.json`` file looks like this::\n\n {\n \"argv\": [\n \"rkscript\",\n \"python\",\n \"{connection_file}\",\n \"remote_username@remote_host\"\n ],\n \"display_name\": \"Template\",\n \"language\": \"python\"\n }\n\nFor a python2 remote jupyter kernel just change ``remote_username@remote_host``. For example from ``remote_username@remote_host`` to ``albert@192.168.0.1``.\n\n**Fourth**, launch jupyter notebook and check your new remote juputer kernel::\n\n $ jupyter notebook\n\nor::\n\n $ ipython notebook\n\nChoose: ``Files -> New -> Template``.\n\nUser guide\n==========\nHelp\n----\nThe standard output for \u2013help::\n\n $ rk -h\n\nor::\n\n $ rk --help\n\nFor information on using subcommand \"SUBCOMMAND\", do::\n\n $ rk SUBCOMMAND -h\n\nor::\n\n $ rk SUBCOMMAND --help\n\nExample::\n\n $ rk install -h\n\nVersion\n-------\nThe standard output for \u2013version::\n\n $ rk -v\n\nor::\n\n $ rk --version\n\nKernels dict\n------------\n\n.. image:: ./img/user_guide-_kernels_dict_0001_728px.png\n :alt: user guide: kernels dict [youtube video]\n :target: https://youtu.be/czh3K4xjVD4\n\nOpen ``kernels.json`` file::\n\n $ sudo gedit /usr/local/lib/python2.7/dist-packages/rk/config/kernels.json\n\nThe ``kernels.json`` file looks like this::\n\n {\n \"template\": {\n \"display_name\": \"Template\",\n \"interpreter\": \"python\",\n \"language\": \"python\",\n \"remote_host\": \"remote_username@remote_host\"\n }\n }\n\nWhere:\n\n* ``template`` -- the name of a remote jupyter kernel,\n\n * ``display_name`` -- a kernel\u2019s name as it should be displayed in the UI. Unlike the kernel name used in the API, this can contain arbitrary unicode characters [1]_,\n * ``interpreter`` -- an entry point or an absolute path to language interpreter on a remote machine,\n * ``language`` -- a name of the language of a kernel. When loading notebooks, if no matching kernelspec key (may differ across machines) is found, a kernel with a matching language will be used. This allows a notebook written on any python or julia kernel to be properly associated with the user's python or julia kernel, even if they aren\u2019t listed under the same name as the author\u2019s [1]_,\n * ``remote_host`` -- just a remote host or, if your username is different on a remote machine, use this syntax: remote username AT remote host. \n\n.. note:: For checking absolute path to language interpreter on a remote machine use a `which `_ Unix command. For example, for the python3 language on a remote machine: ``$ which python3``.\n\nChange ``kernels.json`` file and add info about your remote jupyter kernels, for example like this::\n\n {\n \"albert2\": {\n \"display_name\": \"Albert Python 2\",\n \"interpreter\": \"python2\",\n \"language\": \"python\",\n \"remote_host\": \"albert@192.168.0.1\"\n },\n \"albert3\": {\n \"display_name\": \"Albert Python 3\",\n \"interpreter\": \"python3\",\n \"language\": \"python\",\n \"remote_host\": \"albert@192.168.0.1\"\n }\n }\n\nWhere:\n\n* ``albert2``, ``albert3`` -- the names of a remote jupyter kernels,\n\n * ``Albert Python 2``, ``Albert Python 3`` -- the display names for the UI,\n * ``python2``, ``python3`` -- entry points on a remote machine,\n * ``python`` -- the name of the language of a remote jupyter kernel,\n * ``albert`` -- the remote username on a remote machine, not similar with a username on a local machine,\n * ``192.168.0.1`` -- the remote host.\n\nKernels location\n----------------\nJupyter support the system and the user `kernels locations `_:\n\n+----------+--------------------------------------------------------------------+\n| |kernels location |\n+==========+====================================================================+\n|**system**|``/usr/local/share/jupyter/kernels``; ``/usr/share/jupyter/kernels``|\n+----------+--------------------------------------------------------------------+\n|**user** |``~/.ipython/kernels`` |\n+----------+--------------------------------------------------------------------+\n\nThe default kernels location in the rk: ``/usr/local/share/jupyter/kernels``.\n\nChange the default kernels location::\n\n $ sudo gedit /usr/local/lib/python2.7/dist-packages/rk/config/rk.ini\n\n.. important:: The user kernels location takes priority over the system kernels locations.\n\nShow list of remote jupyter kernels from kernels dict\n-----------------------------------------------------\n::\n\n $ rk list\n\nInstall a remote jupyter kernel/kernels from kernels dict to kernels location\n-----------------------------------------------------------------------------\n::\n\n $ rk install KERNEL_NAME [KERNEL_NAME ...]\n\nWhere:\n\n* ``KERNEL_NAME`` -- a name of a remote jupyter kernel in the `kernels dict`_ ``kernels.json``.\n\nExample::\n\n $ rk install albert2\n $ rk install albert2 albert3\n\nInstall a template of a remote jupyter kernel to kernels location\n-----------------------------------------------------------------\n::\n\n $ rk install-template\n\n.. important:: After this subcommand open the ``kernel.json`` file and change values of dict: ``$ sudo gedit /usr/local/share/jupyter/kernels/template/kernel.json``.\n\nInstall all remote jupyter kernels from kernels dict to kernels location\n------------------------------------------------------------------------\n::\n\n $ rk install-all\n\nUninstall a remote jupyter kernel/kernels from kernels location\n---------------------------------------------------------------\n::\n\n $ rk uninstall KERNEL_NAME [KERNEL_NAME ...]\n\nWhere:\n\n* KERNEL_NAME -- a name of installed remote jupyter kernel.\n\nExample::\n\n $ rk uninstall albert2\n $ rk uninstall albert2 albert3\n\nUninstall a template of a remote jupyter kernel from kernels location\n---------------------------------------------------------------------\n::\n\n $ rk uninstall-template\n\nUninstall all jupyter kernels from kernels location\n---------------------------------------------------\n::\n\n $ rk uninstall-all\n\nSetup SSH for auto login without a password\n-------------------------------------------\n::\n\n $ rk ssh\n\nIf you are familiar with `ssh-keygen `_, `ssh-copy-id `_ and `ssh-add `_, this code also setup SSH for auto login without a password [2]_::\n\n $ ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa\n $ ssh-copy-id REMOTE_HOST\n $ eval \"$(ssh-agent -s)\"\n $ ssh-add ~/.ssh/id_rsa\n\n.. note:: If your username is different on a remote machine, you can specify it by using this syntax: ``$ ssh-copy-id REMOTE_USERNAME@REMOTE_HOST``.\n\nLog files\n---------\nThe default log files location in the rk: ``/tmp/rk/log``. The name of rk log file, for working remote jupyter kernel, look like this: ``bree@192.168.0.1_1879-03-14_11.30.00.txt``. And the log file looks like this::\n\n date: 1879-03-14 Friday\n time: 11:30:00\n\n usernames: bree<->albert\n remote host: 192.168.0.1\n\n stdin ports: 37654<->58933\n hb ports: 53538<->59782\n iopub ports: 45330<->51989\n shell ports: 36523<->36107\n control ports: 50090<->53633\n\n pids: 16965<->20944\n\n.. note:: Change the default log files location: ``$ sudo gedit /usr/local/lib/python2.7/dist-packages/rk/config/rk.ini``.\n\nThe paramiko log file is available in a local connection file directory. The name of paramiko log file, for working remote jupyter kernel, look like this: ``paramiko-843664c7-798d-4a9e-979c-22d0dc4a6bd5.txt``.\n\nHistory\n=======\nLegend\n------\n\n* **added**\n* corrected\n* *removed*\n\nrk 0.3\n------\n\n* bug in the rk and in the rkscript: an initial component of ``~`` or ``~user`` is not replaced in a paths.\n* bug in the rk: a superuser (root) privileges required for the user kernels location ``~/.ipython/kernels``.\n* **setup SSH for auto login without a password with a \"ssh\" subcommand.**\n* error in the rkscript: list index out of range.\n* **info about working remote jupyter kernel in rk log file.**\n* **paramiko log file in a local connection file dir.**\n* error in the rkscript: no handlers could be found for logger \"paramiko.transport\".\n* local port forwarding in the rkscript via paramiko, not via pexpect.\n\nrk 0.2\n------\n\n* **uninstall all jupyter kernels from kernels location with a \"uninstall-all\" subcommand.**\n* **uninstall a remote jupyter kernel/kernels from kernels location with a \"uninstall\" subcommand.**\n* **install a remote jupyter kernel/kernels from kernels dict to kernels location with a \"install\" subcommand.**\n* **install all remote jupyter kernels from kernels dict to kernels location with a \"install-all\" subcommand.**\n* **show list of remote jupyter kernels from kernels dict with a \"list\" subcommand.**\n\n.. rubric:: Footnotes\n\n.. [1] http://ipython.org/ipython-doc/dev/development/kernels.html#kernel-specs\n.. [2] https://help.github.com/articles/generating-ssh-keys/", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/korniichuk/rk/archive/0.3.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/korniichuk/rk", "keywords": "ipython,jupyter,remote kernel,rk,python2", "license": "Public Domain", "maintainer": null, "maintainer_email": null, "name": "rk", "package_url": "https://pypi.org/project/rk/", "platform": "Linux", "project_url": "https://pypi.org/project/rk/", "project_urls": { "Download": "https://github.com/korniichuk/rk/archive/0.3.zip", "Homepage": "https://github.com/korniichuk/rk" }, "release_url": "https://pypi.org/project/rk/0.3b1/", "requires_dist": null, "requires_python": null, "summary": "The remote jupyter kernel/kernels administration utility", "version": "0.3b1" }, "last_serial": 1783490, "releases": { "0.2a1": [ { "comment_text": "", "digests": { "md5": "4989a08293f19452535a53ec9bf9949e", "sha256": "de1be49137be433719eedeb5577efb192d176dd2551fe4a22b0b0bad5061954b" }, "downloads": -1, "filename": "rk-0.2a1.tar.gz", "has_sig": false, "md5_digest": "4989a08293f19452535a53ec9bf9949e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15278, "upload_time": "2015-05-20T11:52:58", "url": "https://files.pythonhosted.org/packages/7e/2c/5bfbb6451c183bb61b474c1cda6cda2b8578878e784df5d846702fd24f0b/rk-0.2a1.tar.gz" }, { "comment_text": "", "digests": { "md5": "169a058800bd1464e303d3a4a7c23671", "sha256": "564a2064ce5a8e9e4c1116629a20f9315288ddba3c5bf5ac877f77d9609baa89" }, "downloads": -1, "filename": "rk-0.2a1.zip", "has_sig": false, "md5_digest": "169a058800bd1464e303d3a4a7c23671", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19414, "upload_time": "2015-05-20T11:52:54", "url": "https://files.pythonhosted.org/packages/a6/dd/386c8de93f20c4ac7be078bf9abb18de04f4a25e661329f05035f71887e0/rk-0.2a1.zip" } ], "0.3b1": [ { "comment_text": "", "digests": { "md5": "89ef7c11cdbb55fd68584d2ce568890d", "sha256": "76c36a5bef05279fd74ba4263f072cd6094e98a649922064f5bf91d1f3f8706e" }, "downloads": -1, "filename": "rk-0.3b1.tar.gz", "has_sig": false, "md5_digest": "89ef7c11cdbb55fd68584d2ce568890d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 141891, "upload_time": "2015-10-23T21:19:16", "url": "https://files.pythonhosted.org/packages/17/e0/8defbb4c4ce0ad73c0860137739c42b6c542f6dfb7e87fd9924521d786f5/rk-0.3b1.tar.gz" }, { "comment_text": "", "digests": { "md5": "499fc567fab671767f0950a3ad477bf0", "sha256": "81e79edf16a82408f64604dd30903d48edef1f458df5ba5e2b97f3158cc8cc8f" }, "downloads": -1, "filename": "rk-0.3b1.zip", "has_sig": false, "md5_digest": "499fc567fab671767f0950a3ad477bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144522, "upload_time": "2015-10-23T21:19:11", "url": "https://files.pythonhosted.org/packages/5c/30/f5d0a51e59e7186f52a80b48e956dd305c9caeabb41e8c4ad469d4adbaba/rk-0.3b1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89ef7c11cdbb55fd68584d2ce568890d", "sha256": "76c36a5bef05279fd74ba4263f072cd6094e98a649922064f5bf91d1f3f8706e" }, "downloads": -1, "filename": "rk-0.3b1.tar.gz", "has_sig": false, "md5_digest": "89ef7c11cdbb55fd68584d2ce568890d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 141891, "upload_time": "2015-10-23T21:19:16", "url": "https://files.pythonhosted.org/packages/17/e0/8defbb4c4ce0ad73c0860137739c42b6c542f6dfb7e87fd9924521d786f5/rk-0.3b1.tar.gz" }, { "comment_text": "", "digests": { "md5": "499fc567fab671767f0950a3ad477bf0", "sha256": "81e79edf16a82408f64604dd30903d48edef1f458df5ba5e2b97f3158cc8cc8f" }, "downloads": -1, "filename": "rk-0.3b1.zip", "has_sig": false, "md5_digest": "499fc567fab671767f0950a3ad477bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144522, "upload_time": "2015-10-23T21:19:11", "url": "https://files.pythonhosted.org/packages/5c/30/f5d0a51e59e7186f52a80b48e956dd305c9caeabb41e8c4ad469d4adbaba/rk-0.3b1.zip" } ] }