cd /path/to/this/gist
vagrant up --provision
After the virtual machine has started up and finished provisioning, open a web browser to http://localhost:8098 to confirm that riak is running.
By default riak buckets do not support search indexing. To enable search on a bucket foo
, execute the following
BUCKET="foo"
URL="http://localhost:8098/riak/$BUCKET"
DATA='{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}]}}'
curl --silent -H 'Content-type: application/json' -X PUT -d "$DATA" $URL
echo "enabled search on bucket: $BUCKET"