There are several labs that use Kafka and we will need to create a connection to access the Kafka cluster when using Smart connectors, Toolkit flows, and Event Endpoint apis. You will need to save the details from this section to be used in varies labs.
NOTE: You should do this from the VDI since you will need to run varies commands so best to have the cert files saved to the VDI
1. Use the URL to the CP4I cluster that was provided to you from the instructor. Select the Enterprise LDAP.
2. When prompted use the username and password provided to you for this lab. In this example, we are using chopper1.
3. You will now be on your home page and in the upper left it will show your login name. Under Event Streaming click on the es-demo link to take you to the Event Streams Home page.
4. Now we will select the Connect to this Cluster tile.
5. Now we will see the Cluster connection screen. Make sure you select External and then click the Generate SCRAM credentials.
6. You will need to enter the following details.
Option | Value |
---|---|
Credential name | For the credentials name use your userid/username/unique identifier |
What do you want your application to do? | Produce messages, consume messages and create topics and schemas |
Which topics does the application need to access? | All topics |
Which consumer group does the application need to access? | All consumer group |
Choose which transactional IDs the application can access | All transactional IDs |
6b. For the credentials name use your userid/username/unique identifier. Make sure the Produce messages, consume messages and create topics and schemas button is selected and then click Next.
7. On the next screen select the All Topics. Click Next.
8. On the next screen select the All consumer group. Click Next.
9. Select the All transactional IDs. Click Generate credentials.
10. Now that we have the credentials generated use the icon to copy them and save them for use later in other labs.
c. Save the SCRAM password
11. Save the es-cert.pem, this will be used to connect to the Event Stream Cluster.
12. We will also download the PKCS12 certificate and save the PKCS12 password. This will be used to connect to the Event Stream Cluster when using the toolkit flows.
13. Due to the version of Java in ACE we will need to convert the PKCS12 to a JKS. We will do this by running the following command.
keytool -importkeystore -srckeystore es-cert.p12 -srcstoretype PKCS12 -destkeystore es-cert.jks -deststoretype JKS -srcstorepass XXXXXXX -deststorepass XXXXXX -noprompt
We will first open a terminal window. Next cd to the Downloads directory. If you do a ls es-cert* command you should see the es-demo.p12 cert you just download. The only thing you need to change in this example is replace the XXXXXX with the password you saved for the PKCS12 cert. Once done do a list again and you will now see the es-cert.jks file.
We should now have the following saved for use in the Kafka labs.
You should have a text file saved on the device with this info and the cert files will be in your Downloads directory.