Last active
July 15, 2020 15:20
-
-
Save gitschaub/b7a36f32acec9c18456ce0a55f5e8efd to your computer and use it in GitHub Desktop.
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
# If using the RTP cluster, replace: | |
# <couchbase-ip>:8091 -> couchbase-ivpp.apps.vmware.openshift.wwva.ciscolabs.com | |
# <couchbase-ip>:8092 -> couchbase-xdcr-ivpp.apps.vmware.openshift.wwva.ciscolabs.com | |
# To see all of the buckets on the server. | |
curl -u Administrator:password -XGET http://<couchbase-ip>:8091/pools/default/buckets | |
# To delete an existing bucket. | |
curl -u Administrator:password -XDELETE http://<couchbase-ip>:8091/pools/default/buckets/<bucket-name> | |
# To create a new bucket (with no password). NOTE, you'll have to change the proxy port until you find one that isn't being used. | |
curl -u Administrator:password -XPOST http://<couchbase-ip>:8091/pools/default/buckets -d name=default -d ramQuotaMB=100 -d authType=none -d proxyPort=11212 | |
# Get a random key from a bucket | |
curl -u Administrator:password -XGET http://<couchbase-ip>:8091/pools/default/buckets/<bucket-name>/localRandomKey | |
# Create the 'all' view | |
curl -u Administrator:password -X PUT -H 'Content-Type: application/json' http://<couchbase-ip>:8092/<bucket-name>/_design/all -d '{"views":{"all":{"map":"function(doc,meta){\n emit(meta.id,null)\n}"}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment