[CCBC-37] libcouchbase examples should use envvars to simplify example execution Created: 22/Dec/11 Updated: 13/Nov/12 Resolved: 23/Dec/11 |
|
| Status: | Closed |
| Project: | Couchbase C client library libcouchbase |
| Component/s: | library |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | Public |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Matt Ingenthron | Assignee: | Trond Norbye |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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. |
| Comments |
| Comment by Trond Norbye [ 23/Dec/11 ] |
| Pushed to http://review.couchbase.org/11865 |
| Comment by Trond Norbye [ 23/Dec/11 ] |
|
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)) |