Comments (4)
Hi,
Below is what I used with some success (of note remains an issue with the 'riak' user in the container, which runs the process, not mapping correctly to a 'riak' user in the host).
Some additional notes about the Dockerfile:
- Files mapping-FoldToASCII.txt and mapping-ISOLatin1Accent.txt were missing in the installation directory and Solr was not happy about it so I added them after installing from the deb packages.
- The riak.conf is changed to set some settings specifics to Search and are most likely not optimal
- The riak.conf is enabling inter-cluster replication
- The riak-kv-docker.sh startup script is used to set the nodename based on the fqdn of the machine, and also setting the advertised IP of the node for the inter-cluster replication module (this bit in a way very specific to my environment).
Dockerfile
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && \
apt-get update && apt-get -y --no-install-recommends dist-upgrade && \
apt-get install -y --no-install-recommends curl apt-transport-https ca-certificates && \
apt-get install -y --no-install-recommends openjdk-8-jdk-headless locales logrotate sudo && \
rm -rf /var/lib/apt/lists/* /tmp/*
RUN curl -O https://files.tiot.jp/riak/kv/3.0/3.0.10/ubuntu/focal64/riak_3.0.10-yokozuna-OTP22.3_amd64.deb && \
dpkg -i riak_3.0.10-yokozuna-OTP22.3_amd64.deb && \
rm -f riak_3.0.10-yokozuna-OTP22.3_amd64.deb
ENV DEBIAN_FRONTEND teletype \
TERM=xterm \
LANG en_US.UTF-8
ADD riak-kv-docker.sh /usr/bin/riak-docker
RUN chmod +x /usr/bin/riak-docker && \
locale-gen en_US en_US.UTF-8 && \
echo "ulimit -n 200000" >> /etc/default/riak && \
echo "riak soft nofile 65536" >> /etc/security/limits.conf && \
echo "riak hard nofile 200000" >> /etc/security/limits.conf && \
echo "buckets.default.allow_mult = true" >> /etc/riak/riak.conf && \
echo "log.syslog.level = warning" >> /etc/riak/riak.conf && \
sed -i 's/127.0.0.1/0.0.0.0/' /etc/riak/advanced.config && \
sed -i 's/listener.http.internal = 127.0.0.1/listener.http.internal = 0.0.0.0/' /etc/riak/riak.conf && \
sed -i 's/listener.protobuf.internal = 127.0.0.1/listener.protobuf.internal = 0.0.0.0/' /etc/riak/riak.conf && \
sed -i 's/search = off/search = on/' /etc/riak/riak.conf && \
sed -i 's/storage_backend = bitcask/storage_backend = leveled/' /etc/riak/riak.conf && \
sed -i 's/leveldb.maximum_memory.percent = 70/leveldb.maximum_memory.percent = 10/' /etc/riak/riak.conf && \
sed -i 's/## ring_size = 64/ring_size = 64/' /etc/riak/riak.conf && \
sed -i 's/search.solr.jvm_options = -Xms1g -Xmx1g/search.solr.jvm_options = -Xms4g -Xmx4g/' /etc/riak/riak.conf && \
sed -i 's/log.console = file/log.console = console/' /etc/riak/riak.conf && \
sed -i '/log.syslog = off/alog.syslog.ident = riak-kv' /etc/riak/riak.conf && \
sed -i 's/log.syslog = off/log.syslog = on/' /etc/riak/riak.conf && \
sed -i 's/log.console = file/log.console = off/' /etc/riak/riak.conf && \
sed -i 's/leveled.compaction_top_hour = 23/leveled.compaction_top_hour = 6/' /etc/riak/riak.conf && \
sed -i 's/mdc.cluster_manager = 127.0.0.1:9080/mdc.cluster_manager = 0.0.0.0:9080/' /etc/riak/riak.conf && \
sed -i 's/leveled.log_level = info/leveled.log_level = warning/' /etc/riak/riak.conf && \
sed -i 's/log.console.level = info/log.console.level = warning/' /etc/riak/riak.conf && \
sed -i "/search = on/asearch.anti_entropy.throttle.tier1.solrq_queue_length = 0\n\
search.anti_entropy.throttle.tier1.delay = 50ms\n\
search.anti_entropy.throttle.tier2.solrq_queue_length = 50\n\
search.anti_entropy.throttle.tier2.delay = 500ms\n\
search.anti_entropy.throttle.tier3.solrq_queue_length = 100\n\
search.anti_entropy.throttle.tier3.delay = 5000ms\n\
search.anti_entropy.throttle.tier4.solrq_queue_length = 250\n\
search.anti_entropy.throttle.tier4.delay = 10000ms" /etc/riak/riak.conf && \
sed -i 's/## search.queue.high_watermark.purge_strategy = purge_one/search.queue.high_watermark.purge_strategy = purge_one/' /etc/riak/riak.conf && \
sed -i 's/## search.queue.high_watermark = 1000/search.queue.high_watermark = 1000/' /etc/riak/riak.conf && \
sed -i 's/## search.queue.batch.minimum = 10/search.queue.batch.minimum = 100/' /etc/riak/riak.conf && \
sed -i 's/## search.queue.batch.maximum = 500/search.queue.batch.maximum = 1000/' /etc/riak/riak.conf && \
sed -i 's/## search.queue.batch.flush_interval = 500ms/search.queue.batch.flush_interval = 5000ms/' /etc/riak/riak.conf && \
sed -i 's/## leveled_reload_recalc = enabled/leveled_reload_recalc = enabled/' /etc/riak/riak.conf
ADD mapping-FoldToASCII.txt /usr/lib/riak/lib/yokozuna-riak_kv-2.9.1+build.1543.ref1be8760/priv/conf/
ADD mapping-ISOLatin1Accent.txt /usr/lib/riak/lib/yokozuna-riak_kv-2.9.1+build.1543.ref1be8760/priv/conf/
VOLUME /var/lib/riak
EXPOSE 8087 8098 9080
ENTRYPOINT ["/usr/bin/riak-docker"]
riak-kv-docker.sh
#!/bin/bash
NODENAME=$(hostname)
IP=$(hostname -I | tr " " "\n" | grep 192.168)
IP=${IP:=127.0.0.1}
sed -i "s/nodename = [email protected]/nodename = riak@$NODENAME/" /etc/riak/riak.conf
sed -i "s/mdc.cluster_manager = 0.0.0.0:9080/mdc.cluster_manager = $IP:9080/" /etc/riak/riak.conf
sed -i "s/\"0.0.0.0\", 9080/\"$IP\", 9080/" /etc/riak/advanced.config
riak foreground
from riak.
Why isn't basho doing this? This makes me think that ultimately the project maybe be dying or not have enough resources to handle basic things like docker containers. I was going to push Riak to the engineering manager but how can I explain they don't even have a container image?~?~~?
from riak.
@bbqchickenrobot 2018 was a long time ago...
Riak is opensource. Feel free to contribute with a docker image
from riak.
Ah, I didn't realize the history - shame.
from riak.
Related Issues (20)
- Post-commit hook not triggered on Riak 3.0.9 HOT 6
- I got an error when I executed `riak-admin cluster join node` HOT 8
- Crash during ring-resize HOT 2
- Build fails riak 3.0.9 on fedora 35 HOT 2
- Build fails riak from develop branch on fedora 36 HOT 2
- repology.org | Problems in Wikidata
- Document supported hardware architectures HOT 2
- Upgrading to 3.0 HOT 5
- RIak Bitcask primary partition Failed to merge HOT 5
- Riak Off Siblings
- Reip doesn't work Riak >= 3.0 HOT 1
- riak 3.x `riak chkconfig` command returns non-zero on success
- Strange error on building Riak on Manjaro on Erlang OTP-25 HOT 8
- Unable to add password authentication for riak control on browser in ubuntu 22.04 HOT 2
- Upgrade to Rebar 3.20 HOT 1
- Partitions waiting to handoff indefinitely HOT 4
- Support riak Erlang OTP-26, error on building Riak on Manjaro Linux on Erlang OTP-26 HOT 5
- Riak3.2.0 ,using Post-commit
- riak kv 3.2.0 OTP25 turns off when stanchion starts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riak.