Skip to main content

Manage Kafka clusters with Salt

Project description

salt-kafka

Kafka tools for Salt

PyPI - Version Gitea Stars

Installation

Can be installed via pip or the Pip version distributed in Salt onedir installs. Salt extensions need to be installed to any salt-minion where they may run.

# Example for Salt onedir
/opt/saltstack/salt/salt-pip install salt-kafka

# Can be installed via Salt commands
salt '*' pip.install salt-kafka

or Via a salt state

salt-minion:
  service.running:
    - enable: true
  # Install any OS requirements
  pkg.installed:
    - aggregate: True
    - pkgs:
        - python3-docker
        - python3-setproctitle
  # Install any pip packages
  pip.installed:
    - pkgs:
        - salt-kafka

Engine

kafka_consumer can be used to map Kafka topics to a Salt topic to be used in automation.

# From Salt Master config

engines:
  - kafka_consumer:
      broker: kafka.example.com:9094
      subscribe:
        # Format is <kafka-topic> / <salt-topic>
        push-repo: kafka/repo
        push-package: kafka/container

States

# Example minion config
kafka.bootstrap.servers: "kafka.example.com:9094"
# Example kafka.sls
my-topic:
    kafka.present:
        - config:
              cleanup.policy: delete
              retention.ms: {{salt['kafka.timedelta_ms']('2d')}}
              retention.bytes: {{ "1GB" | human_to_bytes }}

missing-topic:
    kafka.absent: []

See the Upstream Kafka documentation at http://kafka.apache.org/documentation.html#topicconfigs for valid config options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salt_kafka-0.2.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

salt_kafka-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file salt_kafka-0.2.0.tar.gz.

File metadata

  • Download URL: salt_kafka-0.2.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for salt_kafka-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e554528b455309e2cd68cfed22c63553fae142ac712fa6ee99feca9ccc50eef7
MD5 3f2d013eaf16064b6834891441e8cf2d
BLAKE2b-256 c4b34ecd42bafc0f94f08659306ae1c1234c01fdcbed06de481565cb6508e3e4

See more details on using hashes here.

File details

Details for the file salt_kafka-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: salt_kafka-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for salt_kafka-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc596c19080eb458918458c780629105bed772663f6bd6253f7e6da34273d7bb
MD5 6ba6e128b0447c8fb160c3c4a034fab2
BLAKE2b-256 7d36cd371b69093350ddeeb6faea4a3de45043964659bf17515504b5e093deb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page