如何使用热代码加载在多个远程节点上安装 Riak?

发布于 2024-08-19 21:25:44 字数 166 浏览 4 评论 0原文

我一直在单机上学习 Riak,并且可以访问 Erlang 节点集群(在 Ubuntu 9 上)。使用远程代码加载如何将 Riak 安装到所有远程节点上?

例如,假设我有一个 Erlang 节点集群。其中一个节点安装了 Riak。我可以做类似 nl(riak) 的事情来将 Riak 安装到其他节点上吗?

I have been learning Riak on a single machine and have access to a cluster of Erlang nodes (on Ubuntu 9). Using remote code loading how do I install Riak onto all the remote nodes?

For example, imagine I have a cluster of Erlang nodes. One of the nodes has Riak installed. Can I do something like nl(riak) to install Riak onto the other nodes.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

ま昔日黯然 2024-08-26 21:25:45

Afaik,为此有 erl_boot_server 模块。我从未使用过(或尝试过)它,但看起来这就是您正在寻找的:
http://erldocs.com/R13B03/kernel/erl_boot_server。 html?search=erl&i=0

Afaik, for that there is the erl_boot_server module. I have never used (or tried) it, but it looks that is what you are looking for:
http://erldocs.com/R13B03/kernel/erl_boot_server.html?search=erl&i=0

匿名的好友 2024-08-26 21:25:44

由于我们添加了 Innostore 并嵌入了 Javascript 引擎 Riak 不再是纯粹的 Erlang 应用程序。这意味着通过 Erlang 的远程代码加载进行安装将不起作用。如果您在同质集群上运行 Riak,您应该能够通过“make rel”构建一个 OTP 版本,将该版本复制到集群中的每台计算机,并调整 app.config 和 vm.args 以适应。

理论上,引导服务器可以工作,但我不知道有人以这种方式运行 Riak。如果您决定尝试一下,我们(Basho)将很乐意通过 riak-users 邮件列表。

Since we've added Innostore and embedded a Javascript engine Riak is no longer a pure Erlang application. This means installing via Erlang's remote code loading won't work. If you're running Riak on a homogenous cluster you should be able to build one OTP release via 'make rel', copy the release to each machine in the cluster, and tweak app.config and vm.args to suit.

A boot server would theoretically work but I don't know of anyone running Riak that way. If you decide to give it a try we (Basho) would be happy to provide assistance via the riak-users mailing list.

总以为 2024-08-26 21:25:44

简短的回答是:你不能。
远程代码加载在模块(而不是应用程序)级别上运行。
Riak 由多个 Erlang 模块组成,需要一些依赖项。
nl(riak) 本质上是在所有连接的节点上加载单个模块。

长的答案是:你可以,但不要这样做。
实际上,您可以收集与 Riak 关联的模块列表,然后远程加载这些模块并通过网络配置 Riak。 application 模块可能会对此有所帮助。
这种方法的问题是,如果远程节点出现故障或重新启动,您将需要再次传输所有模块并重复配置。

如果必须涉及某种“远程加载”,您应该在远程计算机上的 $ERL_LIBS 中的某个位置安装 Riak,以便可以通过 启动加载过程rpc:call/4

The short answer is: you can't.
Remote code loading operates on the module (as opposed to application) level.
Riak is comprised of several Erlang modules and requires some dependencies.
nl(riak) essentially loads a single module on all attached nodes.

The long answer is: you can, but don't do it.
Actually, you could gather the list of modules associated with Riak, then remote-load these and configure Riak over the wire. The application module might help with that.
The problem with this approach is that if the remote node fails or reboots, you will need to transfer all of the modules again and repeat the configuration.

If some kind of "remote loading" must be involved, you should install Riak somewhere in $ERL_LIBS on the remote machine, so the load process can be initiated through rpc:call/4.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文