Vagrant environment for testing riak-ruby-client with Riak 2. This is better and easier than working with the test-server support from older versions of riak-ruby-client.
This almost certainly works for testing other Riak clients, apps using Riak, and just playing around with. It's not designed for production use. Do not use this in production.
- If you haven't got it, install Vagrant.
- If you haven't got it or another Vagrant-supported virtualization package, install VirtualBox.
- Clone this repo:
git clone https://github.com/basho-labs/riak-ruby-vagrant.git
cdinto this repo:
vagrant upto start the VM build process.
- Wait a while. The last line of the
vagrant upoutput should be
- Riak 2 is now running in a virtual machine, listening for protobuffs on localhost:17017 , and HTTP at http://localhost:17018/ .
The Riak instance has:
- Yokozuna full-text search (or "yz") enabled. I use this to test the client's yz support, as well as other gems that also use yz search. To support yz, the Oracle JVM is installed. Yokozuna uses the "yokozuna" bucket type.
- Active Anti-Entropy enabled. This has a bit of disk and IO overhead, but is necessary for yz.
- LevelDB backend configured; 2i works, kv and yz data persist. The disk usage may grow, in which case, destroy and re-up the VM.
- allow_mult enabled by default, because I need to test how the client handles sibling resolution and CRDTs.
- Bucket types for Set, Counter, and Map CRDTs. They're called "sets", "counters", and "maps" respectively.
- Security for protocol buffers is configured but not completely enabled. The configured user has the username "user" and the password "password". There's also "certuser" identified by a client cert (which ships with the ruby-client ).
Enabling and Disabling Security
your-machine> vagrant ssh Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64) vagrant@precise64:~$ sudo riak-admin security enable Enabled
your-machine> vagrant ssh Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64) vagrant@precise64:~$ sudo riak-admin security disable Disabled
Support and Contributions
This tool is provided without support. Definitely do not ever use this in production, it's strictly a development tool.
If you'd like to contribute, fork and make a pull request.