Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How is cbgb configured? #5

Open
tleyden opened this issue Feb 28, 2015 · 6 comments
Open

How is cbgb configured? #5

tleyden opened this issue Feb 28, 2015 · 6 comments
Assignees
Labels

Comments

@tleyden
Copy link

tleyden commented Feb 28, 2015

How do I create a bucket?

@tleyden
Copy link
Author

tleyden commented Feb 28, 2015

I think I may know one answer: use the same REST api call as you would with Couchbase Server?

The output states that there is web ui available, but when I try to go to http://HOST:8091, I get:

cbgb is missing its UI

cbgb was not given a usable UI and could not fetch one from the internet. The REST API will continue to work, but no admin UI will be available to you until you fix whatever got you here.

For more info, check your logs and stuff.

@mschoch
Copy link
Contributor

mschoch commented Feb 28, 2015

Same as #4. Since hosted download isn't working, point it to static folder in git repo. Should be command line arg to configure the path.

@tleyden
Copy link
Author

tleyden commented Feb 28, 2015

Ok thanks, that gives me enough to go on in order to dig into this

@steveyen
Copy link
Member

Yep, what @mschoch said. For example, I used...

$ pwd
/Users/steveyen/go/src/github.com/couchbaselabs/cbgb
$ ls ./static/
angular.min.js app.css app.html app.js bootstrap cbgb.ico d3 lodash.min.js partials
$ ./cbgb -static-path=./static
2015/02/27 17:06:05 cbgb - version 0.0.0
2015/02/27 17:06:05 -------------------------------------------------------
2015/02/27 17:06:05 warning: running openly without any adminUser/adminPass
2015/02/27 17:06:05 warning: please don't run this way in production usage
2015/02/27 17:06:05 -------------------------------------------------------
2015/02/27 17:06:05 data directory: ./tmp
2015/02/27 17:06:05 loading bucket: default
2015/02/27 17:06:05 primary connections...
2015/02/27 17:06:05 connect your couchbase client to: http://HOST:8091/pools/default
2015/02/27 17:06:05 web admin U/I available on: http://HOST:8091
2015/02/27 17:06:05 secondary connections...
2015/02/27 17:06:05 view listening: :8092
2015/02/27 17:06:05 data listening: :11210

@tleyden
Copy link
Author

tleyden commented Feb 28, 2015

Can buckets be added via rest api? Does couchbase-cli work?

@mschoch
Copy link
Contributor

mschoch commented Feb 28, 2015

I think this chunk of code shows how to create a bucket with the REST api:

cbgb/static/app.js

Lines 165 to 181 in 53841e4

$http({
method: 'POST',
url: '/_api/buckets',
data: 'name=' + encodeURIComponent(bucketName) +
'&password=' + encodeURIComponent($scope.bucketPassword) +
'&quotaBytes=' + encodeURIComponent($scope.bucketQuotaBytes) +
'&memoryOnly=' + encodeURIComponent($scope.bucketMemoryOnly),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).
success(function(data) {
$scope.bucketCreateResult = "created bucket: " + bucketName;
retrieveBucketNames();
}).
error(function(data) {
$scope.bucketCreateResult =
"error creating bucket: " + bucketName + "; error: " + data;
});

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants