CloudKarafka

Get started with Lenses. Set it up with Docker and connect to a Cloud Karafka managed Kafka with the standard configuration.

1. Get your Lenses access key

Sign up with Lenses and download your access key.

2. Sign up for Cloud Karafka and create a Kafka

Cloud Karafka is a fully managed Apache Kafka streaming platform, deployable in the cloud of your choice.

Start by signing up for a Cloud Karafka account . Follow the in-product instructions to launch Kafka clusters within the Cloud Karafka user interface.

Cloud Karafka

Then, gather the connection points of your cluster.

Gather 1 connection point

  1. Kafka endpoint. Go to Details > Using SASL/SCRAM.
Kafka endpoint

3. Get Docker

You will use docker-compose to spin up Lenses.

Start by signing up with Docker . Then install docker-compose .

Install Docker

4. Setup Lenses docker-compose

Use this docker-compose.yml file to spin up Lenses and connect to your Cloud Karafka Kafka.

Just 2 steps:

  1. Fill in the connection details:
    1. Kafka endpoint
  2. Share the authentication files with your docker. Copy these files in the same directory as your docker-compose.yml file and reference them:
    1. Your Lenses license key license.json The file:
version: '3'
services:
  lenses:
    image: lensesio/lenses
    environment:
      # Admin user credentials
      LENSES_SECURITY_USER: admin
      LENSES_SECURITY_PASSWORD: admin
      LENSES_PORT: 80
      
      # === Set your values in this section ===
            
      # ===Step 1=== Put your Cloud Karafka Kafka 'Node Addresses' here, port 9092
      # e.g. 
      # LENSES_KAFKA_BROKERS: 'SASL_SSL://large-road-train-01.srvs.cloudkafka.com:9094,SASL_SSL://large-road-train-02.srvs.cloudkafka.com:9094,SASL_SSL://large-road-train-03.srvs.cloudkafka.com:9094'
      # Kafka Endpoint
      LENSES_KAFKA_BROKERS: 'SASL_SSL://[KAFKA_HOST_1]:[PORT_1],SASL_SSL://[KAFKA_HOST_2]:[PORT_2],…'
      # Cloud Karafka SASL configuration
      LENSES_KAFKA_SETTINGS_CLIENT_SECURITY_PROTOCOL: SASL_PLAINTEXT
      LENSES_KAFKA_SETTINGS_CLIENT_SASL_MECHANISM: SCRAM-SHA-256
  
      # ===Step 2=== Put the Kafka username and password here for the Kafka Client to access Cloud Karafka Kafka
      FILECONTENT_JAAS: |
        KafkaClient {
          org.apache.kafka.common.security.scram.ScramLoginModule required
          username="[INSTA_USERNAME]"
          password="[INSTA_PASSWORD]"
          serviceName=kafka;
        };

    ports:
      - 80:80
    volumes:
      # ===Step 3=== Share your authentication files here
      # Map the Lenses license key file here to activate Lenses
      - ./license.json:/license.json

5. Start Lenses up

docker-compose up

6. Login

User:     admin
Password: admin

7. Eureka!

Lenses Dashboard

8. Next steps

Learn the basics.

Limitations

With Cloud Karafka, these endpoints are only available in specific configurations:

  • Kafka metrics via JMX, only with VPC peering.
  • Schema Registry
  • Kafka Connect

Without this endpoints these Lenses features are not available: