This page describe an overview of deploying Lenses against your Kafka clusters.
The quick start is for local development, with a local Kafka. This guide takes you through manually deploying HQ and an Agent to connect to your Kafka clusters.
For more detailed guides on the Helm, Docker and Linux see here.
To deploy Lenses against your environments you need to:
To start HQ and an Agent you have to accept the Lenses EULA.
For HQ, in the config.yaml set:
Any version of Apache Kafka (2.0 or newer) on-premise and on-cloud. Supported providers include:
Confluent Platform & Cloud
AWS MSK & AWS MSK Serverless
Aiven
IBM Event Streams
Azure HDInsight & EventHubs
Any version of Confluent Schema Registry (5.5.0 or newer), APICurio (2.0 or newer) and AWS Glue.
Only needed if you want to bring your own Postgres. The docker compose will start a local Postgres instance.
HQ and Agents can share the same instance, by either using a separate database or schema for HQ and each agent, depending on your networking needs.
Postgres server running version 9.6 or higher.
The recommended configuration is to create a dedicated login role and database for the HQ and each Agent, setting the HQ or Agent role as the database or schema owner. Both the agent and HQ need credentials, create a role for each.
Web sockets - You may need to adjust your load balancer to allow them. See here.
JMX connectivity - Connectivity to JMX is optional (not required) but recommended for additional/enhanced monitoring of the Kafka Brokers and Connect Workers. Secure JMX connections are also supported, as well as JOLOKIA and Open Metrics (MSK).
For more enable JMX for Agent itself see here.
These ACLs are for the underlying Lenses Agent Kafka client. Lenses has its own set of permissions guarding access.
You can restrict the access of the Lenses Kafka client but this can reduce the functionality on offer in Lenses, e.g. not allow Lenses to create topic at all, even though this can be managed by Lenses own IAM system.
The agent requires access to your Kafka cluster. If ACLs are enable you will need to allow the Agent access.
If you want to use SSO / SAML for authentication you will need the metadata.xml file from your provider. See Authentication for more information.
This page describes configuring and starting Lenses HQ and Agent against your Kafka cluster.
This guide is using the Lenses docker compose file. For non dev installations and automation see the Installation section.
HQ is configured via by one file, config.yaml. The docker compose files loads the content of hq.config.yaml and mounts it as the HQ config.yaml file.
You only need to follow this step if you do not want to use the local postgres instance started by the docker compose file.
You must create a database and role in your postgres instance for HQ to use. See Database Role.
Edit the docker-compose.yaml and add the set the credentials for your database in the hq.config.yaml section.
Currently HQ supports:
Basic Authentication (default)
SAML
For this example we will use basic authentication, for information on configuring other methods, see Authentication and configure the hq.config.yaml key accordingly for SAML.
To start HQ, run the following docker command:
You can now log in your browser with admin/admin.
To create an environment in HQ:
Login into HQ and create an environment, Environments->New Environment.
At the end of the process, you will be shown an Agent Key. Copy that, keep it safe!
The environment will be disconnected until the Agent is up and configured with the key.
You can also manage environments using the CLI.
The Agent is configured via two files:
lenses.conf - holds low-level configuration options for the agent and the database connection. You can set this via the agent.lenses.conf in the docker-compose file
provisioning.yaml - holds the connection details to your Kafka cluster and supporting systems. can set this via the agent.provisioning.yaml key in the docker-compose file.
You only need to follow this step if you do not want to use the local postgres instance started by the docker compose file.
You must create a database and role in your postgres instance for the Agent to use. See Database Role.
Update the docker-compose file agent.lenses.conf key for your Postgres instance.
The Agent Key for an environment needs to be added to the agent.provisioning.yaml key in the docker compose file.
Replace ${{LENSESHQ_AGENT_KEY}} with the Agent Key for the environment that you want to link to.
For more information on the configuration of the connection to HQ see here.
By default, the agent is configured to connect to Kafka on localhost. To change this update the agent.provisioning.yaml key. The information required here depends on how you want the Agent to authenticate against Kafka.
See provisioning for examples of different authentication types for Kafka.
Add the following for a basic plaintext connection to a Kafka broker, if you are using a different authentication mechanism adjust accordingly.
Remove, or adjust the Kafka (kafka-demo), Schema Registry and Connect services in the default docker-compose file.
Replace [YOUR_BOOTSTRAP_BROKER:PORT] with the bootstrap brokers and ports for the Kafka cluster you want the Agent to connect to.
For examples of adding in other services such as Schema Registries and Kafka Connect see provisioning.
To start Agent, run the following docker command:
For none dev environments, install the agent as close as possible to your Kafka clusters and automate the installation.
Once the agent fully starts, it will report as connected in HQ, allowing you to explore your Kafka environments.
Connect Lenses to your environment.