Last active
November 18, 2021 09:39
-
-
Save alexmoore/7bbdece19223cea1e144e4d23a5ed7ec to your computer and use it in GitHub Desktop.
Building Basho Erlang / Riak TS on a Raspberry Pi 3
This file contains 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
This is unsupported by Basho, but you can build Basho's flavor of Erlang and Riak on Raspberry Pis. | |
This file contains 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
sudo apt-get install build-essential git autoconf libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev libpam0g-dev oracle-java8-jdk maven |
This file contains 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
mkdir src | |
cd src | |
wget http://s3.amazonaws.com/downloads.basho.com/erlang/otp_src_R16B02-basho10.tar.gz | |
tar zxvf otp_src_R16B02-basho10.tar.gz | |
cd OTP_R16B02_basho10/ | |
# Note: These steps will take a long time. | |
./otp_build autoconf | |
./configure | |
make | |
sudo make install | |
# Report version & arch | |
erl -eval 'erlang:display(erlang:system_info(otp_release)), erlang:display(erlang:system_info(system_architecture)), halt().' -noshell | |
# cd back to src dir | |
cd ../; |
This file contains 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
# In src dir | |
git clone https://github.com/basho/riak.git | |
cd riak | |
# Run this to build Riak TS 1.5.0 | |
git checkout riak_ts-1.5.0 | |
# Run this to build Riak KV 2.2.1 | |
git checkout riak-2.2.0 | |
make locked-deps | |
cd deps/eleveldb/c_src/leveldb; | |
git checkout develop; | |
cd ../ | |
# If not using a cluster of pis, edit number of leveldb threads to save memory | |
#sed -i '221s/71/7/g' eleveldb.cc | |
cd ../../../; | |
make rel; | |
cd rel/riak/ | |
echo "leveldb.limited_developer_mem = on" >> etc/riak.conf | |
## Edit the nodename and ip bindings in the etc/riak.conf file too, riak@raspberrypi may not work | |
bin/riak start; | |
Believe it or not Solr does actually run, though it's pretty slow. You'll also need the following config in your riak.conf
to turn off some of the flags expected on 64 bit machines, and to give yz_solr_proc
enough time for Solr to start without crapping out. (30s is the default):
search = on
search.solr.jvm_options = -XX:+UseStringCache
search.solr.start_timeout=5m
Hi,
Can you tell me what version of Raspbian this is starting from? Stretch or Jessie?
Is it from a completely fresh install?
Cheers
Gareth
If I follow the steps from above I get the following error message:
make locked-deps...
ERROR:
Cloning into fuse...
Host key verification failed
fatal:Could not read from remote respository
I have little experience and don't know what to do.
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the notes, Alex.
On Raspian jessie, I made the following changes to eleveldb and leveldb, but using the versions of eleveldb and leveldb associated with Riak version 2.2.3 (i.e., not
develop
, as listed above):and
Also may want to mention
--prefix
option to configure, in case you already have an OTP installed viaapt-get
, but I am sure many folks already know that.