Skip to content

Commit 5245395

Browse files
rkpattnaik780wtrockibhardesty
authored
docs(cli): update cli guides with contexts (#462)
* docs(cli): update cli guides with contexts * docs(cli): update registry guides * fix: remove corner case/additional element non essential to the guide * chore: Apply suggestions from code review Co-authored-by: Ben Hardesty <[email protected]> * chore: apply more suggestions from code review Co-authored-by: Ben Hardesty <[email protected]> Co-authored-by: Wojciech Trocki <[email protected]> Co-authored-by: Ben Hardesty <[email protected]>
1 parent a090a51 commit 5245395

File tree

2 files changed

+69
-12
lines changed

2 files changed

+69
-12
lines changed

docs/kafka/rhoas-cli-getting-started-kafka/README.adoc

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ This guide describes how to get started quickly by doing the following:
7171
* {base-url}{rhoas-cli-getting-started-url-kafka}#proc-creating-service-account-cli_getting-started-rhoas-kafka[Create a service account]
7272
* {base-url}{rhoas-cli-getting-started-url-kafka}#proc-creating-kafka-topic-cli_getting-started-rhoas-kafka[Create a Kafka topic]
7373
* {base-url}{rhoas-cli-getting-started-url-kafka}#proc-commands-managing-kafka_getting-started-rhoas-kafka[Use `rhoas` to manage your Kafka instances, service accounts, and Kafka topics]
74+
* {base-url}{rhoas-cli-getting-started-url-kafka}#proc-generating-kafka-configs-cli_getting-started-rhoas-kafka[Generate configurations for a Kafka instance]
7475

7576
//Additional line break to resolve mod docs generation error
7677

@@ -105,6 +106,9 @@ This example creates a Kafka instance called `my-kafka`.
105106
$ rhoas kafka create --name my-kafka
106107
----
107108

109+
CLI uses service contexts to group service instances against which commands are executed.
110+
The created Kafka instance is set automatically in the current context.
111+
108112
[NOTE]
109113
====
110114
If you do not want to use the default values,
@@ -119,17 +123,14 @@ You will be prompted to enter the `Name`, `Cloud Provider`, and `Cloud Region` f
119123
.Reviewing details of a Kafka instance
120124
[source,shell]
121125
----
122-
$ rhoas status kafka
126+
$ rhoas context status kafka
123127
----
124128

125-
This command shows that the Kafka instance is ready to use,
126-
because the `Status` field is `ready`.
127129

128130
[NOTE]
129131
====
130-
When you created the Kafka instance, it was set as the current instance automatically.
131132
If you have multiple Kafka instances,
132-
you can switch to a different instance by using the `rhoas kafka use` command.
133+
you can make the current context switch to a different instance by using the `rhoas context use-kafka` command.
133134
====
134135
--
135136

@@ -208,7 +209,7 @@ After creating a Kafka instance, you can create Kafka topics to start producing
208209

209210
[NOTE]
210211
====
211-
You can use `rhoas kafka list` and `rhoas kafka use` to switch to a specific Kafka instance.
212+
You can use `rhoas kafka list` and `rhoas context use-kafka` to switch to a specific Kafka instance.
212213
213214
.List Kafka instances
214215
[source,shell]
@@ -218,7 +219,7 @@ $ rhoas kafka list
218219
.Selecting a Kafka instance to use
219220
[source,shell]
220221
----
221-
$ rhoas kafka use --name my-kafka
222+
$ rhoas context use-kafka --name my-kafka
222223
----
223224
====
224225

@@ -245,6 +246,33 @@ For more information, use the command help `rhoas kafka topic create -h`.
245246

246247
. If necessary, you can edit or delete the topic by using the `rhoas kafka topic update` and `rhoas kafka topic delete` commands.
247248

249+
[id="proc-genearting-kafka-configs-cli_{context}"]
250+
== Generating configurations for a Kafka instance
251+
252+
[role="_abstract"]
253+
After creating a Kafka instance, you can generate a configuration file that your applications can use to connect to your Kafka instance.
254+
255+
.Prerequisites
256+
257+
* You've created a Kafka instance, and it has a `ready` status.
258+
* The Kafka instance is set in the current context.
259+
* Your user account and org have quota for creating service accounts.
260+
261+
.Procedure
262+
263+
* Generate a configuration file for the current service context.
264+
+
265+
--
266+
This example generates a JSON file with configurations for the Kafka instance you created.
267+
268+
. Generating a configuration file
269+
[source,shell]
270+
----
271+
$ rhoas generate-config --type json
272+
----
273+
--
274+
275+
248276
[id="proc-commands-managing-kafka_{context}"]
249277
== Commands for managing Kafka
250278

docs/registry/rhoas-cli-getting-started-registry/README.adoc

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ You can get started with {product-long-registry} by doing the following tasks:
7474
* {base-url}{rhoas-cli-getting-started-url-registry}#proc-downloading-service-registry-artifacts_getting-started-rhoas-service-registry[Download {registry} artifacts]
7575
* {base-url}{rhoas-cli-getting-started-url-registry}#proc-updating-service-registry-artifacts_getting-started-rhoas-service-registry[Update {registry} artifacts]
7676
* {base-url}{rhoas-cli-getting-started-url-registry}#proc-configuring-service-registry-rules_getting-started-rhoas-service-registry[Configure {registry} rules]
77+
* {base-url}{rhoas-cli-getting-started-url-registry}#proc-generating-registry-configs_getting-started-rhoas-service-registry[Generating {registry} configurations]
7778
* {base-url}{rhoas-cli-getting-started-url-registry}#proc-commands-managing-registry_getting-started-rhoas-service-registry[Use `rhoas` to manage your {registry} instance, service accounts, and artifacts]
7879

7980
//Additional line break to resolve mod docs generation error
@@ -107,6 +108,9 @@ This example creates a {registry} instance called `my-registry`.
107108
$ rhoas service-registry create --name my-registry
108109
----
109110

111+
The CLI uses service contexts to group service instances against which commands are executed.
112+
The created {registry} instance is set automatically in the current context.
113+
110114
[NOTE]
111115
====
112116
If you do not want to use the default values,
@@ -121,17 +125,16 @@ You are prompted to enter the `Name` for the {registry} instance.
121125
.Reviewing details of a {registry} instance
122126
[source,shell]
123127
----
124-
$ rhoas status service-registry
128+
$ rhoas context status service-registry
125129
----
126130

127131
This command shows that the {registry} instance is ready to use,
128132
because the `Status` field is `ready`.
129133

130134
[NOTE]
131135
====
132-
When you created the {registry} instance, it was set as the current instance automatically.
133136
If you have multiple {registry} instances,
134-
you can switch to a different instance by using the `rhoas service-registry use` command.
137+
you can change the context to a different instance by using the `rhoas context use-service-registry` command.
135138
====
136139
--
137140

@@ -213,12 +216,12 @@ Artifacts might include, for example, schemas that define the structure of Kafka
213216

214217
[NOTE]
215218
====
216-
You can use `rhoas service-registry use` to switch to a specific {registry} instance.
219+
You can use `rhoas context use-service-registry` to switch to a specific {registry} instance.
217220
218221
.Selecting a {registry} instance to use
219222
[source,shell]
220223
----
221-
$ rhoas service-registry use --name=my-registry
224+
$ rhoas context use-service-registry --name=my-registry
222225
----
223226
====
224227

@@ -475,6 +478,32 @@ You can use additional options, such as `--group` and `--instance-id`, to specif
475478
For more information about any of the options, view the command help `rhoas service-registry rule -h`.
476479
====
477480

481+
[id="proc-generating-registry-configs_{context}"]
482+
== Generating configurations for Service Registry instance
483+
484+
[role="_abstract"]
485+
After creating a Service Registry instance, you can generate a configuration file that your applications can use to connect to your Service Registry instance.
486+
487+
.Prerequisites
488+
489+
* You've created a Service Registry instance.
490+
* The Service Registry instance is set in the current context.
491+
* Your user account and org have quota for creating service accounts.
492+
493+
.Procedure
494+
495+
* Generate a configuration file for the current service context.
496+
+
497+
--
498+
This example generates a JSON file with configurations for the Service Registry instance.
499+
500+
.Generating a configuration file
501+
[source,shell]
502+
----
503+
$ rhoas generate-config --type json
504+
----
505+
--
506+
478507

479508
[id="proc-commands-managing-registry_{context}"]
480509
== Commands for managing {registry}

0 commit comments

Comments
 (0)