You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: apply style updates to Kafka Getting Started quick start (#599)
* docs: apply style updates to getting started. reflect some changes to quarkus and nodejs.
* docs: add links to gs in prereqs for quarkus and nodejs
* docs: address peer review feedback
* docs: minor tweak
Copy file name to clipboardExpand all lines: docs/kafka/getting-started-kafka/README.adoc
+57-63Lines changed: 57 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ endif::[]
114
114
== Creating a Kafka instance in {product-kafka}
115
115
116
116
[role="_abstract"]
117
-
Use the {product-kafka} web console to create and configure a Kafka instance for your applications or services. A Kafka instance in {product-kafka} includes a Kafka cluster, bootstrap server, and the configurations needed for producers and consumers to connect to the instance.
117
+
Use the {product-long-kafka} web console to create and configure a Kafka instance for your applications or services. A Kafka instance in {product-kafka} includes a Kafka cluster, bootstrap server, and the configuration details needed for producers and consumers to connect to the instance.
118
118
119
119
ifndef::qs[]
120
120
.Prerequisites
@@ -123,11 +123,18 @@ ifndef::qs[]
123
123
endif::[]
124
124
125
125
.Procedure
126
-
. In the {product-kafka} web console, go to *Streams for Apache Kafka* > *Kafka Instances* and click *Create Kafka instance*.
126
+
. In the {product-kafka} {service-url-kafka}[web console^], select *Kafka Instances* and click *Create Kafka instance*.
127
+
+
128
+
The instance creation pane opens, as shown in the figure.
129
+
+
130
+
[.screencapture]
131
+
.Kafka instance creation pane
132
+
image::sak-configure-kafka-instance.png[Image of Create Kafka instance pane]
133
+
127
134
. Enter a unique name for the Kafka instance, such as `my-first-kafka-instance`.
128
-
. From the *Cloud region* drop-down menu, select the relevant option. The selection for availability zones is preconfigured as *Single* for a trial instance and *Multi* for a production instance.
135
+
. In the *Cloud region* list, select the relevant option.
129
136
+
130
-
NOTE: The cloud provider is preconfigured.
137
+
NOTE: The cloud provider is preconfigured to the same value for both trial and production instances. The availability zone value is preconfigured as *Single* for a trial instance and *Multi* for a production instance.
131
138
+
132
139
////
133
140
//For post preview, when more options are available.
@@ -144,16 +151,11 @@ For more information about the support scope of Red Hat Technology Preview featu
144
151
145
152
146
153
. Click *Create instance* to start the creation process for your Kafka instance.
147
-
148
-
154
+
+
149
155
--
150
-
[.screencapture]
151
-
.Kafka instance configuration details
152
-
image::sak-configure-kafka-instance.png[Image of instance configuration details in Create Kafka instance window]
153
-
154
-
The new Kafka instance is listed in the instances table. Typically, you need to wait a few minutes for the instance creation process to finish.
156
+
The new Kafka instance is listed on the *Kafka Instances* page. Typically, you need to wait a few minutes for the instance creation process to finish.
155
157
156
-
When the instance *Status* is *Ready*, you can start using the Kafka instance. You can use the options icon (three vertical dots) to view instance details, connect to the instance, change the instance owner, or delete the instance.
158
+
When the instance has a status of *Ready*, you can start using the instance. As shown in the following figure, you can click the options icon (three vertical dots) to view instance and connection details, change the instance owner, or delete the instance.
157
159
158
160
[.screencapture]
159
161
.Kafka instance options menu
@@ -164,41 +166,26 @@ NOTE: Although you can see Kafka instances created by other users in your organi
164
166
165
167
.Verification
166
168
ifdef::qs[]
167
-
* Is the new Kafka instance listed in the instances table?
168
-
* Is the state of the new Kafka instance shown as *Ready*?
169
+
* Is the new Kafka instance listed on the *Kafka Instances* page?
170
+
* Is the status of the new Kafka instance shown as *Ready*?
169
171
endif::[]
170
172
ifndef::qs[]
171
-
. Verify that the new Kafka instance is listed in the instances table.
172
-
. Verify that the state of the new Kafka instance is shown as *Ready*.
173
+
. Verify that the new Kafka instance is listed on the *Kafka Instances* page.
174
+
. Verify that the status of the new Kafka instance is shown as *Ready*.
173
175
endif::[]
174
176
175
-
176
-
////
177
-
// Commenting out the following for now, which belongs in an onboarding tour (Stetson, 4 March 2021)
178
-
179
-
When you're in the {Product_short} environment, you will see a left menu panel. This panel provides access to all resources related to the service, including the `Quick starts` and `Documentation`.
180
-
181
-
In the lower left of the screen you'll see a lightbulb icon. This icon gives access to the `Resource Center`. Here you can find the latest information about the service, like product updates, upcoming events, etc.
182
-
183
-
image::sak-crc-resource-center.png[Image of Resource Center in web console]
184
-
185
-
The center of the page shows you the list of Kafka instances that are currently running within your organisation. If this is your, or your organisations, first interaction with {Product_short}, this list will be empty.
186
-
187
-
image::sak-kafka-overview.png[Image of initial empty instances table]
188
-
////
189
-
190
177
[id="proc-creating-service-account_{context}"]
191
178
== Creating a service account to connect to a Kafka instance in {product-long-kafka}
192
179
193
180
[role="_abstract"]
194
-
To connect your applications or services to a Kafka instance in {product-long-kafka}, you need to create a service account that's associated with the instance. You also need to save the bootstrap server endpoint for the instance, the generated service account credentials, and the authentication token endpoint to a secure location. You'll use the service account and Kafka instance information later when you configure your application.
181
+
To connect your applications or services to a Kafka instance in {product-long-kafka}, you need to create a service account that's associated with the instance. You then need to save the generated service account credentials, the authentication token endpoint, and the bootstrap server endpoint for the instance to a secure location. You'll use these details when you configure an application to connect to the Kafka instance.
195
182
196
183
.Prerequisites
197
-
* You've created a Kafka instance and the instance is in the *Ready* state.
184
+
* You have a running Kafka instance in {product-kafka}.
198
185
199
186
.Procedure
200
-
. In the *Kafka Instances* page of the web console, for the relevant Kafka instance that you want to connect to, select the options icon (three vertical dots) and click *Connection*.
201
-
. In the *Connection* page, copy the *Bootstrap server* endpoint to a secure location. This is the bootstrap server endpoint that you'll need for connecting to this Kafka instance.
187
+
. On the *Kafka Instances* page of the {product-kafka} {service-url-kafka}[web console^], select the options icon (three vertical dots) for your Kafka instance and click *Connection*.
188
+
. On the *Connection* page, copy the *Bootstrap server* endpoint to a secure location. You'll specify this endpoint when configuring a connection to the Kafka instance.
202
189
+
203
190
ifdef::qs[]
204
191
The remainder of this task describes how to create a service account and copy the generated credentials.
@@ -208,18 +195,20 @@ ifndef::qs[]
208
195
The remainder of this section describes how to create a service account and copy the generated credentials.
209
196
If you want to use the credentials of an _existing_ service account, you can skip to the next section.
210
197
endif::[]
198
+
199
+
. Open the {service-accounts-url}[Service Accounts^] page in the *Application Services* section of the Red Hat Hybrid Cloud Console.
211
200
. Click *Create service account* to set up the account that you'll use to access this Kafka instance.
212
-
. Enter a short description, such as `my-service-account`, and click *Create*.
213
-
. Copy the generated *Client ID* and *Client secret* values to a secure location. These are the credentials that you'll use to connect to this Kafka instance.
201
+
. Enter a short description such as `my-service-account` and click *Create*.
202
+
. Copy the generated *Client ID* and *Client secret* values to a secure location. You'll specify these credentials when configuring a connection to the Kafka instance.
214
203
+
215
-
IMPORTANT: The generated credentials are displayed only one time, so ensure that you've successfully and securely saved the copied credentials before closing the credentials window.
204
+
IMPORTANT: The generated credentials are displayed only once, so ensure that you've successfully and securely saved the copied credentials before closing the credentials window.
216
205
217
206
. After you save the generated credentials to a secure location, select the confirmation check box in the credentials window and close the window.
218
-
. For the *Authentication method*, copy the SASL/OAUTHBEARER *Token endpoint URL* to a secure location. This is the endpoint that you'll use with your service account credentials to authenticate the connection to this Kafka instance.
207
+
. Under *Authentication method*, copy the SASL/OAUTHBEARER *Token endpoint URL* value to a secure location. This is the endpoint that you'll use with your service account credentials to authenticate the connection to the Kafka instance.
219
208
+
220
-
NOTE: SASL/PLAIN authentication is also available for tools and libraries that don't support SASL/OAUTHBEARER, but SASL/OAUTHBEARER is recommended whenever possible. With SASL/PLAIN authentication, you use only the service account credentials to authenticate the connection to the Kafka instance.
209
+
NOTE: SASL/PLAIN authentication is also available for tools and libraries that don't support SASL/OAUTHBEARER, but SASL/OAUTHBEARER is recommended whenever possible. With SASL/PLAIN authentication, you use only service account credentials to authenticate the connection to the Kafka instance.
221
210
222
-
. To review, reset, or delete the service account, use the {service-accounts-url}[Service Accounts^] page in the *Application Services* section of the Red Hat Hybrid Cloud Console.
211
+
. (Optional) To review, reset, or delete the service account, use the {service-accounts-url}[Service Accounts^] page.
223
212
224
213
.Verification
225
214
ifdef::qs[]
@@ -228,24 +217,25 @@ ifdef::qs[]
228
217
endif::[]
229
218
ifndef::qs[]
230
219
. Verify that the bootstrap server, client credentials, and authentication token endpoint are saved to a secure location.
231
-
. Verify that your service account was successfully created in the *Service Accounts* page.
220
+
. Verify that your service account was successfully created on the *Service Accounts* page.
== Setting permissions for a service account in a Kafka instance in {product-kafka}
236
225
237
226
[role="_abstract"]
238
-
After you create a service account to connect to a Kafka instance, you must also set the appropriate level of access for that new account in the Access Control List (ACL) of the Kafka instance. {product-kafka} uses ACLs provided by Kafka that enable you to manage how other user accounts and service accounts are permitted to interact with the Kafka resources that you create.
227
+
After you create a service account to connect to a Kafka instance, you must also set the appropriate level of access for that new account in an Access Control List (ACL) for the Kafka instance. {product-long-kafka} uses ACLs provided by Kafka that enable you to manage how other user accounts and service accounts are permitted to interact with the Kafka resources that you create.
239
228
240
229
.Prerequisites
241
-
* You've created a Kafka instance and the instance is in the *Ready* state.
230
+
* You have a running Kafka instance in {product-kafka}.
242
231
* You've created a service account that you want to allow to access the running Kafka instance.
243
232
244
233
.Procedure
245
-
. In the *Kafka Instances* page of the web console, click the name of the Kafka instance that you want the service account to access.
234
+
. In the {product-long-kafka} {service-url-kafka}[web console^], select *Kafka Instances* and then click the name of the Kafka instance that you want the service account to access.
246
235
. Click the *Access* tab to view the current ACL for this instance.
247
-
. Click *Manage access*, use the *Account* drop-down menu to select the service account that you previously created, and click *Next*.
248
-
. Under *Assign Permissions*, use the drop-down menu to select the *Consume from a topic* and the *Produce to a topic* permission options, and set all resource identifiers to `Is` and all identifier values to `*`.
236
+
. To modify the ACL, click *Manage access*.
237
+
. In the *Manage access* dialog box, use the *Account* list to select the service account that you previously created, and click *Next*.
238
+
. Under *Assign Permissions*, use the list to select the *Consume from a topic* and the *Produce to a topic* permission options, and set all resource identifiers to `Is` and all identifier values to `*`.
249
239
+
250
240
--
251
241
These permissions enable applications associated with the service account to create and delete topics in the Kafka instance, to produce and consume messages in any topic in the instance, and to use any consumer group and any producer.
@@ -289,61 +279,65 @@ NOTE: Alternatively, you can click *Add permission* to create individual permiss
289
279
290
280
.Verification
291
281
ifdef::qs[]
292
-
* Are the new permissions for the service account listed in the *Access* page of the Kafka instance?
282
+
* Are the new permissions for the service account listed on the *Access* page of the Kafka instance?
293
283
endif::[]
294
284
ifndef::qs[]
295
-
* Verify that the new permissions for the service account are listed in the *Access* page of the Kafka instance.
285
+
* Verify that the new permissions for the service account are listed on the *Access* page of the Kafka instance.
296
286
297
287
[role="_additional-resources"]
298
288
.Additional resources
299
-
* {base-url}{access-mgmt-url-kafka}[_Managing account access in {product-long-kafka}_^]
300
-
* link:https://kafka.apache.org/documentation/#security_authz[Authorization and ACLs^] in Kafka documentation
289
+
* {base-url}{access-mgmt-url-kafka}[Managing account access in {product-long-kafka}^]
290
+
* link:https://kafka.apache.org/documentation/#security_authz[Authorization and ACLs^] in the Apache Kafka documentation
301
291
endif::[]
302
292
303
293
[id="proc-creating-kafka-topic_{context}"]
304
294
== Creating a Kafka topic in {product-kafka}
305
295
306
296
[role="_abstract"]
307
-
After you create a Kafka instance, you can create Kafka topics to start producing and consuming messages in your services.
297
+
After you create a Kafka instance, you can create Kafka topics to start producing and consuming messages in your applications and services.
308
298
309
299
.Prerequisites
310
-
* You've created a Kafka instance and the instance is in the *Ready* state.
300
+
* You have a running Kafka instance in {product-long-kafka}.
311
301
312
302
.Procedure
313
-
. In the *Kafka Instances* page of the web console, click the name of the Kafka instance that you want to add a topic to.
314
-
. Select the *Topics* tab, click *Create topic*, and follow the guided steps to define the topic details. Click *Next* to complete each step and click *Finish* to complete the setup.
303
+
304
+
. In the {product-long-kafka} {service-url-kafka}[web console^], select *Kafka Instances* and then click the name of the Kafka instance that you want to add a topic to.
305
+
. Select the *Topics* tab.
306
+
. Click *Create topic* and follow the guided steps to define the topic details, as shown in the figure.
315
307
+
316
308
--
317
309
[.screencapture]
318
310
.Guided steps to define topic details
319
311
image::sak-create-topic.png[Image of wizard to create a topic]
320
312
313
+
You must specify the following topic properties:
314
+
321
315
* *Topic name*: Enter a unique topic name, such as `my-first-kafka-topic`.
322
-
* *Partitions*: Set the number of partitions for this topic. This example sets the partition to `1` for a single partition. Partitions are distinct lists of messages within a topic and enable parts of a topic to be distributed over multiple brokers in the cluster. A topic can contain one or more partitions, enabling producer and consumer loads to be scaled.
316
+
* *Partitions*: Set the number of partitions for this topic. This example sets the partitions value to `1`. Partitions are distinct lists of messages within a topic and enable parts of a topic to be distributed over multiple brokers in the cluster. A topic can contain one or more partitions, enabling producer and consumer loads to be scaled.
323
317
* *Message retention*: Set the message retention time and size to the relevant value and increment. This example sets the retention time to `A week` and the retention size to `Unlimited`. Message retention time is the amount of time that messages are retained in a topic before they are deleted or compacted, depending on the cleanup policy. Retention size is the maximum total size of all log segments in a partition before they are deleted or compacted.
324
-
* *Replicas*: Replicas are copies of partitions in a topic. For this release of {product-kafka}, the replicas are preconfigured. For a standard Kafka instance, the number of partition replicas for the topic is set to `3` and the minimum number of follower replicas that must be in sync with a partition leader is set to `2`. For a trial Kafka instance, the number of replicas and the minimum in-sync replica factor are both set to a fixed value of `1`. Partition replicas are distributed over multiple brokers in the cluster to ensure topic availability if a broker fails. When a follower replica is in sync with a partition leader, the follower replica can become the new partition leader if needed.
318
+
* *Replicas*: Replicas are copies of partitions in a topic. For this release of {product-kafka}, the replica values are preconfigured. For a standard Kafka instance, the number of partition replicas for the topic is set to `3` and the minimum number of follower replicas that must be in sync with a partition leader is set to `2`. For a trial Kafka instance, the number of replicas and the minimum in-sync replica factor are both set to `1`. Partition replicas are distributed over multiple brokers in the cluster to ensure topic availability if a broker fails. When a follower replica is in sync with a partition leader, the follower replica can become the new partition leader if needed.
325
319
326
-
After you complete the topic setup, the new Kafka topic is listed in the topics table. You can now start producing and consuming messages to and from this topic using services that you connect to this instance.
320
+
After you complete the topic setup, the new topic is listed on the *Topics* page. You can now start producing and consuming messages to and from this topic using applications that you connect to the Kafka instance.
327
321
328
322
ifndef::community[]
329
323
NOTE: If you try to create a topic with a number of partitions that would cause the partition limit of the Kafka instance to be exceeded, you see an error message indicating this. For more information about partition limits for Kafka instances, see https://access.redhat.com/articles/5979061[{product-long-kafka} service limits].
330
324
endif::[]
331
325
332
326
NOTE: If the topic creation is unsuccessful and you see a `400 Bad Request` error message, try to create your topic again later. This situation might occur, for example, if your selected cloud provider has a temporary availability problem that affects your Kafka instance.
333
-
334
327
--
335
-
. In the topics table, on the right side of the Kafka topic, use the options icon (three vertical dots) to edit or delete the topic as needed.
328
+
329
+
. (Optional) To edit or delete the topic, click the options icon (three vertical dots) next to the topic name, as shown in the figure.
336
330
+
337
331
[.screencapture]
338
332
.Edit or delete Kafka topic
339
333
image::sak-edit-topic.png[Image of topic options to edit or delete]
340
334
341
335
.Verification
342
336
ifdef::qs[]
343
-
* Is the new Kafka topic listed in the topics table?
337
+
* Is the new Kafka topic listed on the *Topics* page?
344
338
endif::[]
345
339
ifndef::qs[]
346
-
* Verify that the new Kafka topic is listed in the topics table.
340
+
* Verify that the new Kafka topic is listed on the *Topics* page.
347
341
endif::[]
348
342
349
343
[role="_additional-resources"]
@@ -366,4 +360,4 @@ You can use either Kafkacat or the Kafka scripts to check that you can connect w
0 commit comments