diff --git a/cassandra/4.1.4/22.03-lts-sp3/Dockerfile b/cassandra/4.1.4/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..dd73eea138d87785a9670d4f1baeec4ee75fecfc --- /dev/null +++ b/cassandra/4.1.4/22.03-lts-sp3/Dockerfile @@ -0,0 +1,22 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} + +ARG TARGETARCH +ARG VERSION=4.1.4 + +RUN yum -y install java && \ + yum clean all + +RUN groupadd --system --gid 1000 cassandra && \ + useradd --system --gid cassandra --uid 1000 cassandra + +RUN curl -o /tmp/cassandra-${VERSION}.tar.gz https://dlcdn.apache.org/cassandra/${VERSION}/apache-cassandra-${VERSION}-bin.tar.gz && \ + tar -zxvf /tmp/cassandra-${VERSION}.tar.gz -C /tmp && \ + cd /tmp/apache-cassandra-${VERSION}/bin && \ + rm -rf /tmp/cassandra-${VERSION}.tar.gz + +EXPOSE 7000 7001 7199 9042 9160 + +WORKDIR /tmp/apache-cassandra-${VERSION}/bin + +CMD ["./cassandra", "-f", "-R"] diff --git a/cassandra/README.md b/cassandra/README.md new file mode 100644 index 0000000000000000000000000000000000000000..908d1ed0aa01bf0087203fc075ae4be5ccb2ee8e --- /dev/null +++ b/cassandra/README.md @@ -0,0 +1,31 @@ +# cassandra + +# Quick reference + +- The official cassandra docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/CloudNative) + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/CloudNative), [openEuler](https://gitee.com/openeuler/community) + +# Build reference + +1. Build images and push: +```shell +docker buildx build -t "openeuler/cassandra:$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 cassandra openeuler/cassandra:{TAG} +``` + +# Supported tags and respective Dockerfile links + +- 4.1.4-22.03-lts-sp3: cassandra v4.1.4, openEuler 22.03-LTS-SP3 + +## Operating System +Linux/Unix, ARM64 or x86-64 architecture. \ No newline at end of file diff --git a/cassandra/doc/image-info.yml b/cassandra/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..7cab7bfd8eb755eda41626eede0e3be9484d8a56 --- /dev/null +++ b/cassandra/doc/image-info.yml @@ -0,0 +1,92 @@ +name: cassandra +category: database +description: cassandra是一套开源的分布式NoSQL数据库系统。它基于Amazon Dynamo的分布式设计和Google BigTable的数据模型,是一个网络社交云计算方面理想的数据库。 +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/cassandra:latest + ``` + +install: | + 启动容器 + ``` + docker run --name cassandra -d openeuler/cassandra:latest + ``` + 用户可根据自身需求,自定义启动选项。 + +license: Apache-2.0 license +similar_packages: + - Redis: 一个使用 ANSI C 编写的开源、支持网络、基于内存、分布式、可选持久性的键值对存储数据库。 + - Apache Ignite: 一个内存中的数据网格系统,可以提供分布式缓存和计算。 + - Aerospike: 一个高性能的 NoSQL 数据库系统,可以提供高可用性和可扩展性。 + - Couchbase: 一个分布式 NoSQL 数据库系统,可以提供高可用性和高扩展性,同时还提供了 Memcached 兼容接口。 + - Tarantool: 一个内存中的 NoSQL 数据库系统,可以提供高性能和高可用性,同时还提供了 Lua 脚本支持。 +dependency: + - gcc + - make + - libevent-devel + \ No newline at end of file diff --git a/cassandra/doc/picture/cassandra.png b/cassandra/doc/picture/cassandra.png new file mode 100644 index 0000000000000000000000000000000000000000..1616b3d52258c522b6f400ec001939e9138fad75 Binary files /dev/null and b/cassandra/doc/picture/cassandra.png differ