Git Product home page Git Product logo

Comments (7)

iby avatar iby commented on May 21, 2024

My pleasure. Regarding the volumes – this is something I wanted to do myself for awhile, but been occasionally hitting this issue, which seemed like a show stopper.

Just tried doing what you did without much success either. The biggest bet was on copying /var/lib/riak from fresh container to host and then mounting that as a volume after. That didn't work, probably due to file permissions, but I haven't figured this out yet. I'll look further into this tonight.

from docker-riak-cs.

iby avatar iby commented on May 21, 2024

It looks like there might be a problem with LevelDB. As far as I understood everything must just work with empty /var/lib/riak folder, given it has the right permissions and ownership. But… I'm always getting IO error: /var/lib/riak/cluster_meta/trees/MANIFEST-000001: Invalid argument, which also described in Level/levelup#222.

Some comments state that a workaround is to use NFS mounts over standard shared folders. You can easily give that a go with adlogix/docker-machine-nfs. One piece of advice – test it with another vm first, I had great issues with it at first because of my firewall.

I will update the built image in the next hour to ensure the right permissions are set on the data dirs in entrypoint. Let me know if you how if it worked.

from docker-riak-cs.

lksv avatar lksv commented on May 21, 2024

I use linux and yours linked issues are probably (docker-non-native-platforms) related. I do not prefer nfs to be involved (at least on linux).

I am already able to run riak with monted folder, but I need to set chmod a+rwx $MOUNTED_HOST_FOLDER. Then I can start docker container by: sudo docker run -dP -e 'RIAK_CS_BUCKETS=foo,bar,baz' --name 'riak-cs' -p '8080:8080' -v $MOUNTED_HOST_FOLDER:/var/lib/riak ianbytchek/riak-cs. Which means that ensuring right permissions in for /var/lib/riak folder in configure_application.sh script helps.

There is one more issue. When I start the docker container again and see docker logs I get:

Starting Riak… OK!
Starting Stanchion… OK!
Starting Riak CS… OK!
Could not create admin user and retrieve credentiels…

Is this problem of early timeout?

Btw, how do you debug the image? Becase of entrypoint.sh has only if [ "$1" = 'riak' ]; then branch, I cannot start docker container with -i -t ianbytchek/riak-cs /bin/bash.

from docker-riak-cs.

iby avatar iby commented on May 21, 2024

Good to know that it actually works. With regards to Could not create admin user and retrieve credentials…. There was an issue with timeouts that was fixed with --connect-timeout 5 --retry 10 --retry-delay 5 on curl. I added more information to output when credentials setup fails, run it again and post what it outputs.

Debugging part wasn't very obvious, you'd have to overwrite entrypoint and run it with … --entrypoint bash ianbytchek/riak-cs -s. I just updated the image (make sure to pull the latest), making this as easy as just passing bash command:

docker -ti ianbytchek/riak-cs bash

The best way to debug is to clone the repo and mount /src/script/configure_application.sh:/entrypoint/script/configure_application.sh or any other file in that manner. Files that go into /entrypoint can be found in /src/script/build.sh. Then you launch the container and see what happens, update the configure_application.sh and do it again 😴

from docker-riak-cs.

lksv avatar lksv commented on May 21, 2024

Thanks, that is great progress. Unfortunately there is still one issue when I stop and start docker again:

lukas@luksrock:~/tmp$ sudo docker logs riak-cs
Update data permissions in case they are mounted as volumes… OK!
Starting Riak… OK!
Starting Stanchion… OK!
Starting Riak CS… OK!
Could not create admin user and retrieve credentials. Curl got response:
{}

That is because of riak_cs_create_admin function. When I manually set key and secret in /etc/riak-cs/advanced.config everything works perfectly. Should be nice to extended this function set directly key and secret from environment variables.

btw, thanks for debugging tips (I didn't know --entrypoint option).

from docker-riak-cs.

iby avatar iby commented on May 21, 2024

Check out the latest option. I'm a little short on time to properly test it, but it should work. See updated readme for environment vars.

from docker-riak-cs.

lksv avatar lksv commented on May 21, 2024

Works perfectly!
Thanks.

from docker-riak-cs.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.