-
Notifications
You must be signed in to change notification settings - Fork 94
QuickStart
QuickStart as of Riak CS 2.1
Make sure you have Basho erlang R16B02bashoX, and if possible, erlang-quickcheck boosts quality because Riak CS includes several QuickCheck tests.
$ mkdir cs-2.1
$ cd cs-2.1
$ git clone git@github.com:basho/riak_ee.git -b 2.1 # private repo, not served by git:// protocol
$ git clone git://github.com/basho/stanchion.git -b 2.1
$ git clone git://github.com/basho/riak_cs.git -b 2.1
$ export RIAK_CS_EE_DEPS=true
$ make -C riak_ee stage
$ make -C stanchion stage
$ make -C riak_cs stage
make stagedevrel
is also available. Instead you'll get 8-node dev
cluster build.
For non-Basho people: use git://github.com/basho/riak
instead, and
don't set RIAK_CS_EE_DEPS
.
$ sed -i.back 's/storage_backend = bitcask/storage_backend = prefix_multi/' riak_ee/rel/riak/etc/riak.conf
$ sed -i.back 's/## cs_version = 20000/cs_version = 20000/' riak_ee/rel/riak/etc/riak.conf
$ echo "buckets.default.allow_mult = true" >> riak_ee/rel/riak/etc/riak.conf
$ echo "buckets.default.merge_strategy = 2" >> riak_ee/rel/riak/etc/riak.conf
If you use MapReduce in Riak (e.g. storage calcualtion), tell Riak CS
beam path to Riak, in advanced.config
.
{riak_kv, [
{add_paths, ["/your/abs/path/to/riak_cs/rel/riak-cs/ebin"]}
]},
$ riak_ee/rel/riak/bin/riak start
$ stanchion/rel/stanchion/bin/stanchion start
$ riak_cs/rel/riak-cs/bin/riak-cs start
Make sure local port 8080 is open by running nc localhost 8080
or curl http://localhost:8080
, and TCP connection is accepted. The cURL command must return HTTP error.
$ riak_cs/rel/riak-cs/bin/riak-cs attach
> riak_cs_user:create_user("admin", "admin@example.com", "admin-key", "admin-secret").
Then you'll get a new account with its key "admin-key" and secret "admin-secret". Set up you clients like s3cmd S3cmd-Configuration or s3curl Using-s3curl.
For unit tests use make test
. For other small verifications, use
make xref dialyzer
. Integration tests are a bit complicated. See
riak_test/README.md
in the code tree to know how to run it.