Principal Software Practice Lead
Principal Software Practice Lead
As part of this course on Data Engineering, we will be creating pipelines leveraging streaming technologies to perform analytics for a video game. The managed provider we will be using to host these technologies is Confluent Cloud.
This first exercise sets up the resources we will need in future ones. We'll create a Confluent Cloud account and environment, set up a Kafka cluster for our streaming data with an API key for reading and writing to topics, and provision a Flink compute pool to run Flink SQL queries.
This section will guide us through creating a Confluent Cloud account and adding promo codes to help offset the cost of the exercises.
DATAENGINEERING
CONFLUENTDEV1We'll need to clone the GitHub repository that contains all the code and configuration files for the exercises:
Clone it and move into the folder:
git clone https://github.com/confluentinc/learn-data-engineering-exercises.git
cd learn-data-engineering-exercisesThis repository contains code and configuration files that we will use throughout the rest of the course. Ensure you are in this folder when running all the exercise commands.
There is a plugin/quickstart that will make it easier to install all of our resources instead of running the individual commands.
Bring up a command line terminal and install the Confluent CLI. Instructions can be found on the Confluent CLI documentation page. If you are on a Mac, you can install it via brew:
brew install confluentinc/tap/cliTo avoid logging in each time, save your credentials:
confluent login --saveconfluent plugin install confluent-quickstartNow we'll use the quickstart plugin to create all the necessary infrastructure with a single command. This will set up our environment, Kafka cluster, and Flink compute pool.
confluent quickstart \
--environment-name data_engineering \
--kafka-cluster-name exercises \
--cloud aws \
--region us-west-2 \
--create-kafka-key \
--kafka-librdkafka-properties-file ./jr/kafka/config.properties \
--compute-pool-name data_engineering \
--max-cfu 10 \
--create-tableflow-key \
--tableflow-properties-file ./tableflow.propertiesNote: Feel free to alter the region to something more appropriate for your location. However, make sure that if you change it, you use the same settings throughout the course. You can use the CLI to list the currently available AWS regions:
confluent kafka region list --cloud awsThe same command is also available as the create_environment.sh script in the repository. The script uses us-west-2, so if you choose a different region, edit the --region value in the script before running it.
This quickstart creates a new environment, a new Kafka cluster, as well as a Flink compute pool. The Kafka bootstrap server, along with the access and secret keys, are stored in ./jr/kafka/config.properties. The Tableflow API key, secret, catalog endpoint, and region are stored in ./tableflow.properties; we will use them in the Tableflow exercise.
confluent environment list
confluent kafka cluster list
confluent flink compute-pool listThis brings us to the end of the exercise. We now have a fully functioning Kafka and Flink environment.
Make sure to hold on to the environment we created, and keep the Kafka key in a safe place because we will need them for the remaining exercises.
In the next exercise we will populate Kafka with data from our video game.
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.
