2

I recently started reading 7 databases in 7 weeks to try to broaden expand my knowledge. I have been stuck at the beginning of the first RIAK chapter for awhile. I'm trying to figure out how to extract the example servers from the source since i have installed the binaries on Ubuntu. The first commands that I'm supposed to run use the example servers:

dev/dev1/bin/riak start
dev/dev2/bin/riak start
dev/dev3/bin/riak start

When I look in the source I don't see anything that appears to be this so not really sure what I'm looking for.

Officially the authors wanted me to build RIAK but they are using 1.0.2 which I couldn't find a version of Erlang to build. I also tried building the latest and I ran into this:

snappy-test.cc: At global scope:
snappy-test.cc:82:15: error: aggregate ‘snappy::rusage       
snappy::benchmark_start_cpu’ has incomplete type and cannot be defined 
struct rusage benchmark_start_cpu;

Edit the version of the binaries I installed is:

riak version
2.1.1

I also have the source files for 1.0.2 and the latest version of trunk from Github from 6/5/2015 Probably like 10pm.

Travis
  • 2,105
  • 2
  • 26
  • 35
  • 1
    So which version of Riak are you trying out? – vempo Jun 07 '15 at 11:29
  • I have R16B03 installed (without the basho patches, bad?), got the source with `git clone -b 2.1.1 https://github.com/basho/riak riak`, then `cd riak; make devrel`. This created the dev/devN directories with the example servers. – Joe Jun 09 '15 at 05:09
  • @Joe I am getting this error canola-port.c:36:31: fatal error: security/pam_appl.h: No such file or directory #include Seems I need to install pam-devel but I can't seem to find it for Ubuntu are you running Ubuntu? – Travis Jun 24 '15 at 02:11
  • currently trying this http://stackoverflow.com/a/15901819/1757491 – Travis Jun 24 '15 at 02:15
  • 2
    I believe the Ubuntu package is [libpam0g](http://packages.ubuntu.com/wily/libpam0g) – Joe Jun 25 '15 at 03:18

2 Answers2

1

I don't have the directions for the book, but I know it's out of date for building Riak KV. The latest how-to for Ubuntu is kept up-to-date here.

A few tips:

  • You can find wherever Riak KV is running by hunting down the beam process: ps aux | grep beam
  • If you want to download any pre-built package by Basho, you can find them on PackageCloud

If your goal is to get to playing around with Riak in a real-to-world way, installing from PackageCloud is what we do.

mbb
  • 3,052
  • 1
  • 27
  • 28
  • Using this I was able to get 1 riak server running. The first part of the book wants you to make 3 servers on the local machine but it sounds like without building from source this is tough to do. – Travis Sep 04 '15 at 02:37
  • curl -v http://127.0.0.1:8087/ping * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 8087 (#0) > GET /ping HTTP/1.1 > User-Agent: curl/7.35.0 > Host: 127.0.0.1:8087 > Accept: */* > ^C The book was expecting a response of OK – Travis Sep 04 '15 at 02:38
1

Another way is running Riak (KV) in Docker:

docker run -it --rm -e CLUSTER_NAME=riakkv basho/riak-kv

Additional nodes will need to know the COORDINATOR_NODE.

A full cluster can be simulated in Docker Compose. See this example from:

https://hub.docker.com/r/basho/riak-kv/

version: "2"
services:
  coordinator:
    image: basho/riak-kv
    ports:
      - "8087:8087"
      - "8098:8098"
    environment:
      - CLUSTER_NAME=riakkv
    labels:
      - "com.basho.riak.cluster.name=riakkv"
    volumes:
      - schemas:/etc/riak/schemas
  member:
    image: basho/riak-kv
    ports:
      - "8087"
      - "8098"
    labels:
      - "com.basho.riak.cluster.name=riakkv"
    links:
      - coordinator
    depends_on:
      - coordinator
    environment:
      - CLUSTER_NAME=riakkv
      - COORDINATOR_NODE=coordinator

volumes:
  schemas:
    external: false

I was struggling to find ready to use examples myself, so people reaching this post might be interested in this repo with Docker Compose examples that I created, including scripts and example data.

Turiphro
  • 357
  • 1
  • 3
  • 11