Skip to main content
Version: scarthgap

riak

info

Recommended PREFERRED_VERSION for riak:

riakErlang/OTPElixir
3.2.125.3%1.14%

In this guide we are using the plain meta-erlang layer to build the riak. The recipe riak.inc builds the riak using a crosscompile approach.

As the final result, we will be able to run an embedded riak using qemu.

Follow the quickstart guide to get a basic working environment and then:

  • Add erlang preferred version 25.x in conf/local.conf (check the full list of Erlang supported versions here Riak KV 3.2.0 Release Notes)
PREFERRED_VERSION_erlang = "25%"
PREFERRED_VERSION_erlang-native = "25%"
  • Append pam to DISTROFEATURES in _conf/local.conf file:
DISTRO_FEATURES += " pam"
  • Add riak package to IMAGE_INSTAL in conf/local.conf
IMAGE_INSTALL:append = " riak"
  • Now its time to build the image:
bitbake core-image-minimal
  • And check the results with qemu:
runqemu core-image-minimal nographic qemuparams="-m 2048"

The official riak documentation has a specific session about how to perform the initial configuration: Basic Riak KV Configuration -- I recommend to follow the instructions there.

After the first configuration it is time to start riak. As usual, use systemd or systemv scripts (stop and restart as well) riak:

  • /etc/init.d/riak restart, or
  • systemctl restart riak

Remember that the main riak entry point is /usr/lib/riak/bin/riak.

To make sure that everything is working properly, follow the guide Verifying a Riak KV Installation.

Soon or later you will end up configuring a cluster. Then following this guide: Running a Cluster.