ccloud CLI: Document new commands from SDK v6 update (ccloud-private#122)#22950
ccloud CLI: Document new commands from SDK v6 update (ccloud-private#122)#22950
Conversation
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
Files changed:
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify project configuration. |
fantapop
left a comment
There was a problem hiding this comment.
Okay, I made it through the whole thing. There are some docs specific comments and some ccloud cli specific comments. I'm fine taking the ccloud ones as later improvements to the CLI.
| f2a3b4c5-d6e7-8901-2345-678901abcdef Production FOLDER | ||
| a3b4c5d6-e7f8-9012-3456-789012abcdef Staging /Production FOLDER |
There was a problem hiding this comment.
This example is weird. The full path of the staging folder is /Production/Staging/
There was a problem hiding this comment.
@jhlodin I noticed we're still using this weird example. You closed this with no comment.
8bf5c03 to
7bc8c15
Compare
|
Pushed a commit that refactors this content into two pages, one to retain the "get started" content for installation and connecting to a Cloud org, the rest that splits out all of the ccloud tasks into separate sections like what we have for the CCAPI https://www.cockroachlabs.com/docs/cockroachcloud/cloud-api |
jhlodin
left a comment
There was a problem hiding this comment.
Pushed my own commit to refactor this PR, tagging in another writer to give this a proper peer review
6324f11 to
c05190e
Compare
taroface
left a comment
There was a problem hiding this comment.
Just adding a few initial comments -- I'll let another team member do a full review.
|
|
||
| The `ccloud cluster create` command creates a new CockroachDB {{ site.data.products.cloud }} cluster in your organization with the desired plan. | ||
|
|
||
| ### Create a {{ site.data.products.basic }} cluster |
There was a problem hiding this comment.
The current version of this doc has the variations of this command in filter tabs, which I find friendlier than stacking the three subcommands directly. Would suggest doing that here, unless we are trying to avoid the tabs due to the upcoming docs migration.
There was a problem hiding this comment.
I removed the tabs because of the upcoming docs migration, yeah. I think we also need to do testing to see if hiding content with a filter tab-like system obfuscates an agent reader's ability to associate commands with the relevant Cloud plan.
There was a problem hiding this comment.
The main themes of this review:
-
It sort of feels like there wants to be a succinct, table version of this list of commands at the top of the page? An exhaustive list, and each of those commands in the table would then link down to the more verbose explanation below? Optional, but I think that would add to the human-readability of this page.
-
I think one of the main things that's consistently missing is links to relevant topics in the Cloud docs (or deployment-agnostic docs). I've added several comments about where to do this (an easy example is CMEK, link to the CMEK docs), but I think there are probably a ton of other places you can do this. Would also add to the human-readability of the page. I think this is a decent use case for Claude, ask "hey review this doc and tell me where I should be linking to other parts of our documentation." It'll give you false positives but just throw those out.
-
Because for most of these commands, the main input is just a cluster name, most examples are super clear. The reader is familar with the "blue-dog" cluster name and so it doesn't require much explanation. But for any command whose input isn't just a cluster name, there might need to be some extra explanation about what inputs are expected/permitted. This starts to be more relevant from "Manage folders" and below. Are Names allowed, or just IDs? I deduced that
ccloud service-account api-key createtakes a service account ID, but that required a little too much work on my part. For PCR, what is theprod-eastofccloud replication list prod-east? Or is that a part of the command name? There's a bit too much room for error in some of these commands at the bottom.
(EDIT: After having thought about this more, you might actually even want to specify further for the cases where the input is just blue-dog, as the idea that that's a cluster name is introduced early on in the page, but a human reader may not be traversing this page linearly and so might not get that.)
| ## Limitations | ||
|
|
||
| - {% include cockroachcloud/limitations/limitation-ccloud-folders.md %} | ||
| Refer to the [`ccloud` reference documentation]({% link cockroachcloud/ccloud-reference.md %}) to learn how to use the `ccloud` CLI tool to create and manage CockroachDB {{ site.data.products.cloud }} clusters. No newline at end of file |
There was a problem hiding this comment.
Is there a rule around what pages need a "See also" section? I mean I think it makes sense that this page doesn't have one, it just seems relatively rare in our docs so it somehow looks wrong.
There was a problem hiding this comment.
I don't think it's formalized anywhere, maybe something the templating working group considered. But while I think "See also" is a good default for most pages, "Next steps" is a better fit for a how-to (especially a "get started" type page) where it is expected that you will read the page front to back and then take additional steps. I don't think anyone is reading this page and then not going to the reference page to do more stuff with ccloud.
| ccloud cluster create basic | ||
| ~~~ | ||
|
|
||
| This command creates a CockroachDB {{ site.data.products.basic }} cluster in the default cloud infrastructure provider (GCP) and the closest region for that provider. It will generate a cluster name. |
There was a problem hiding this comment.
Could be good to link to where in the docs we mention GCP being the default? This reads as though this knowledge is kind of assumed.
There was a problem hiding this comment.
It's only the default for ccloud, not any other deployment tool AFAIK. So it's not so much assumed knowledge as it is a stated fact for the command described here.
| ccloud cluster sql blue-dog --sso | ||
| ~~~ | ||
|
|
||
| Use the `ccloud auth whoami` command to check that you are logged into the correct organization. |
There was a problem hiding this comment.
Include link to "organization" docs?
33b9e40 to
0a0beb3
Compare
bsanchez-the-roach
left a comment
There was a problem hiding this comment.
Found a few typos but otherwise LGTM
|
@jhlodin are you planning to rebase and merge this PR are you waiting for someone else to do it? |
Documents all new command groups added in cockroachlabs/ccloud-private#122, which updated the ccloud CLI from SDK v3 to v6 and added comprehensive support for new Cloud API features. New command groups documented: - ccloud cluster connection-string - ccloud cluster database (list/create/delete) - ccloud cluster backup (list/config get/config update) - ccloud cluster restore (list/create) - ccloud cluster versions - ccloud cluster version-deferral (get/set) - ccloud cluster blackout-window (list/create/delete) - ccloud cluster maintenance (get/set/delete) - ccloud cluster disruption (get/set/clear) - ccloud cluster cmek get - ccloud cluster log-export (get/enable/disable) - ccloud cluster metric-export (cloudwatch/datadog/prometheus) - ccloud cluster networking egress-rule (list/create/delete) - ccloud cluster networking egress-private-endpoint (list/get/create/delete) - ccloud cluster networking client-ca-cert (get/set/update/delete) - ccloud cluster networking private-endpoint (services/connections/etc.) - ccloud organization get - ccloud audit list - ccloud billing invoice (list/get) - ccloud folder (list/get/create/update/delete/contents) - ccloud service-account (list/get/create/delete + api-key management) - ccloud jwt-issuer (list/get/create/update/delete) - ccloud replication (list/get/create/update)
- backup config update: --frequency-minutes/--retention-days → --frequency/--retention - restore create: backup ID is --backup-id flag, not positional arg; add --source-cluster-id and --type - version-deferral set: policy is --policy flag, not positional; list valid values - maintenance set: add required --duration flag, document --offset alternative, fix output format - disruption: rewrite section - it's disruption simulation, not "disruption budget" - log-export enable: --log-group → --log-name; fix output format - egress-rule create: remove nonexistent --ports flag; add --description - egress-private-endpoint create: --name/--service-name → --region/--target-service-identifier/--target-service-type - private-endpoint: fix command names (services → service list, add-connection → connection add, etc.) - private-endpoint: add missing trusted-owner subcommand group (list/add/remove) - replication create: --source-cluster/--target-cluster → --primary-cluster/--standby-cluster - replication update: --cutover → --status FAILING_OVER; add --failover-at - replication list: add required cluster name argument - folder list: PARENT ID → PARENT PATH, add TYPE column - Fix output table columns across multiple commands to match actual CLI output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verified all new command documentation against the actual ccloud codebase (testdata files and source code) and corrected: - Output formats: backup config/versions/version-deferral/cmek/client-ca-cert/ org get all use key-value format, not tables - Column names: backup list (AS OF TIME), versions (RELEASE TYPE/SUPPORT STATUS/SUPPORT END/ALLOWED UPGRADES), billing (STATUS/TOTAL), folder contents (ID/NAME/TYPE/PARENT PATH), service-account list (no CREATOR) - Status values: restore (SUCCESS/PENDING), egress-private-endpoint (AVAILABLE/PENDING), replication create (STARTING) - Positional args vs flags: folder create, service-account create, api-key create all take name as positional arg not --name flag; api-key list uses --service-account-id flag; api-key delete takes 1 arg not 2 - Connection string output includes Connection String header and Parameters section - Prometheus uses "metric scrape endpoint" not "metric export" - Various output message formatting (Successfully vs Success!, casing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CloudWatch/Datadog/Prometheus enable: add missing Cluster and Status lines to match source code output - Prometheus enable: revert incorrect "scrape endpoint" wording back to "metric export" to match source - Datadog enable: fix --site flag value to uppercase (US5) to match expected enum values - client-ca-cert set/update: fix "Success!" prefix to "Successfully" and add Status line to match source Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: bsanchez-the-roach <brandon.sanchez@cockroachlabs.com>
f6a907c to
1f17bc4
Compare
Summary
Documents all new command groups added in cockroachlabs/ccloud-private#122, which updated the
ccloudCLI from SDK v3 to v6 and added comprehensive support for new Cloud API features.New commands documented
Cluster commands
ccloud cluster connection-stringccloud cluster databaselist,create,deleteccloud cluster backuplist,config get,config updateccloud cluster restorelist,createccloud cluster versionsccloud cluster version-deferralget,setccloud cluster blackout-windowlist,create,deleteccloud cluster maintenanceget,set,deleteccloud cluster disruptionget,set,clearccloud cluster cmekgetccloud cluster log-exportget,enable,disableccloud cluster metric-exportcloudwatch,datadog,prometheus(each:get/enable/disable)ccloud cluster networking egress-rulelist,create,deleteccloud cluster networking egress-private-endpointlist,get,create,deleteccloud cluster networking client-ca-certget,set,update,deleteccloud cluster networking private-endpointservices,create-services,connections,add-connection,delete-connectionTop-level commands
ccloud organization getccloud audit listccloud billing invoicelist,getccloud folderlist,get,create,update,delete,contentsccloud service-accountlist,get,create,delete+api-keysubcommandsccloud jwt-issuerlist,get,create,update,deleteccloud replicationlist,get,create,updateNotes
filter-contentsection pattern{% include_cached copy-clipboard.html %}before code blocks,~~~ shellfor commands,~~~for output