I want to set up a virtual environment to allow my teammates to share resources and collaborate more effectively. As such I am setting an OpenStack instance with R, Python, etc. installed such that anyone can connect to a pre-configured environment with all the necessary software for them to get started. I want everyone to be able to connect to the VM, have access to all the files in the remote machine, and I want to allow them to use Jupyter as an interface to explore/write/execute.
我想建立一个虚拟环境,让我的队友可以更有效地共享资源和协作。因此,我正在设置一个安装了R,Python等的OpenStack实例,这样任何人都可以连接到预先配置的环境,并使用所有必要的软件来启动它们。我希望每个人都能够连接到VM,可以访问远程计算机中的所有文件,并且我希望允许他们使用Jupyter作为探索/编写/执行的接口。
Is it good practice for multiple users to be accessing the same Jupyter server? It seems like two people editing the same notebook could lead to problematic behavior. Also since my VM is running on a public IP, I would probably need some authentication - is that possible?
多个用户访问同一个Jupyter服务器是一种好习惯吗?似乎两个人编辑同一个笔记本可能导致问题行为。此外,由于我的VM在公共IP上运行,我可能需要一些身份验证 - 可能吗?
1 个解决方案
#1
1
I have the following suggestions for you:
我有以下建议:
-
Setup
sshd
server on your VM, which I think most of the time just works out of box unless it's a Windows VM...在你的VM上安装sshd服务器,我认为大多数时候只是在盒子外工作,除非它是Windows VM ...
-
Assign each user a username and password and a group called 'jptr_users', if they care at all their own resources being exposed to others. If they don't, then having a non-root non-admin global account for the users is fine.
为每个用户分配一个用户名和密码以及一个名为“jptr_users”的组,如果他们关心所有他们自己的资源都暴露给他人。如果他们不这样做,那么为用户提供非root非管理员全局帐户就可以了。
-
Allow users to forward port with
-X
(X-term) option, so that they can pull the notebook session up in their local browsers.允许用户使用-X(X-term)选项转发端口,以便他们可以在本地浏览器中启动笔记本会话。
-
nice
the notebook server process, just so that kernel doesn't crash when you have too many users running things at the same time. Also advise users tonice
everything they run on the VM. After all, it's a shared machine.很好的笔记本服务器进程,只是当你有太多的用户同时运行时,内核不会崩溃。还建议用户了解他们在VM上运行的所有内容。毕竟,这是一台共享机器。
-
Avoiding overwriting the same notebook by different sessions of edits can be complicated. Have a git repo setup in the directory. Then each user will create a duplicate of a target notebook for editing. Once they are done with the duplicate, have them
git status
to check if the original is edited. If yes, they have to merge by hand. If not, overwrite the target with duplicate and commit. These steps are not atomic, so there are still things that can go wrong...避免通过不同的编辑会话覆盖相同的笔记本可能很复杂。在目录中安装git repo。然后每个用户将创建目标笔记本的副本以进行编辑。完成复制后,让他们使用git状态来检查是否编辑了原件。如果是,他们必须手动合并。如果没有,请用重复和提交覆盖目标。这些步骤不是原子的,所以仍有可能出错的事情......
-
If your team is small, you can try to have them ping on a chat when they start and finish editing on a file. One nice chatting app for development is https://www.flowdock.com/.
如果您的团队很小,那么当他们开始并完成对文件的编辑时,您可以尝试让他们在聊天中ping。一个很好的开发聊天应用程序是https://www.flowdock.com/。
Hope this helps. Best of luck!
希望这可以帮助。祝你好运!
#1
1
I have the following suggestions for you:
我有以下建议:
-
Setup
sshd
server on your VM, which I think most of the time just works out of box unless it's a Windows VM...在你的VM上安装sshd服务器,我认为大多数时候只是在盒子外工作,除非它是Windows VM ...
-
Assign each user a username and password and a group called 'jptr_users', if they care at all their own resources being exposed to others. If they don't, then having a non-root non-admin global account for the users is fine.
为每个用户分配一个用户名和密码以及一个名为“jptr_users”的组,如果他们关心所有他们自己的资源都暴露给他人。如果他们不这样做,那么为用户提供非root非管理员全局帐户就可以了。
-
Allow users to forward port with
-X
(X-term) option, so that they can pull the notebook session up in their local browsers.允许用户使用-X(X-term)选项转发端口,以便他们可以在本地浏览器中启动笔记本会话。
-
nice
the notebook server process, just so that kernel doesn't crash when you have too many users running things at the same time. Also advise users tonice
everything they run on the VM. After all, it's a shared machine.很好的笔记本服务器进程,只是当你有太多的用户同时运行时,内核不会崩溃。还建议用户了解他们在VM上运行的所有内容。毕竟,这是一台共享机器。
-
Avoiding overwriting the same notebook by different sessions of edits can be complicated. Have a git repo setup in the directory. Then each user will create a duplicate of a target notebook for editing. Once they are done with the duplicate, have them
git status
to check if the original is edited. If yes, they have to merge by hand. If not, overwrite the target with duplicate and commit. These steps are not atomic, so there are still things that can go wrong...避免通过不同的编辑会话覆盖相同的笔记本可能很复杂。在目录中安装git repo。然后每个用户将创建目标笔记本的副本以进行编辑。完成复制后,让他们使用git状态来检查是否编辑了原件。如果是,他们必须手动合并。如果没有,请用重复和提交覆盖目标。这些步骤不是原子的,所以仍有可能出错的事情......
-
If your team is small, you can try to have them ping on a chat when they start and finish editing on a file. One nice chatting app for development is https://www.flowdock.com/.
如果您的团队很小,那么当他们开始并完成对文件的编辑时,您可以尝试让他们在聊天中ping。一个很好的开发聊天应用程序是https://www.flowdock.com/。
Hope this helps. Best of luck!
希望这可以帮助。祝你好运!