Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-37

libcouchbase examples should use envvars to simplify example execution

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      When running things like stats or pillowfight, it'd be handy if there were envvars to allow the user to not need to type their cluster URI, bucketname, password.

      Suggested:
      COUCHBASE_CLUSTER_URI="http://myserver:8091"
      COUCHBASE_BUCKETNAME="mybucket"
      COUCHBASE_PASSFILE=/path/to/password

      The passfile must be permissions 600 and owned by the user attempting to run the utility.

      It'd be valid to have just the CLUSTER_URI defined, and in that case the utility in question would default to the "default" bucket with no password.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        trond Trond Norbye added a comment -
        Show
        trond Trond Norbye added a comment - Pushed to http://review.couchbase.org/11865
        Hide
        trond Trond Norbye added a comment -

        You may use the following settings in $HOME/.cbcrc:
        uri=
        username=
        password=
        bucket=

        These settings may be overwritten with the following env variables:

        COUCHBASE_CLUSTER_URI
        COUCHBASE_CLUSTER_USER
        COUCHBASE_CLUSTER_PASSWORD
        COUCHBASE_CLUSTER_BUCKET

        I'm not going to bother checking the file permissions.. that's up to the user to bother about (because there is no "standard" way of checking the permissions (including windows))

        Show
        trond Trond Norbye added a comment - You may use the following settings in $HOME/.cbcrc: uri= username= password= bucket= These settings may be overwritten with the following env variables: COUCHBASE_CLUSTER_URI COUCHBASE_CLUSTER_USER COUCHBASE_CLUSTER_PASSWORD COUCHBASE_CLUSTER_BUCKET I'm not going to bother checking the file permissions.. that's up to the user to bother about (because there is no "standard" way of checking the permissions (including windows))

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            ingenthr Matt Ingenthron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes