Giter Site home page Giter Site logo

advancedsei / zookeeper-k8s-openshift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from engapa/zookeeper-k8s-openshift

0.0 1.0 0.0 84 KB

Zookeeper deployments on kubernetes and Openshift

Home Page: https://github.com/engapa/zookeeper-k8s-openshift

Dockerfile 10.83% Makefile 18.16% Shell 71.01%

zookeeper-k8s-openshift's Introduction

Zookeeper Docker Image

Build status License status Docker Pulls Docker Layering Docker image version OSS

The aim of this project is provide optimised zookeeper docker images to run into 'statefulsets' on kubernetes.

These are the main scripts used to build/run the docker image/container:

  • zk_env.sh: Export needed env variable for other scripts.
  • zk_download.sh: is used to download the suitable release of zookeeper (version ZOO_VERSION).
  • zk_setup.sh: Configure zookeeper dynamically, based on utils-docker project.
  • zk_status.sh: health checks.

Build and push the docker image

Set env variables DOCKER_ORG (defaults to engapa), DOCKER_IMAGE (defaults to zookeeper) and ZOO_VERSION (the real zookeeper version that will be downloaded into the docker image) to tag docker image as you wish and then build, test and push:

$ make docker-build docker-test docker-push

Run a container

By default the container entrypoint is ./zk_env.sh and the command directive is zk_setup.sh && ./zkServer.sh start-foreground.

Let's run a zookeeper container with default environment variables:

$ docker run -it --name zk engapa/zookeeper:${ZOO_VERSION}

Setting up

Users may configure parameters in config files just adding environment variables with specific name patterns.

This table collects the patterns of variable names which will are written in the suitable file:

PREFIX FILE (${ZOO_HOME}/config) Example
ZK_ zoo.cfg ZK_maxClientCnxns=0 --> maxClientCnxns=0
LOG4J_ log4j.properties LOG4J_zookeeper_root_logger=INFO, CONSOLE--> zookeeper.root.logger=INFO, CONSOLE
JAVA_ZK_ java.env JAVA_ZK_JVMFLAG="-Xmx1G -Xms1G" --> JVMFLAG="-Xmx1G -Xms1G"

So we can configure our zookeeper server by adding environments variables:

$ docker run -it -d --name zk -e "SETUP_DEBUG=true" -e "LOG4J_zookeeper_root_logger=DEBUG, CONSOLE" engapa/zookeeper:${ZOO_VERSION}

NOTE: We've passed a SETUP_DEBUG environment variable with value 'true' to view the setup process of config files. . Show logs by command docker logs ZK

Also you may use --env-file option to load these variables from a file.

And, of course, you could provide your own properties files directly by option -v and don't use zk_setup.sh script.

k8s

In k8s directory there are some resources for Kubernetes.

Thanks to kubernetes team for the contrib.

Openshift

In openshift directory you can find some Openshift templates.

License

License status

Author

Enrique Garcia [email protected]

zookeeper-k8s-openshift's People

Contributors

engapa avatar

Watchers

 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.