GithubHelp home page GithubHelp logo

kafka-charm's Introduction

kafka-charm

This charm will use deb package from Ubuntu private PPA.

Building

cd src
charm build

Will build the Kafka charm in /tmp/charm-builds/kafka.

Operating

This charm require the private ppa configuration. It relates to zookeeper and scales horizontally by adding units.

juju deploy /tmp/charm-builds/kafka
juju deploy zookeeper
juju relate kafka zookeeper

Notes

The Kafka charm requires at least 4GB of memory.

Details

Much of the charm implementation is borrowed from the Apache kafka charm, but it's been heavily simplified and pared down. Jinja templating is used instead of Puppet, and a few helper functions that were imported from libraries are inlined.


kafka-charm's People

Contributors

narindergupta avatar

Watchers

James Cloos avatar

Forkers

phvalguima

kafka-charm's Issues

hook failed: "certificates-relation-joined" when private ppa is not configured

I deploy the kafka charm but the juju status is error hook failed: "certificates-relation-joined".

The juju log unit-kafka-0.log shows the following:

2021-03-10 13:28:34 DEBUG certificates-relation-joined Traceback (most recent call last):
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/charm/hooks/certificates-relation-joined", line 22, in <module>
2021-03-10 13:28:34 DEBUG certificates-relation-joined     main()
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 74, in main
2021-03-10 13:28:34 DEBUG certificates-relation-joined     bus.dispatch(restricted=restricted_mode)
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
2021-03-10 13:28:34 DEBUG certificates-relation-joined     _invoke(other_handlers)
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
2021-03-10 13:28:34 DEBUG certificates-relation-joined     handler.invoke()
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
2021-03-10 13:28:34 DEBUG certificates-relation-joined     self._action(*args)
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "/var/lib/juju/agents/unit-kafka-0/charm/reactive/tls.py", line 165, in import_ca_crt_to_keystore
2021-03-10 13:28:34 DEBUG certificates-relation-joined     '-storepass', keystore_password(),
2021-03-10 13:28:34 DEBUG certificates-relation-joined   File "lib/charms/layer/kafka.py", line 227, in keystore_password
2021-03-10 13:28:34 DEBUG certificates-relation-joined     os.open(path, os.O_WRONLY | os.O_CREAT, 0o440),
2021-03-10 13:28:34 DEBUG certificates-relation-joined FileNotFoundError: [Errno 2] No such file or directory: '/etc/kafka/keystore.secret'
2021-03-10 13:28:34 ERROR juju.worker.uniter.operation runhook.go:132 hook "certificates-relation-joined" failed: exit status 1

After speaking with Narinder, the problem is that I don't have the PPA necessary to install the Kafka packages.

root@node08ob32:/var/log/juju# apt-cache policy kafka
N: Unable to locate package kafka

Ideally I think the charm should verify if access to the kafka packages is available or should fail during the attempt to install Kafka before giving an error about the certificates-relation-joined hook failure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.