Skip to content

Instantly share code, notes, and snippets.

@ingenthr
Created June 28, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ingenthr/a8fd155402234593b4fad30c346a652c to your computer and use it in GitHub Desktop.
Save ingenthr/a8fd155402234593b4fad30c346a652c to your computer and use it in GitHub Desktop.
Creating the first node
#!/usr/bin/env bash
set -xe
# Setup Services
curl -i -u Administrator:password -X POST \
http://127.0.0.1:8091/node/controller/setupServices \
-d 'services=kv%2Cn1ql%2Cindex'
# Initialize Node with /couchbase for index and data path
curl -i -u Administrator:password -X POST \
http://127.0.0.1:8091/nodes/self/controller/settings \
-d 'path=%2Fcouchbase&index_path=%2Fcouchbase'
# Setup Administrator username and password
curl -i -X POST \
http://127.0.0.1:8091/settings/web \
-d 'password=password&username=Administrator&port=SAME'
# Setup Memory Optimized Indexes
curl -i -u Administrator:password -X POST \
http://127.0.0.1:8091/settings/indexes \
-d 'storageMode=memory_optimized'
# Setup Index RAM Quota
curl -i -u Administrator:password -X POST \
http://127.0.0.1:8091/pools/default \
-d 'memoryQuota=18432' -d 'indexMemoryQuota=34816'
# Setup Bucket
curl -i -u Administrator:password -X POST \
http://127.0.0.1:8091/pools/default/buckets \
-d 'flushEnabled=1&replicaIndex=0&replicaNumber=1&ramQuotaMB=18432&bucketType=membase&name=default&authType=sasl&saslPassword='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment