From 3941b9c5009b5c65db64eca8db6a48b0e82839c1 Mon Sep 17 00:00:00 2001 From: lihongda Date: Tue, 14 Jul 2020 17:35:05 +0800 Subject: [PATCH] add Docker-container-installation-guide for en and zh --- ...-in-Docker-container-installation-guide.md | 57 +++++++++++++++++++ ...11\350\243\205\346\214\207\345\215\227.md" | 56 ++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 content/en/docs/installation/openGauss-in-Docker-container-installation-guide.md create mode 100644 "content/zh/docs/installation/openGauss\345\256\271\345\231\250\347\211\210\346\234\254\345\256\211\350\243\205\346\214\207\345\215\227.md" diff --git a/content/en/docs/installation/openGauss-in-Docker-container-installation-guide.md b/content/en/docs/installation/openGauss-in-Docker-container-installation-guide.md new file mode 100644 index 000000000..4b0453d98 --- /dev/null +++ b/content/en/docs/installation/openGauss-in-Docker-container-installation-guide.md @@ -0,0 +1,57 @@ +# Opengauss on Docker +Sample Docker build files to facilitate installation, configuration, and environment setup for DevOps users. For more information about openGasuss please see the [opengauss Online Documentation](https://opengauss.org/zh/docs/1.0.0/docs/Quickstart/Quickstart.html). + +## How to build and run +This project offers sample Dockerfiles for: + + * opengauss_1.0.0 + +To assist in building the images, you can use the [buildDockerImage.sh](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage. + +The `buildDockerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. + +### Building opengauss Docker Install Images +**IMPORTANT:** You will have to provide the installation binaries of opengauss and put them into the `dockerfiles/` folder. You only need to provide the binaries you are going to install. The binaries can be downloaded from the [opengauss.org](https://opengauss.org/en/download.html), You also have to make sure to have internet connectivity for yum. Note that you must not uncompress the binaries. The script will handle that for you and fail if you uncompress them manually! + +Before you build the image make sure that you have provided the installation binaries and put them into the right folder. go into the **dockerfiles** folder and run the **buildDockerImage.sh** script: + + [omm@localhost dockerfiles]$ ./buildDockerImage.sh -h + Usage: buildDockerImage.sh -v [version] [-i] [Docker build option] + Builds a Docker Image for opengauss. + + Parameters: + -v: version to build + Choose one of: 1.0.0 SingleInstance + -i: ignores the MD5 checksums + + +### Architecture And Os Version + +x86-64 CentOS7.6 +ARM64 openEuler 20.03 LTS + + +### Start Instance + +```console +$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 opengauss:1.0.0 +``` + +### Connect To The Container Database From Os + +```console +$ docker run −−name opengauss −−privileged=true −d −e GSPASSWORD=secretpassword@123 \ + −p8888:5432 opengauss:1.0.0 gsql -d postgres -U gaussdb -W'secretpassword@123' \ + -h your-host-ip -p8888 +``` + +### Persist Data + +```console +$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 \ + -v /opengauss:/var/lib/opengauss opengauss:1.0.0 +``` + +### Todo +primary standby install + diff --git "a/content/zh/docs/installation/openGauss\345\256\271\345\231\250\347\211\210\346\234\254\345\256\211\350\243\205\346\214\207\345\215\227.md" "b/content/zh/docs/installation/openGauss\345\256\271\345\231\250\347\211\210\346\234\254\345\256\211\350\243\205\346\214\207\345\215\227.md" new file mode 100644 index 000000000..082d515a2 --- /dev/null +++ "b/content/zh/docs/installation/openGauss\345\256\271\345\231\250\347\211\210\346\234\254\345\256\211\350\243\205\346\214\207\345\215\227.md" @@ -0,0 +1,56 @@ +# 在docker上安装openguass +Docker构建文件,方便DevOps用户的安装、配置和环境设置。. 查找更多的信息请看 [opengauss 官方文档](https://opengauss.org/zh/docs/1.0.0/docs/Quickstart/Quickstart.html). + +## 怎么创建和运行 +这个项目提供了简单的 Dockerfiles for: + + * openGauss_1.0.0 + +构建docker镜像, 可以用 [buildDockerImage.sh](dockerfiles/buildDockerImage.sh) 脚本. 下边是说明和帮助. + +`buildDockerImage.sh` 是一个方便以用的shell脚本,提供MD5的检查,对于初学者来说更容易上手. + +### 创建opengauss docker 镜像 +**重要:** 你要提供opengauss二进制安装包,放到 `dockerfiles/` 文件夹. 不需要解压. 二进制包可以从 [opengauss.org](https://opengauss.org/en/download.html)下载, 确保有正确的yum源. 如果你手动解压安装包会导致运行失败! + +在创建镜像前请确保提供了正确的二进制安装包并把他们放到了正确的文件夹 进入 **dockerfiles** 文件夹 运行 **buildDockerImage.sh** 脚本: + + [root@localhost dockerfiles]$ ./buildDockerImage.sh -h + Usage: buildDockerImage.sh -v [version] [-i] [Docker build option] + Builds a Docker Image for openGauss. + + Parameters: + -v: version to build + Choose one of: 1.0.0 SingleInstance + -i: ignores the MD5 checksums + + +### 支持的架构和操作系统版本 + +x86-64 CentOS7.6 +ARM64 openEuler 20.03 LTS + + +### 开启实例 + +```console +$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 opengauss:1.0.0 +``` + +### 从操作系统层面连接数据库 + +```console +$ docker run −−name opengauss −−privileged=true −d −e GSPASSWORD=secretpassword@123 \ + −p8888:5432 opengauss:1.0.0 gsql -d postgres -U gaussdb -W'secretpassword@123' \ + -h your-host-ip -p8888 +``` + +### 数据持久化 + +```console +$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 \ + -v /opengauss:/var/lib/opengauss opengauss:1.0.0 +``` + +### 以后要做的事 +主备安装 -- Gitee