Deploy¶
This is the part of the Apache ZooKeeper charm tutorial about deployment and configuration. Make sure to complete instruction from the Setup page before reading further.
Deploy the charm¶
Apache ZooKeeper charm can be deployed as any other charm via juju deploy
command:
juju deploy zookeeper -n 5
Note
See also: juju deploy
command reference.
This will deploy five units of Apache ZooKeeper charm.
Check the status of the deployment:
juju status --watch 1s
Wait until all units have active
and idle
status.
Note
See command reference: juju status
Scale the cluster¶
Warning
Apache ZooKeeper requires an odd number of nodes for quorum. Make sure to deploy a sufficient number of units. See explanation.
You can add or remove units of the Apache ZooKeeper application by using juju add-unit
or juju remove-unit
commands. For example, to reduce the number of units for the Apache ZooKeeper application deployed earlier, let’s remove two units:
juju remove-unit zookeeper/4 zookeeper/3
Note
See also: juju scale-application, juju add-unit, juju remove-unit.
Configure Apache ZooKeeper¶
Change the Apache ZooKeeper cluster configuration options by using the juju config
command, for example:
To configure these settings, use the following command:
juju config zookeeper tick-time=2000
The tick-time
option sets the basic time unit in milliseconds used by Apache ZooKeeper for heartbeats.
Next step¶
After finishing the deployment and configuration, continue to the deploy page of the tutorial.