How to deploy Apache ZooKeeper K8s charm¶
Note
For machine cloud environment (e.g., EC2), see the Apache ZooKeeper K8s charm documentation instead.
Ensure you have a Juju environment set up and running, including:
Juju cloud
Juju controller
Juju client
For guidance on how to set up Juju environment, see Juju tutorial or a shorter Give it a try section of the README file.
Set up a model¶
To deploy a charm you need to use a Juju model. Create a new or use an existing Juju model on a Juju controller.
Create a new model¶
To add a new Juju model, run:
juju add-model <model>
Use an existing model¶
To see all available models, run:
juju models
Then, select one of the models to use:
juju switch <model-name>
Deploy the charm¶
Deploy the Apache ZooKeeper K8s charm:
juju deploy zookeeper-k8s -n <units> --trust
Where 3
or 5
).
Note
See also: High availability and quorum explanation.
Check the status of the deployment:
juju status
The deployment should be complete once all the units show active
or idle
status.
Configure the charm¶
View existing configuration options:
juju config zookeeper-k8s
Change or add configuration options:
juju config zookeeper-k8s <key>=<value>
Note
See also: juju config
command reference.
Integrate with other charms¶
To utilise Apache ZooKeeper K8s charm, use the juju integrate
command (see reference) to relate/integrate it with other charms. For example, to deploy Apache Kafka K8s charm and integrate with it:
juju deploy kafka-k8s --channel 3/stable -n <kafka-units> --trust
juju integrate kafka-k8s zookeeper-k8s
Make sure to wait until the status of all units becomes active
and idle
.