Installation
Brokerium is one server (brokerium-server: API, dashboard, operations engine) with a
PostgreSQL database, plus an optional agent (brokerium-agent) on Kafka hosts you want
Brokerium to manage at the node level.
This guide installs the Community edition. Brokerium Enterprise installs the same way from its own image and binaries and needs a license key; see Editions and license keys.
Server
Section titled “Server”Kubernetes with Helm
Section titled “Kubernetes with Helm”helm repo add brokerium https://charts.brokerium.kaufenhelm install brokerium brokerium/brokerium -n brokerium --create-namespacekubectl -n brokerium get secret brokerium -o jsonpath='{.data.admin-password}' | base64 -dkubectl -n brokerium port-forward svc/brokerium 8080:8080The chart is also published as oci://ghcr.io/brokerium/charts/brokerium. Upgrade with
helm repo update and helm upgrade brokerium brokerium/brokerium -n brokerium.
Values worth setting (see the chart README and values.yaml):
| Value | Purpose |
|---|---|
postgresql.enabled | Bundled single PostgreSQL for evaluations (default). Set false and database.url for a managed database. |
secretKey, existingSecret | The key that seals stored cluster credentials. Generated on install and kept on upgrades; back up the Secret. |
gateway.* | Gateway API routes: an HTTPRoute for the dashboard with HTTPS at the gateway and a TLSRoute in passthrough mode for agents. Needs Gateway API 1.5 and Kubernetes 1.31 or later. |
loadBalancer.* | A LoadBalancer service with the dashboard port, the agent port or both, and a host name for external-dns. |
publicURL, agents.endpoint | The dashboard URL and the address agents dial. Derived from gateway.* or loadBalancer.hostname when empty. |
agents.insecure.* | Plaintext listener (port 8444) and install command for agents behind a TLS-terminating proxy. |
agents.kafkaMirror | A mirror of the Kafka releases that agents try before the Apache mirrors (details). |
rbac.strimzi | ClusterRole for managing Strimzi clusters in the same Kubernetes cluster with the pod’s service account. |
edition, license.* | enterprise runs Brokerium Enterprise; license.existingSecret or license.key passes its license key. See Editions and license keys. |
The agent port (8443) uses mutual TLS with the server’s own CA, so a proxy in front of it must pass TLS through instead of terminating it; a proxy that terminates TLS needs the insecure agent transport. A dashboard with an HTTPS Gateway and agents on virtual machines:
gateway: create: true className: eg annotations: cert-manager.io/cluster-issuer: letsencrypt http: enabled: true hostname: brokerium.example.com agents: enabled: true hostname: agents.brokerium.example.comChart 0.2 removed the Ingress: use gateway.http, or an Ingress of your own in front of the
brokerium service. service.type and service.grpcType became loadBalancer.*.
The chart runs one replica with the Recreate strategy: the operations engine must not run
twice.
Docker
Section titled “Docker”docker run -d --name brokerium -p 8080:8080 -p 8443:8443 \ -v brokerium-data:/var/lib/brokerium \ -e BROKERIUM_ADMIN_PASSWORD=change-me \ bvaliev/brokerium-server:0.3.2Keep /var/lib/brokerium on a volume or set BROKERIUM_SECRET_KEY: the server refuses to
start when the database was sealed with another key.
Images are published to Docker Hub as bvaliev/brokerium-server and bvaliev/brokerium-agent
for linux/amd64 and linux/arm64, and Brokerium Enterprise as
bvaliev/brokerium-server-enterprise with the same tags. To build them from source, run
make images VERSION=0.3.2 (add EDITION=enterprise for the Enterprise server image).
Docker clusters
Section titled “Docker clusters”The Docker installation can also create Kafka clusters as containers next to the server, for
evaluations and labs: Add cluster → Create a cluster in Docker (see
Docker lab clusters). Put the server and its database on the
Docker network brokerium-lab and give the server the Docker socket:
docker network create brokerium-labdocker run -d --name brokerium-db --network brokerium-lab -v brokerium-db:/var/lib/postgresql \ -e POSTGRES_USER=brokerium -e POSTGRES_PASSWORD=brokerium -e POSTGRES_DB=brokerium postgres:18-alpinedocker run -d --name brokerium --network brokerium-lab -p 8080:8080 -p 8443:8443 \ -v brokerium-data:/var/lib/brokerium \ -v /var/run/docker.sock:/var/run/docker.sock --group-add "$(stat -c %g /var/run/docker.sock)" \ -e BROKERIUM_ADMIN_PASSWORD=change-me \ -e BROKERIUM_DATABASE_URL='postgres://brokerium:brokerium@brokerium-db:5432/brokerium?sslmode=disable' \ -e BROKERIUM_DOCKER_AGENT_ENDPOINT=brokerium:8443 \ bvaliev/brokerium-server:0.3.2- The server runs as the non-root user 65532, so it needs the group of the socket. On Linux that
is the group of
/var/run/docker.sockon the host, usuallydocker, whose idstat -c %gprints. On Docker Desktop (macOS and Windows) the socket appears in containers asroot:rootwith mode 0660: use--group-add 0. - Nodes are containers on
brokerium-lab, and the server reaches them by their container names. Their agents connect to the server atBROKERIUM_DOCKER_AGENT_ENDPOINT, here the server containerbrokeriumon the same network. BROKERIUM_AGENT_ENDPOINTstays the address that agents on other hosts dial, and it goes into the join commands of the Nodes page. To manage such hosts too, set it to a name of the Docker host they can reach, for example-e BROKERIUM_AGENT_ENDPOINT=docker-host.example.com:8443(the command publishes port 8443). The hosts of both endpoints are always in the certificate of the agent gateway.- The first cluster pulls the lab node image
bvaliev/brokerium-agent:<version>-lab. Clients on the Docker host reach the brokers atlocalhost:<port base + broker id>; the plan of the cluster shows the port base. - The Docker socket gives control over the Docker host: whoever may create clusters in Brokerium can start containers there. Keep this setup for evaluations and labs.
BROKERIUM_DOCKER_PROVIDER decides whether the server offers Docker clusters; the default auto
offers them only in this setup. GET /api/v1/server reports whether it does and, if not, why.
Binary
Section titled “Binary”Release assets contain brokerium-server-<os>-<arch> with the dashboard built in, and
brokerium-server-enterprise-<os>-<arch> for Brokerium Enterprise.
Licenses and notices
Section titled “Licenses and notices”THIRD_PARTY_NOTICES lists the third-party software in Brokerium, the Go modules of the binaries
and the npm packages of the dashboard, with their versions, licenses and license texts; NOTICE
reproduces their notice files. Both come with LICENSE (and LICENSE-enterprise for Brokerium
Enterprise) in /licenses of every image and as assets of every release, covered by
SHA256SUMS. The dashboard shows the same files on the Licenses page, linked at the bottom of
the sidebar. The lab node image of Docker clusters also keeps the LICENSE, NOTICE and
licenses/ of Apache Kafka in /opt/kafka.
Configuration
Section titled “Configuration”| Variable | Default | Meaning |
|---|---|---|
BROKERIUM_DATABASE_URL | lab database | PostgreSQL connection string. |
BROKERIUM_SECRET_KEY | generated into the data dir | 32 bytes, base64; seals credentials. |
BROKERIUM_DATA_DIR | .data/server (/var/lib/brokerium in the image) | Holds the generated secret key. |
BROKERIUM_ADMIN_USERNAME, BROKERIUM_ADMIN_PASSWORD | admin, none | First administrator, created when there are no users. |
BROKERIUM_HTTP_ADDR, BROKERIUM_GRPC_ADDR | :8080, :8443 | Dashboard and API; agent gateway. |
BROKERIUM_PUBLIC_URL | http://localhost:8080 | Used in links and agent install commands. |
BROKERIUM_AGENT_ENDPOINT | host.docker.internal:8443 | Address agents on hosts dial; it goes into the join commands of the Nodes page. |
BROKERIUM_AGENT_SERVER_NAMES | localhost,host.docker.internal,brokerium,brokerium-server | Names in the gateway certificate; the hosts of BROKERIUM_AGENT_ENDPOINT and BROKERIUM_DOCKER_AGENT_ENDPOINT are always added. |
BROKERIUM_AGENT_PROXY, BROKERIUM_AGENT_NO_PROXY | none | HTTPS_PROXY and NO_PROXY in the agent install command. |
BROKERIUM_AGENT_INSECURE_ADDR | none | Plaintext listener of the insecure agent transport for a proxy that terminates TLS, for example :8444 (details). |
BROKERIUM_AGENT_TRANSPORT | mtls | Transport of the agent install command: mtls, or insecure with the listener and the endpoint below. |
BROKERIUM_AGENT_INSECURE_ENDPOINT | none | host:port agents of the insecure transport dial, usually the proxy. |
BROKERIUM_AGENT_INSECURE_TLS | system | How those agents connect to the proxy: system (TLS verified against the system CAs), skip-verify or none (plaintext). |
BROKERIUM_AGENT_CERT_LIFETIME | 8760h (one year) | Lifetime of agent certificates and the gateway certificate; they are renewed after two thirds of it. At least 1m. |
BROKERIUM_KAFKA_MIRROR | none | Base URL of a mirror of the Kafka releases that agents try before the Apache mirrors, for example https://artifacts.example.com/kafka (details). |
BROKERIUM_SECURE_COOKIES | false | Set true behind HTTPS. |
BROKERIUM_SNAPSHOT_INTERVAL | 15s | How often clusters are polled. |
BROKERIUM_DOCKER_PROVIDER | auto | Docker clusters: auto offers them only in the Docker installation (a Docker container outside Kubernetes that reaches the Docker API), on always (development with the server on the Docker host), off never. The Helm chart sets off. |
BROKERIUM_DOCKER_HOST, BROKERIUM_LAB_NETWORK, BROKERIUM_AGENT_IMAGE | unix:///var/run/docker.sock, brokerium-lab, the lab node image of the release | Docker API, network and node image of Docker clusters. |
BROKERIUM_DOCKER_AGENT_ENDPOINT | BROKERIUM_AGENT_ENDPOINT | Address the agents in the nodes of Docker clusters dial, brokerium:8443 in the Docker installation. |
BROKERIUM_DEBUG | 0 | 1 logs every API request. |
BROKERIUM_LICENSE | none | License key of Brokerium Enterprise; takes precedence over a key added on the License page. The Community edition ignores it. |
BROKERIUM_LICENSE_FILE | none | File that contains the license key, for example a mounted Secret; used when BROKERIUM_LICENSE is empty. |
Agents on virtual machines and bare metal
Section titled “Agents on virtual machines and bare metal”Agents let Brokerium create clusters, add, replace and remove brokers and controllers, restart and upgrade nodes. They connect out to the server (no inbound port on the host), authenticate with a one-time join token and then with a client certificate from the server’s own CA (or, behind a TLS-terminating proxy, with signed messages), and execute only typed commands (install a Kafka release with its SHA-512 checked, write the configuration, format storage, start, stop, report status).
-
In the dashboard open Nodes, create a join token and copy the command:
Terminal window curl -fsSL https://brokerium.example.com/api/v1/agent/install.sh | \sudo BROKERIUM_AGENT_SERVER=brokerium.example.com:8443 BROKERIUM_AGENT_TOKEN=brk1.… shA token can be used once, on any host. It may name the node and reserve it for a cluster; without a name the node is named after the host name the agent reports, with
-2,-3and so on when that name is taken. -
The script installs
/usr/local/bin/brokerium-agent, writes/etc/brokerium-agent.env(mode 0600) and startsbrokerium-agent.service, which runs as thebrokerium-agentaccount, not as root. Kafka itself runs asbrokerium-kafka.serviceunder thekafkaaccount, so restarting or upgrading the agent never stops Kafka. Hosts need systemd, sudo, Java 17 or later andcurl. -
The host appears on the Nodes page. When you create a cluster or add a node, you choose the hosts that run Kafka (agent clusters); the names of the hosts do not matter.
Every node has an advertised host: the address the listeners of its Kafka node advertise,
which clients, the other nodes and the server connect to. It starts as the host name the agent
reports, so that name must resolve in DNS, or you set another name or an IP address. A host whose
reported name is neither a DNS name nor an IP address, for example one with an underscore, can
run Kafka once you set its advertised host. Each node also has a rack, the broker.rack of a
broker on it unless the operation sets another one. Change the name, the advertised host and the
rack on the Nodes page or with the API (role operator; an empty advertisedHost goes back to
the reported host name):
curl -X PATCH https://brokerium.example.com/api/v1/nodes/<node id> \ -H "Authorization: Bearer $TOKEN" -H 'X-Brokerium-Request: 1' -H 'Content-Type: application/json' \ -d '{"advertisedHost": "kafka-17.example.com", "rack": "rack-a"}'A new advertised host of a node that runs Kafka takes effect when the node is configured again, by a rolling restart or a rolling upgrade, which also records the new bootstrap servers of the cluster.
To install a host again, for example after a new operating system or when the agent certificate
expired, create a join token for its node ({"nodeId": "<node id>"} in
POST /api/v1/join-tokens) and run its command: the agent enrolls as the same node, with its
name, advertised host and role, and Kafka is not touched.
Installer variables: BROKERIUM_AGENT_VERSION (release tag), BROKERIUM_AGENT_URL (download
from your own mirror) with BROKERIUM_AGENT_SHA256 (its expected checksum),
BROKERIUM_AGENT_KAFKA_DATA_DIR (the Kafka data directory, below), and
BROKERIUM_AGENT_TRANSPORT, BROKERIUM_AGENT_TLS and BROKERIUM_AGENT_CA_FILE for
agents behind a TLS-terminating proxy. Binaries from
GitHub releases are always checked against the SHA256SUMS of the release.
BROKERIUM_AGENT_KAFKA_DATA_DIR is the directory where Kafka stores its data, by default
/var/lib/kafka/data: an absolute path of letters, digits and ._/@:+-. The script creates it
and lets the agent write to it. The agent reports it, and Brokerium configures it as log.dirs
of the Kafka node on the host, so Kafka writes where the agent formats storage, measures the disk
and wipes data. Choose it before the host runs Kafka: when it changes later, the node is
configured with the new, empty directory at its next restart and does not start. Agents before
0.3.2 do not report the directory, so their nodes get /var/lib/kafka/data; adopted nodes keep
the log.dirs of their own server.properties.
What the installer sets up
Section titled “What the installer sets up”| Account or path | Owner and mode | Purpose |
|---|---|---|
kafka | system account without login | Runs Kafka. |
brokerium-agent | system account without login, member of kafka | Runs the agent. |
/var/lib/brokerium-agent | brokerium-agent, 0711 | Agent state: identity, client certificate and key (0600), server.properties, kafka.env. Kafka writes its logs to logs/. |
/opt/brokerium/kafka | brokerium-agent:kafka, 0755 | Kafka releases the agent installed; current points at the active one. |
/var/lib/kafka/data (BROKERIUM_AGENT_KAFKA_DATA_DIR) | kafka:kafka, 2770 | Kafka data, the log.dirs of the node. New files belong to the kafka group, through which the agent formats and wipes storage. |
brokerium-kafka.service | root | User=kafka, UMask=0007, heap options from kafka.env, starts the release behind current. SuccessExitStatus=143: Kafka exits with 143 after a controlled shutdown, so a stopped node is inactive, not failed. Not enabled: after a host reboot the agent starts it when Kafka was running before, and a node stopped from Brokerium stays stopped. |
brokerium-agent.service | root | User=brokerium-agent, SupplementaryGroups=kafka, ProtectSystem=full, ProtectHome=yes, PrivateTmp=yes. Restart=always with RestartPreventExitStatus=6: an agent whose node was deleted stays stopped. |
/etc/sudoers.d/brokerium-agent | root, 0440 | The sudo rule below. |
The agent controls Kafka through one sudo rule (the path of systemctl is the one on the
host):
Defaults:brokerium-agent !requirettybrokerium-agent ALL=(root) NOPASSWD: /usr/bin/systemctl start brokerium-kafka.service, /usr/bin/systemctl stop brokerium-kafka.service, /usr/bin/systemctl restart brokerium-kafka.serviceThe script checks the rule with visudo and sudo -l before it relies on it. It stops
without changing the agent when sudo is not installed, when visudo rejects the rule or when
/etc/sudoers does not include /etc/sudoers.d. sudo cannot gain root when the no new
privileges flag is set, so the agent unit keeps NoNewPrivileges=no and avoids options that
imply it, such as SystemCallFilter=, RestrictNamespaces= or PrivateDevices=.
Hosts with an agent running as root
Section titled “Hosts with an agent running as root”Agents installed by earlier versions of the script run as root and write the Kafka unit themselves. Run the install command from the Nodes page on such a host again; the agent keeps its identity, so the new join token stays unused. The script:
- stops the agent and gives its state and the Kafka releases to
brokerium-agent; - lets the
kafkaaccount open its data and log files to thekafkagroup; - points
/opt/brokerium/kafka/currentat the release Kafka runs, writes the unit and the sudo rule above and starts the agent under its own account.
Kafka keeps running from the unit the root agent wrote until it restarts; should systemd restart it, it starts the same release. Run a rolling restart afterwards to move Kafka to the new unit. Directories Kafka creates before that restart stay closed to the group: run the install command once more after the restart, so that the agent can wipe them.
Agents behind an HTTP proxy
Section titled “Agents behind an HTTP proxy”When hosts reach the server only through an HTTP proxy, pass HTTPS_PROXY (and NO_PROXY
for names that go direct) after sudo, which drops the variables of the caller:
HTTPS_PROXY=http://proxy.example.com:3128 curl -fsSL https://brokerium.example.com/api/v1/agent/install.sh | \ sudo HTTPS_PROXY=http://proxy.example.com:3128 NO_PROXY=localhost,.internal \ BROKERIUM_AGENT_SERVER=brokerium.example.com:8443 BROKERIUM_AGENT_TOKEN=brk1.… shThe script downloads through the proxy and writes both variables to /etc/brokerium-agent.env,
so the agent and its Kafka downloads use it too. With BROKERIUM_AGENT_PROXY and
BROKERIUM_AGENT_NO_PROXY on the server (Helm: agents.proxy.https and
agents.proxy.noProxy) the command on the Nodes page contains them already.
The agent opens an HTTP CONNECT tunnel, so mutual TLS stays end to end. The proxy has to:
- allow CONNECT to the port of the agent gateway (Squid allows only 443 by default: add the port
to
SSL_ports, or publish the gateway on 443 withloadBalancerorgateway.agents.port); - leave that connection uninspected (for Squid with SSL bump,
spliceit); - resolve the name of the server; the agent does not resolve it itself.
Proxy URLs use http://, optionally with Basic credentials (http://user:password@proxy:3128).
A proxy that terminates TLS for the agent gateway needs the
insecure agent transport instead.
Agents behind a TLS-terminating proxy
Section titled “Agents behind a TLS-terminating proxy”Some networks let agents reach the server only through a reverse proxy that terminates TLS, such as OpenResty or nginx. The proxy shows its own certificate and keeps the client certificate of the agent, so mutual TLS cannot work. The insecure agent transport (ADR 0017) authenticates every message instead of the connection: the server signs its commands with the key of its CA, which the join token pins, and the agent authenticates everything it sends with a secret that it received encrypted at enrollment. The join token itself never crosses the proxy.
-
Start the server with the plaintext listener and let the install command offer the transport:
Terminal window BROKERIUM_AGENT_INSECURE_ADDR=:8444BROKERIUM_AGENT_TRANSPORT=insecureBROKERIUM_AGENT_INSECURE_ENDPOINT=agents.example.com:443With Helm, set
agents.insecure.enabled=trueandagents.insecure.endpoint; the chart adds the service portgrpc-insecure(8444). -
Point the proxy at port 8444 of the server, for example with OpenResty or nginx 1.25.1 or later:
server {listen 443 ssl;http2 on;server_name agents.example.com;ssl_certificate /etc/nginx/tls/agents.example.com.crt;ssl_certificate_key /etc/nginx/tls/agents.example.com.key;location / {grpc_pass grpc://brokerium.internal:8444;grpc_read_timeout 1h;grpc_send_timeout 1h;client_body_timeout 1h;}}The command stream stays open as long as the agent runs; with these timeouts the proxy ends an idle stream after an hour at the earliest, and the agent reconnects at once.
-
Create a join token on the Nodes page and run its command on the host:
Terminal window curl -fsSL https://brokerium.example.com/api/v1/agent/install.sh | \sudo BROKERIUM_AGENT_TRANSPORT=insecure BROKERIUM_AGENT_TLS=system \BROKERIUM_AGENT_SERVER=agents.example.com:443 BROKERIUM_AGENT_TOKEN=brk1.… sh
BROKERIUM_AGENT_TLS (server: BROKERIUM_AGENT_INSECURE_TLS) sets how the agent connects to
the proxy: system verifies the certificate of the proxy against the system CAs and
BROKERIUM_AGENT_CA_FILE (a PEM file, for example with a corporate CA, outside /home and
readable by the brokerium-agent account, such as /etc/brokerium-agent-ca.pem), skip-verify accepts
any certificate, and none connects without TLS. None of them affects who can send commands,
which the signatures decide, only who can read them: the proxy and every segment without TLS see
commands, results and status in clear. Keep TLS up to the proxy and the plaintext port 8444 on a
network you trust.
Running the install command again with a new join token for the node (nodeId) switches an agent
between the transports without stopping Kafka; the credentials of the old transport stop working.
A join token without a node would enroll the host as a new node. Agents of the insecure transport
have no certificate to renew, and their secret does not expire: to replace it, enroll the node
again with a new join token for it. HTTPS_PROXY works with this transport too.
Where the proxy can stay out of the TLS connection, keep mutual TLS end to end instead:
-
publish the agent port 8443 with a
LoadBalancerservice (loadBalancer.ports: [grpc]in the chart), announced for example with Cilium BGP or MetalLB; -
pass the TCP connection through the proxy with an nginx
streamblock instead of terminating TLS:stream {server {listen 8443;proxy_pass brokerium.internal:8443;}} -
or route by SNI with TLS passthrough through a Gateway (
gateway.agentsin the chart).
Kafka releases from an internal mirror
Section titled “Kafka releases from an internal mirror”Agents download a Kafka release when Brokerium creates a node on the host or upgrades it to a
release the host does not have yet, from dlcdn.apache.org, downloads.apache.org and
archive.apache.org in this order. Set BROKERIUM_KAFKA_MIRROR (Helm: agents.kafkaMirror) to
the base URL of a mirror, and the server sends it with every install command: agents try the
mirror first and the Apache mirrors after it.
The mirror has the layout of the Apache mirrors: the archive of release <version> is
<mirror>/<version>/kafka_2.13-<version>.tgz. With
BROKERIUM_KAFKA_MIRROR=https://artifacts.example.com/kafka, Kafka 4.4.0 comes from
https://artifacts.example.com/kafka/4.4.0/kafka_2.13-4.4.0.tgz. A copy of
https://downloads.apache.org/kafka/ works, and so does a repository in Artifactory or Nexus
that proxies it. The server refuses to start unless the URL uses http or https and has no
query or fragment.
Checksums keep coming from Apache: the agent checks every archive against
https://downloads.apache.org/kafka/<version>/kafka_2.13-<version>.tgz.sha512, or the same file
on archive.apache.org for older releases, never against a checksum from the mirror or the
server. Hosts therefore still need HTTPS access to one of these two hosts, directly or through
HTTPS_PROXY; the checksum files are small. An archive with another checksum fails the step.
When the mirror answers with an error or sends no data for a minute, the agent moves on to the
Apache mirrors.
Adopting running nodes
Section titled “Adopting running nodes”Set BROKERIUM_AGENT_KAFKA_CONFIG to the node’s server.properties and
BROKERIUM_AGENT_PREINSTALLED to its Kafka directory. The agent then never rewrites that
configuration and never formats storage; the server binds the node to the cluster from its
meta.properties (node id, role). Restarts and upgrades work; reconfiguration stays with
you. A node with process.roles=broker,controller becomes a
combined node. The agent reads that server.properties
and the meta.properties of the first log directory as brokerium-agent, so both must be
readable for the kafka group or for everyone.
Remove an agent
Section titled “Remove an agent”Delete the node on the Nodes page, or with DELETE /api/v1/nodes/<node id> (role operator).
Brokerium refuses a node that runs a broker or a controller of a cluster, whether its agent is
connected or not: decommission it first (Decommission or Replace on the Brokers tab,
Remove voter on the Controllers tab), which stops Kafka on the host and releases the node. A
combined node is deleted once it left its cluster (combined nodes).
Deleting the node ends the session of its agent. The agent logs that its node was deleted and
exits with status 6, which its unit lists in RestartPreventExitStatus: systemd does not start it
again and shows brokerium-agent.service as failed with status=6/NOTCONFIGURED. Every other
failure, such as a lost connection or a server restart, still makes the agent connect again. Agents
of the insecure transport stop only on an answer signed
by the server. Kafka on the host is left as it is.
The dashboard then shows the command that removes the agent from the host:
curl -fsSL https://brokerium.example.com/api/v1/agent/uninstall.sh | sudo sh -s -- --stop-kafkaThe script removes brokerium-agent.service, /usr/local/bin/brokerium-agent, the sudo rule,
/etc/brokerium-agent.env, /var/lib/brokerium-agent (the identity of the agent and the
configuration and logs of Kafka) and the brokerium-agent account; the kafka account stays. It
prints what it removed, and running it again removes what is left.
| Option | Effect |
|---|---|
--stop-kafka | Stops brokerium-kafka.service when it runs. Kafka runs from the configuration in the agent state, so without this option the script changes nothing while Kafka runs. The unit of Kafka is removed with the agent. |
--remove-kafka | Removes the Kafka releases in /opt/brokerium/kafka. |
--delete-data | Deletes the Kafka data directory, BROKERIUM_AGENT_KAFKA_DATA_DIR of /etc/brokerium-agent.env (default /var/lib/kafka/data). Once that file is gone, pass the directory after sudo: sudo BROKERIUM_AGENT_KAFKA_DATA_DIR=/data/kafka sh -s -- --delete-data. |
Agents before 0.3.2 keep connecting after their node was deleted, and units written by earlier install scripts restart a newer agent every five seconds; the uninstall script removes both.
Source: docs/guide/install.md at v0.3.2.
Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.