This repository has been archived by the owner on Jun 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Travis build using Riak 2.0 with legacy search enabled.
- Loading branch information
Showing
3 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{riak_search, [ {enabled, true} ]}, | ||
{merge_index, [ | ||
{data_root, "/var/lib/riak/merge_index"}, | ||
{buffer_rollover_size, 1048576}, | ||
{max_compact_segments, 20} | ||
]} | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# NOTE: This needs to be run as root. | ||
|
||
RIAK_VERSION="${1?Please provide Riak version.}" | ||
|
||
echo "Setting up Riak with RIAK_VERSION='${RIAK_VERSION}'" | ||
|
||
# Stop Riak (if it's running) so we can change stuff underneath it. | ||
service riak stop | ||
|
||
|
||
function install_riak() { | ||
# We're installing our own Riak version, so we add Basho's repo. | ||
curl http://apt.basho.com/gpg/basho.apt.key | apt-key add - | ||
bash -c "echo deb http://apt.basho.com $(lsb_release -sc) main > /etc/apt/sources.list.d/basho.list" | ||
apt-get -qq update | ||
apt-get install -qq -y --force-yes riak="${RIAK_VERSION}" | ||
} | ||
|
||
|
||
case "${RIAK_VERSION}" in | ||
current) | ||
# We want to use the existing Riak (2.0.something at time of writing). | ||
# We need to copy over our own advanced config to enable legacy search. | ||
echo "Using installed Riak with v2.0 extra config for legacy search..." | ||
cp utils/advanced.config /etc/riak/advanced.config | ||
;; | ||
1.4.*) | ||
# We want Riak 1.4.x, so install it and copy over a suitable config. | ||
echo "Installing Riak ${RIAK_VERSION} with v1.4 config..." | ||
install_riak | ||
cp utils/app.config /etc/riak/app.config | ||
;; | ||
*) | ||
# Unexpected version. | ||
echo "I don't know how to set up Riak ${RIAK_VERSION}, sorry." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
|
||
# Get rid of all the existing Riak data so we start fresh and then start fresh. | ||
rm -rf /var/lib/riak/* | ||
service riak start |