Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Create Bucket on Capella #106

Open
deniswsrosa opened this issue Oct 4, 2023 · 0 comments · May be fixed by #107
Open

Create Bucket on Capella #106

deniswsrosa opened this issue Oct 4, 2023 · 0 comments · May be fixed by #107

Comments

@deniswsrosa
Copy link
Collaborator

deniswsrosa commented Oct 4, 2023

Capella has a new management API that allows you to create a bucket via the API https://docs.couchbase.com/cloud/management-api-reference/index.html

To create an API key and secret, you will need to sign in into capella , and go to the org settings:
Screenshot 2023-10-04 at 10 44 16 PM

You should be able to generate keys to use with the rest API mentioned above.

In the New Connection Dialog, we already allow users to store credentials for the management API. All you have to do is to uncomment line 551 on NewConnectionDialog for the UI to appear:

Screenshot 2023-10-04 at 10 41 48 PM

  • When the user saves a connection, if he also provides an API key/secret in the advanced options of the New Connection Dialog, we need to test if they are valid. You could do that by simply trying to read or list the orgs of the user. If it doesn't work, we should tell the user that the management API KEY/Secret is invalid.

  • Change the DataLoader.saveDatabaseCredentials to also receive an API KEY and API secret, and store them in the "SavedCluster" object. This change is enough to also persist it under the hood.

  • on ActiveCluster class, add a get for the API KEY and another for the API Secret

  • The "create bucket" feature currently appears only for provisioned clusters, you will need to change the logic there to make it also appear to Capella clusters, but it should only appear when the user has provided the API KEY/Secret.

  • Finally, when the user clicks on the "Create Bucket" option, if it is a capella cluster, you will need to call the API endpoints to create the bucket.

@teetangh teetangh linked a pull request Oct 5, 2023 that will close this issue
@teetangh teetangh self-assigned this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants