How to customize Riak's config location?

4 views
Skip to first unread message

w...@resilia.nl

unread,
Mar 25, 2019, 4:20:22 AM3/25/19
to riak-users
Hello there,

to test a library that calls into Riak, it would make sense to allow the library to start the locally-installed `riak` binary:
- on a different port than the default port, as to not interfere with a potentially running Riak cluster.
- using e.g. the `memory`-backend to make everything that is done ephemeral.

However, I have not found any way in Riak's documentation to customize the path that Riak reads its (basic) configuration file from: For binary installations this is `/etc/riak/riak.conf` and for source installations it is `../etc/riak.conf` (relative to the `riak` binary).

Because Riak takes these at start-up, and compiles a more advanced configuration as well as Erlang startup configuration (vm.args) in some way, it seems very difficult to manually pass in either a custom basic config or even a manually-made advanced configuration.

Is this currently possible? If so, how? (If not, I think it would make a great and probably not very complicated to create feature).

Thank you!

~Wiebe-Marten / Qqwy

Martin Sumner

unread,
Mar 25, 2019, 7:01:39 AM3/25/19
to w...@resilia.nl, riak-users
Environments I know of do script their riak.conf files (e.g. using puppet or ansible), but they don't alter their location from the default.  Some environment variables can be changed dynamically using `riak attach`, but some are only ever looked-at on at startup, so obviously changing them post-startup will make no difference.

The riak_test suite is constantly starting and restarting nodes with different configurations.  so if you want to control using Erlang the dynamic startup of different nodes with different configurations, you may find some inspiration in the relevant parts of the riak_test code - this might be a useful starting point https://github.com/basho/riak_test/blob/develop-2.9/src/rtdev.erl#L423.

--
You received this message because you are subscribed to the Google Groups "riak-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to riak-users+...@googlegroups.com.
To post to this group, send email to riak-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/riak-users/cff28a07-b751-4695-9df7-9f83247a045e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages