Skip to content

Latest commit

 

History

History
87 lines (60 loc) · 3.96 KB

README.md

File metadata and controls

87 lines (60 loc) · 3.96 KB

image

Confluent Cloud CLI

Overview

You can use Confluent Cloud CLI to interact with your Confluent Cloud cluster.

start.sh is a fully scripted demo that shows users how to interact with Confluent Cloud, stepping through the following workflow using the CLI, and it takes about 8 minutes to complete:

  • Create a new environment and specify it as the default
  • Create a new Kafka cluster and specify it as the default
  • Create a user key/secret pair and specify it as the default
  • Produce and consume with Confluent Cloud CLI
  • Create a service account key/secret pair
  • Run a Java producer: before and after ACLs
  • Run a Java producer: showcase a Prefix ACL
  • Run Connect and kafka-connect-datagen connector with permissions
  • Run a Java consumer: showcase a Wildcard ACL
  • Delete the API key, service account, Kafka topics, Kafka cluster, environment, and the log files

Run the demo

DISCLAIMER

This example uses real resources in Confluent Cloud, and it creates and deletes topics, service accounts, API keys, and ACLs.

Pre-requisites

  • Access to a Confluent Cloud cluster
  • Local install of Confluent Cloud CLI v1.7.0 or later
  • Confluent Cloud user credentials saved in ~/.netrc (save with command ccloud login --save)
  • Docker and Docker Compose for the local Connect worker
  • timeout installed on your host
  • mvn installed on your host
  • jq installed on your host

Confluent Cloud Promo Code

The first 20 users to sign up for Confluent Cloud and use promo code C50INTEG will receive an additional $50 free usage (details).

Run demo

./start.sh

Advanced demo usage

The demo script provides variables allowing you to alter the default Kafka cluster name, cloud provider, and region. For example:

CLUSTER_NAME=my-demo-cluster CLUSTER_CLOUD=aws CLUSTER_REGION=us-west-2 ./start.sh

Here are the variables and their default values:

Variable Default
CLUSTER_NAME demo-kafka-cluster
CLUSTER_CLOUD aws
CLUSTER_REGION us-west-2

Clean up after the demo

If a demo run ended prematurely, it may not have totally cleaned up after itself and a new run may error out with the following message:

# Create and specify active environment
ccloud environment create demo-script-env
Error: 1 error occurred:
	* error creating account: Account name is already in use


Failed to create environment demo-script-env. Please troubleshoot and run again

You may need to manually delete API keys and ACLs created in a previous demo run. But you could consider running the following script to delete the demo's topics, Kafka cluster, and environment.

./cleanup.sh

Additional Resources