Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version of this image that listens on localhost #5

Open
genericProgramming opened this issue Dec 20, 2016 · 3 comments
Open

Version of this image that listens on localhost #5

genericProgramming opened this issue Dec 20, 2016 · 3 comments

Comments

@genericProgramming
Copy link

Our team is migrating to drone.io and had a bit of a tough time getting riak to play nicely since the basho/riak-kv image doesn't listen on localhost. It'd be awesome to get an image that listens on localhost for quick integration testing.

Example of the issue:
https://github.com/genericProgramming/DroneServiceContainerWeirdness

How drone.io service containers work;
http://readme.drone.io/0.5/usage/services/

@alanbrent
Copy link
Contributor

@genericProgramming You might find the following useful:

Script to add into a new riak container. (e.g. via docker run -v script.sh:/etc/riak/prestart.d/script.sh):

#!/usr/bin/env bash
set -eux

# Make sure the Riak coordinator listens on all interfaces, otherwise it only listens on the docker-compose default network
## Reference: https://github.com/basho-labs/riak-docker/blob/master/riak-cluster.sh#L36-L40
## Unfortunately, as of this writing the naive `find` invocation in the above script means the scripts don't run in the
## intended prefix-filename order. A PR has been opened to fix this:
### https://github.com/basho-labs/riak-docker/pull/7
## In the meantime, we'll need to use our own custom builds that incorporate this fix.

for i in $HTTP_PORT $PB_PORT; do
  sed -i s/=.*:"$i"/"= 0.0.0.0:$i"/g $RIAK_CONF
done

Dockerfile for the custom build referenced in the above script:

FROM basho/riak-kv

RUN sed -i s/'-print'/'-print | sort'/g $RIAK_HOME/riak-cluster.sh

@jbrisbin
Copy link
Contributor

FWIW you can just add settings to the end of riak.conf and those will override the early settings, no sed required.

@alanbrent
Copy link
Contributor

I thought that was the case, but I wasn't sure. I was originally doing that via echo blahblah >>/etc/riak/user.conf, and at some point down the rabbit hole of figuring out why I realized the find output was unsorted. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants