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.

      # Subject Project Status CR V
      For Gerrit Dashboard: &For+CCBC-37=message:CCBC-37

        Activity

        ingenthr Matt Ingenthron created issue -
        Hide
        trond Trond Norbye added a comment -
        Show
        trond Trond Norbye added a comment - Pushed to http://review.couchbase.org/11865
        trond Trond Norbye made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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))
        avsej Sergey Avseyev made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        brett19 Brett Lawson made changes -
        Workflow jira [ 15746 ] Couchbase SDK Workflow [ 43697 ]

          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