diff --git a/Database/image-list.yml b/Database/image-list.yml index e74c7e866af475936409e838bd6a70144c60c4da..e163fb726dd87e4354c66cdbadd6cecb6f5c1380 100644 --- a/Database/image-list.yml +++ b/Database/image-list.yml @@ -15,4 +15,5 @@ images: etcd: etcd mariadb: mariadb tidb: tidb - neo4j: neo4j \ No newline at end of file + neo4j: neo4j + oceanbase: oceanbase \ No newline at end of file diff --git a/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile b/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cba510b46c7db0adbb66d26d64fb87945c795f85 --- /dev/null +++ b/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile @@ -0,0 +1,20 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM $BASE + +ARG VERSION=4.3.5_CE_BP2_HF1 +ARG TARGETARCH +ARG OCEANBASE=/opt/oceanbase.tar.gz + +COPY download.sh / +RUN yum install -y findutils && \ + ln -s /usr/bin/python3 /usr/bin/python && \ + yum clean all && \ + sh /download.sh ${VERSION/CE_/} ${TARGETARCH} ${OCEANBASE} && \ + mkdir -p /opt/oceanbase/ && \ + tar -zxf $OCEANBASE -C /opt/oceanbase/ --strip-components=1 && \ + cd /opt/oceanbase/bin && \ + sh install.sh && \ + source ~/.oceanbase-all-in-one/bin/env.sh && \ + rm -rf ${OCEANBASE} /opt/oceanbase + +CMD ["obd", "--version"] \ No newline at end of file diff --git a/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/download.sh b/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/download.sh new file mode 100644 index 0000000000000000000000000000000000000000..77f5ea5ae15f23abff906a5e4a5b15e6f3e21424 --- /dev/null +++ b/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/download.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +#VERSION="4.3.5_bp2_hf1" +VERSION=${1,,} +TARGETARCH=$2 +OUTPUTDIR=$3 +ARCH="" +if [ "$TARGETARCH" = "amd64" ]; then + ARCH="x86_64"; +elif [ "$TARGETARCH" = "arm64" ]; then + ARCH="aarch64"; +fi; +BASE_URL="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/8/${ARCH}" +for day in {0..60}; do + DATE=$(date -d "today - $day days" +"%Y%m%d") + URL="${BASE_URL}/oceanbase-all-in-one-${VERSION}_${DATE}.el8.${ARCH}.tar.gz" + if curl --output /dev/null --silent --head --fail "$URL"; then + echo "[INFO] 正在下载文件: ${URL}" + curl -fSL -o $OUTPUTDIR ${URL} + exit 0 + fi +done +echo "[ERROR] 无法获取下载链接,请手动检查!" >&2 +exit 1 \ No newline at end of file diff --git a/Database/oceanbase/README.md b/Database/oceanbase/README.md new file mode 100644 index 0000000000000000000000000000000000000000..585b65a1cdfa6035d35a98f62af4038ea94a33a5 --- /dev/null +++ b/Database/oceanbase/README.md @@ -0,0 +1,60 @@ +# Quick reference + +- The official oceanbase 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). + +# oceanbase | openEuler +Current oceanbase docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +OceanBase is an open-source, distributed HTAP database management system. + +Learn more on [oceanbase website](https://www.oceanbase.com/). + +# Supported tags and respective Dockerfile links +The tag of each oceanbase docker image is consist of the version of oceanbase and the version of basic image. The details are as follows +| Tags | Currently | Architectures| +|------|-----------|---------------| +|[4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile)| oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +Here, users can select `{Tag}` based on their requirements. + +- Pull the `openeuler/oceanbase` image from docker + + ```bash + docker pull openeuler/oceanbase:{Tag} + ``` + +- Start a oceanbase instance + + ```bash + docker run -it --name my-oceanbase -p 2881:2881 openeuler/oceanbase:{Tag} bash + ``` + When `my-oceanbase` started, you can config and run your tasks + ``` + [root@6559d851ae46 /]# obd --help + Usage: obd [options] + Available commands: + + binlog binlog service tools + cluster Deploy and manage a cluster. + demo Quickly start + display-trace display trace_id log. + host Host tools + license Register and display license. + mirror Manage a component repository for OBD. + obdiag Oceanbase Diagnostic Tool + pwd Obd cluster password management. + repo Manage local repository for OBD. + test Run test for a running deployment. + tool Tools + update Update OBD. + web Start obd deploy application as web. + ... + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Database/oceanbase/doc/image-info.yml b/Database/oceanbase/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..bf085f752cad834fe6ce6ba29c7a981a48e375f9 --- /dev/null +++ b/Database/oceanbase/doc/image-info.yml @@ -0,0 +1,57 @@ +name: oceanbase +category: database +description: oceanbase是一种开源关系型数据库管理系统。与其他关系型数据库一样,oceanbase将数OceanBase 数据库是一款完全自研的企业级原生分布式数据库,在普通硬件上实现金融级高可用,首创“三地五中心”城市级故障自动无损容灾新标准,刷新 TPC-C 标准测试,单集群规模超过 1500 节点,具有云原生、强一致性、高度兼容 Oracle/MySQL 等特性。据存储在由行和列组成的表中。用户可以使用结构化查询语言(通常称为SQL)定义、操作、控制和查询数据。oceanbase凭借其经过验证的性能、可靠性和易用性成为基于Web的应用程序的领先数据库选择,涵盖从个人项目和网站,到电子商务和信息服务,一直到高端应用程序的整个范围。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + oceanbase镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tags | Currently | Architectures| + |------|-----------|---------------| + |[4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile)| oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/oceanbase:{Tag} + ``` +usage: | + - 启动容器 + ``` + docker run -it --name my-oceanbase -p 2881:2881 openeuler/oceanbase:{Tag} bash + ``` + + 用户可根据自身需求选择对应版本的{Tag}、容器启动的选项。`my-oceanbase`启动之后,用户根据个人需求完成oceanbase的配置和部署 + ``` + [root@6559d851ae46 /]# obd --help + Usage: obd [options] + Available commands: + + binlog binlog service tools + cluster Deploy and manage a cluster. + demo Quickly start + display-trace display trace_id log. + host Host tools + license Register and display license. + mirror Manage a component repository for OBD. + obdiag Oceanbase Diagnostic Tool + pwd Obd cluster password management. + repo Manage local repository for OBD. + test Run test for a running deployment. + tool Tools + update Update OBD. + web Start obd deploy application as web. + ... + ``` + +license: View license +similar_packages: + - PostgreSQL: PostgreSQL是一个功能强大的开源关系型数据库管理系统,它提供了与oceanbase类似的功能,并且支持广泛的标准SQL语法。PostgreSQL具有高度的可扩展性、可靠性和数据一致性,同时还提供了许多高级功能,如复杂查询、事务控制和触发器等。 + - Oracle Database: Oracle Database是一款商业的关系型数据库管理系统,它是市场上最受欢迎和广泛使用的数据库之一。Oracle Database提供了丰富的功能集,包括高级查询、分布式数据库、数据复制和高可用性选项等。 + - Microsoft SQL Server: Microsoft SQL Server是由Microsoft开发的关系型数据库管理系统。它提供了与oceanbase类似的功能,同时还与Microsoft的其他产品和技术集成紧密。Microsoft SQL Server适用于Windows操作系统,并提供了高性能、可伸缩性和企业级功能。 + - SQLite: SQLite是一种嵌入式关系型数据库管理系统,它提供了轻量级的、零配置的数据库解决方案。SQLite具有小巧、高效、可嵌入的特点,适用于嵌入式设备和移动应用程序。 +dependency: + - N/A \ No newline at end of file diff --git a/Database/oceanbase/doc/picture/logo.png b/Database/oceanbase/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5d4cee2fef4b89cf468b9b9d9ff59ce92ab90605 Binary files /dev/null and b/Database/oceanbase/doc/picture/logo.png differ diff --git a/Database/oceanbase/meta.yml b/Database/oceanbase/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..2b0f8c602d3052ac33da1b179c081df60bd42f50 --- /dev/null +++ b/Database/oceanbase/meta.yml @@ -0,0 +1,2 @@ +4.3.5_CE_BP2_HF1-oe2403sp1: + path: 4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile \ No newline at end of file