Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added config option for devel and stable versions

  • Loading branch information...
commit fb9a1771b276670ad5b1bfc295a8f4fb87c1e088 1 parent ff0c0a6
Juan L. Negron authored
Showing with 11 additions and 2 deletions.
  1. +4 −0 config.yaml
  2. +7 −2 hooks/install
View
4 config.yaml
@@ -1,4 +1,8 @@
options:
+ couchbase_version:
+ default: stable
+ type: string
+ description: Couchbase version to install. ( stable or devel )
cluster_username:
default: Administrator
type: string
View
9 hooks/install
@@ -10,6 +10,8 @@ apt-get -y update
apt-get -y install facter facter-customfacts-plugin curl uuid pwgen libssl0.9.8
+CWD=`dirname $0`
+ARCH=`uname -m`
DEFAULT_CLUSTER_USERNAME=`config-get cluster_username`
DEFAULT_CLUSTER_PASSWORD=`config-get cluster_password`
COUCHBASE_BUCKET=`config-get bucket`
@@ -23,6 +25,9 @@ COUCHBASE_CLUSTER_RAMSIZE=`config-get cluster_ramsize`
COUCHBASE_BUCKET_RAMSIZE=`config-get bucket_ramsize`
COUCHBASE_IP=`facter ipaddress`
COUCHBASE_UUID=`uuid`
+COUCHBASE_VERSION=`config-get couchbase_version`
+COUCHBASE_URL="http://packages.couchbase.com/releases/1.8.0/couchbase-server-community_${ARCH}_1.8.0.deb"
+[ "${COUCHBASE_VERSION}" == "devel" ] && COUCHBASE_URL="http://packages.couchbase.com/releases/2.0.0-developer-preview-4/couchbase-server-community_${ARCH}_2.0.0-dev-preview-4.deb"
if [ "${COUCHBASE_BUCKET}" == "auto" ]; then
COUCHBASE_BUCKET=`pwgen -N1`
@@ -44,9 +49,9 @@ mkdir -p ${CWD}/../packages
cd ${CWD}/../packages
# ARCH must be either x86_64 or x86.
-curl -O http://packages.couchbase.com/releases/2.0.0-developer-preview-4/couchbase-server-community_${ARCH}_2.0.0-dev-preview-4.deb || exit 1
+curl -O ${COUCHBASE_URL} || exit 1
-dpkg -i couchbase-server-community_${ARCH}_2.0.0-dev-preview-4.deb
+dpkg -i `basename ${COUCHBASE_URL}`
service couchbase-server status && service couchbase-server restart || service couchbase-server start
Please sign in to comment.
Something went wrong with that request. Please try again.