boxx
boxx

Reputation: 1121

How to configure Riak 2 to allow loading of custom erlang modules?

For 1.x version, this can be done by editing the file 'app.config'.

{riak_kv, [
  %% ...
  {add_paths, ["/tmp/beams/"]},
  %% ...

But now, 'app.config' has been replaced on 'riak.conf' which has an another format.

Upvotes: 1

Views: 575

Answers (3)

mmcshadow
mmcshadow

Reputation: 1

sudo gvim /var/lib/riak/.erlang

code:add_pathz("/your_erlang_beam_path").

Upvotes: -1

Luke Bakken
Luke Bakken

Reputation: 9627

Create /etc/riak/advanced.config with the following content:

[
    {riak_kv, [{add_paths, ["/tmp/beams/"]}]}
].

When you start Riak, you'll see messages about cuttlefish merging in the contents of advanced.config in the logs (/var/log/riak/*).

Upvotes: 4

macintux
macintux

Reputation: 894

Last I heard, Joe DeVivo had yet to add support for add_paths to the new configuration format. Certainly as of the Riak 2.0 tech preview it wasn't supported.

However, it is possible to continue to use the old format for configuration bits that are not yet accessible in the new riak.conf (Cuttlefish) format, by creating a file named advanced.config. See: https://github.com/basho/cuttlefish/issues/13

Upvotes: 1

Related Questions