Zookeeper K8s

Channel Revision Published Runs on
latest/stable 10 09 Mar 2022
Ubuntu 20.04
latest/beta 8 08 Jun 2021
Ubuntu 20.04
latest/edge 21 12 Apr 2023
Ubuntu 22.04
3/stable 51 27 Feb 2024
Ubuntu 22.04
3/candidate 51 27 Feb 2024
Ubuntu 22.04
3/beta 51 27 Feb 2024
Ubuntu 22.04
3/edge 56 24 Apr 2024
Ubuntu 22.04
juju deploy zookeeper-k8s --channel latest/beta
Show information

Platform:

GitHub

This Juju Charmed Operator is implemented using the Charmed Operator Framework, designed to deploy a standard OCI (e.g. Docker) ZooKeeper image alongside a sidecar container containing the Juju operator logic.

A non-sidecar version of this charm is also available on the Charmhub.

Developing

Create and activate a virtualenv with the development requirements:

$ git clone https://github.com/openstack-charmers/charm-zookeeper-k8s
$ cd charm-zookeeper-k8s/
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements-dev.txt

Testing

The Python operator framework includes a very nice harness for testing operator behaviour without full deployment. Just run_tests:

$ ./run_tests

Deploying from source

$ charmcraft pack
$ juju deploy ./zookeeper-k8s.charm -n 3 --resource zookeeper-image=zookeeper

Where:

  • -n: the number of Juju units to deploy, i.e. the number of wanted k8s pods. Any number >= 1 is supported but for production you should pick an odd number >= 3.
  • zookeeper-image: OCI (e.g. Docker) ZooKeeper image. Use zookeeper for the latest image from DockerHub.