Get Started Free
course: Schema Registry 101

Hands On: Establish Client Connectivity to Confluent Cloud

2 min
Danica Fine

Danica Fine

Senior Developer Advocate (Presenter)

In this exercise you will set up the environment needed to complete the course exercises. The first step is to clone the GitHub repository.

  1. Open a web browser and go to https://github.com/confluentinc/learn-kafka-courses.
  2. Locate the Code button on the right and click it.

sr101-m2-03

  1. Navigate to the copy icon on the right side of the pop-up to copy the URL of the repo and click it.
  2. Open a terminal window on your computer.
  3. Run a git clone command with the URL to the repo you just copied to the clipboard.
  4. After the clone command completes, cd into the learn-kafka-courses/schema-registry directory.

You now have the code needed for the course exercises locally on your computer. Next, you need to set up a Kafka cluster on Confluent Cloud.

  1. In your web browser, open https://confluent.io/confluent-cloud and log in using the credentials you established in the Confluent Cloud sign-up exercise that preceded this exercise.

Note: If you did not complete the previous exercise, do so now before proceeding to the next step.

  1. Once you are logged into Confluent Cloud, navigate to the default environment and click + Create cluster on my own.

Note: If one or more clusters already exist in the environment, click + Add cluster.

sr101-m2-01

  1. In the tile for the Basic cluster type, click the Begin configuration button.

sr101-m1-02

  1. Choose the cloud provider for your cluster and click on the Continue button.

sr101-m1-03

Now you will see your configuration and cost settings for your cluster.

  1. Set the name for your cluster to schema-registry-101.
  2. To start your cluster, click the Launch cluster button.

Next, you need to enable Schema Registry for your Confluent Cloud environment. To do so, enable the Streams Governance Essentials Package. Note that these steps may not be required if Schema Registry was previously enabled for the environment that you will be using to complete the course exercises. Schema Registry only needs to be enabled once for any Confluent Cloud environment.

  1. Hover your mouse over Schema Registry and click Streams Governance package.
  2. Click Begin configuration for the Essentials package.

sr101-m2-02

You also need to enable ksqlDB for your Confluent Cloud cluster. Let’s do this now.

  1. On the left side of the UI, click ksqlDB.

sr101-m2-06

  1. Click Create cluster myself.
  2. Select Global access since that is fine for our exercise environment and click Continue.
  3. Assign a cluster name of event-stream-ksqlDB.
  4. Accept all remaining defaults and click Launch cluster.

Proceed to the next step when the ksqlDB cluster provisioning has completed. Provisioning can take several minutes.

Note: The ksqlDB cluster will slowly deplete your promotional credits so you want to complete the environment cleanup steps at the end of the last exercise to limit this impact.

Next, you will create the configuration properties needed to connect to your cluster.

  1. Click Clusters and then click the schema-registry-101 cluster.
  2. Click on the Java tile in the Set up client section.

sr101-m2-04

  1. Create a cluster API key and secret by clicking Create Kafka cluster API key.
  2. Review the key and the secret in the pop-up and click Download and continue.

This will download the key and secret to the local machine Downloads directory.

  1. To create the Schema Registry API key and secret, repeat the process by clicking Create Schema Registry API key.
  2. Review the sample Java client configuration settings. The API keys and secrets should be populated in the properties in the middle of the page. If they are not visible, select the Show API keys option.
  3. Click the Copy button.

Now that you have the required Java client configuration settings, you are ready to update the related client properties file in the schema-registry project.

  1. Return to your terminal window and open the schema-registry project in the text editor or IDE of your choice.
  2. Navigate to the source/main/resources, make a copy of the confluent.properties.orig file, and name the new file confluent.properties.

Note: The GithHub project is configured to ignore this file—you should never commit API keys and secrets.

  1. Open the confluent.properties file and replace the current contents with the Java client configs you copied from Confluent Cloud.

sr101-m2-05

You are now all set up to do the exercises in the course!

Use the promo code SCHEMA101 to get $25 of free Confluent Cloud usage

Be the first to get updates and new content

We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.