#!/bin/sh
echo "* init couchbase server $1"
curl -u Administrator:password -v -X POST http://$1:8091/node/controller/setupServices -d 'services=data'
curl -v -X POST http://$1:8091/settings/web -d 'password=chaos2015&username=Administrator&port=SAME'
curl -X POST -u Administrator:chaos2015 -d 'name=chaos' -d 'ramQuotaMB=512' -d 'authType=sasl'  -d 'replicaNumber=0' -d 'saslPassword=chaos' http://$1:8091/pools/default/buckets
exit 0
  
