Created
August 21, 2015 06:46
-
-
Save lehoff/f3c6333d3dc75f3fc514 to your computer and use it in GitHub Desktop.
Short description of how to start riak_core without using a release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start riak_core without using a release | |
When working with riak_core as a dependency the standard way of starting things is through a release. | |
Sometimes a release is a bit heavy to work with, so how do you start it up from the shell? | |
This requires a number of things to be configured correctly. | |
You should use rebar, not rebar3, for this particular way of doing it. | |
The application `kore` is using riak_core as a dependency and when everything is configured correctly you can start the application with these steps: | |
1. On the command line: | |
$ erl -pa ebin -pa deps/*/ebin -args_file config/vm.args -config config/sys.config | |
2. In the Erlang shell: | |
> application:ensure_all_started(kore). | |
## `config/sys.config` | |
NB: You can call the file whatever you want. | |
The entry for riak_core should look like this: | |
```` | |
{riak_core, | |
[ | |
{ring_state_dir, "./data/ring"}, | |
{ring_creation_size, 32 }, | |
{http, [ {"127.0.0.1", 8098 } ]}, | |
{handoff_port, 8098}, | |
{dtrace_support, false}, | |
%% Platform-specific installation paths (substituted by rebar) | |
{platform_bin_dir, "./bin"}, | |
{platform_data_dir, "./data"}, | |
{platform_etc_dir, "./etc"}, | |
{platform_lib_dir, "./lib"}, | |
{platform_log_dir, "./log"}, | |
{schema_dirs, ["/Users/th/learning/kore/deps/riak_core/priv"]} | |
]} | |
``` | |
Most of it is straightforward configuration of `riak_core` - the thing that makes or breaks this is the `schema_dirs` item. If `riak_core` cannot find its schema file it will not start. | |
## config/vm.args | |
Not really required, but it is a good idea to set name and cookie: | |
``` | |
-name my_name | |
-setcookie some_fancy_cookie | |
``` | |
That's it. Enjoy. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment