GithubHelp home page GithubHelp logo

isabella232 / layer-apache-zookeeper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juju-solutions/layer-apache-zookeeper

0.0 0.0 0.0 54 KB

The Apache Zookeeper charm layer (superseded by the Apache Bigtop Zookeeper charm: https://github.com/apache/bigtop/tree/master/bigtop-packages/src/charm/zookeeper/layer-zookeeper)

License: Apache License 2.0

Shell 2.05% Python 97.95%

layer-apache-zookeeper's Introduction

NOTICE

The Apache Zookeeper charm has been superseded by the Zookeeper charm from Apache Bigtop:

https://github.com/apache/bigtop/tree/master/bigtop-packages/src/charm/zookeeper/layer-zookeeper

This layer-apache-zookeeper repository does not receive regular updates, and is only here as a reference for legacy deployments.

Overview

Apache ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services such as naming, configuration management, synchronization, and group services in a simple interface so you don't have to write them from scratch. You can use it off-the-shelf to implement consensus, group management, leader election, and presence protocols.

Usage

Deploy a Zookeeper unit. With only one unit, the service will be running in standalone mode:

juju deploy apache-zookeeper zookeeper

Scaling

Running ZooKeeper in standalone mode is convenient for evaluation, some development, and testing. But in production, you should run ZooKeeper in replicated mode. A replicated group of servers in the same application is called a quorum, and in replicated mode, all servers in the quorum have copies of the same configuration file.

Scaling Zookeeper to create a quorum is trivial. The following will add two additional Zookeeper units and will automatically configure them with knowledge of the other quorum members based on their peer relation to one another:

juju add-unit -n 2 zookeeper

Test the deployment

Test if the Zookeeper service is running by using the zkServer.sh script:

juju run --service=zookeeper '/usr/lib/zookeeper/bin/zkServer.sh status'

A successful deployment will report the service mode as either standalone (if only one Zookeeper unit has been deployed) or leader / follower (if a Zookeeper quorum has been formed).

REST API

Zookeeper REST Api can be enabled/disabled either through an action or via a config variable:

juju action do zookeeper/0 start-rest
juju action do zookeeper/0 stop-rest

or

juju set zookeeper rest=true

Integrate Zookeeper into another charm

  1. Add following lines to your charm's metadata.yaml:

    requires: zookeeper: interface: zookeeper

  2. Add a zookeeper-relation-changed hook to your charm. Example contents:

    from charmhelpers.core.hookenv import relation_get ZK_hostname = relation_get('private-address') ZK_port = relation_get('port')

Contact Information

[email protected]

Help

layer-apache-zookeeper's People

Contributors

andrewdmcleod avatar johnsca avatar ktsakalozos avatar kwmonroe avatar pengale avatar

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.