diff --git a/zookeeper/3.8.3/22.03-lts-sp3/Dockerfile b/zookeeper/3.8.3/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..359cceb800f30767656f90989d90023e48340663 --- /dev/null +++ b/zookeeper/3.8.3/22.03-lts-sp3/Dockerfile @@ -0,0 +1,19 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} + +ARG TARGETARCH +ARG VERSION=3.8.3 + +RUN yum -y install java && \ + yum clean all + +RUN curl -o /tmp/zookeeper.tar.gz https://archive.apache.org/dist/zookeeper/zookeeper-${VERSION}/apache-zookeeper-${VERSION}-bin.tar.gz && \ + tar -zxvf /tmp/zookeeper.tar.gz -C /tmp && \ + cd /tmp/apache-zookeeper-${VERSION}-bin/conf && \ + touch zoo.cfg && echo -e 'tickTime=2000\ndataDir=/var/lib/zookeeper\nclientPort=2181\nadmin.serverPort=8081' > zoo.cfg + +WORKDIR /tmp/apache-zookeeper-${VERSION}-bin/ + +EXPOSE 2181 + +CMD ["bin/zkServer.sh", "start-foreground"] \ No newline at end of file diff --git a/zookeeper/README.md b/zookeeper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4fee6de9d45c7281c3531e89fba94e84e2507049 --- /dev/null +++ b/zookeeper/README.md @@ -0,0 +1,31 @@ +# ZooKeeper + +# Quick reference + +- The official ZooKeeper docker image. + +- Maintained by: [openEuler BigData SIG](https://gitee.com/openeuler/bigdata) + +- Where to get help: [openEuler BigData SIG](https://gitee.com/openeuler/bigdata), [openEuler](https://gitee.com/openeuler/community) + +# Build reference + +1. Build images and push: +```shell +docker buildx build -t "openeuler/zookeeper:$VERSION" --platform linux/amd64,linux/arm64 . --push +``` + +We are using `buildx` in here to generate multi-arch images, see more in [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +# How to use this image + +```shell +docker run --name zookeeper --restart always -p 2181:2181 -d openeuler/zookeeper:{TAG} +``` + +# Supported tags and respective Dockerfile links + +- 3.8.3-22.03-lts-sp3: zookeeper v3.8.3, openEuler 22.03-LTS-SP3 + +## Operating System +Linux/Unix, ARM64 or x86-64 architecture. \ No newline at end of file diff --git a/zookeeper/doc/image-info.yml b/zookeeper/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..9adce5a64abc74abfd7792328074240ca9068424 --- /dev/null +++ b/zookeeper/doc/image-info.yml @@ -0,0 +1,87 @@ +name: zookeeper +category: cloud +description: zookeeper一个功能强大、易于使用的分布式协调服务,为分布式应用提供了可靠的协调功能,使得应用能够在分布式环境中高效、稳定地运行。 +environment: " + 本应用以容器镜像的方式供用户使用,运行于预置docker的Linux环境。Docker的推荐安装方式如下: + ## apt安装 + ### 1.更新系统软件包依赖 + ``` + sudo spt update + sudo apt install ca-certificates curl gnupg lsb-release + ``` + ### 2.添加Docker官方GPG密钥 + ``` + sudo mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + ``` + ### 3.添加Docker官方APT源 + ``` + echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + ``` + ### 4.再次更新软件包索引 + ``` + sudo apt update + ``` + ### 5.安装Docker + ``` + sudo apt install docker-ce docker-ce-cli containerd.io + ``` + + ## yum安装 + ### 1.安装yum-utils + ``` + sudo yum install -y yum-utils + ``` + ### 2.添加Docker源 + ``` + sudo yum-config-manager \ + > --add-repo \ + > https://download.docker.com/linux/centos/docker-ce.repo + ``` + ### 3.安装Docker + ``` + sudo yum install -y docker-ce docker-ce-cli containerd.io + ``` + + 注意,在openEuler环境安装docker时,可执行如下命令一键安装 + ``` + yum install -y docker + ``` + + ## 脚本安装 + ### 1.下载安装脚本 + ``` + curl -fsSL https://get.docker.com -o get-docker.sh + ``` + ### 2.使用root权限执行脚本 + ``` + sudo sh get-docker.sh + ``` + 使用脚本安装方式时,如果用户要指定安装的docker版本,需要自行修改`get-docker.sh`的源码内容。 + + ## 验证 + ``` + sudo docker run hello-world + ``` + " +download: " + 获取容器镜像 + ``` + docker pull openeuler/zookeeper:latest + ``` + " +install: " + 启动容器 + ``` + docker run --name zookeeper -d openeuler/zookeeper:latest + ``` + 用户可根据自身需求,自定义启动选项。 + " +license: Apache-2.0 license +similar_packages: + - etcd: 一个开源的、分布式的键值存储系统,用于共享配置和服务发现。 + - Apache Curator: 一个Java库,用于简化与ZooKeeper的交互。 + - Consul: 一个服务发现和配置管理工具。它提供了类似于ZooKeeper的功能,包括服务注册与发现、健康检查、键值存储和分布式锁等。 +dependency: + - java \ No newline at end of file diff --git a/zookeeper/doc/picture/zookeeper.gif b/zookeeper/doc/picture/zookeeper.gif new file mode 100644 index 0000000000000000000000000000000000000000..4e8014f8fe700062767139a1f27d47f79c75dded Binary files /dev/null and b/zookeeper/doc/picture/zookeeper.gif differ