本文基于CentOS 8 的docker来安装OceanBase Cloud Platform。
在安装之前需要准备好OceanBase数据库。

安装docker

使用root运行如下命令,安装docker,启动docker,启动docker,安装网络工具,安装mysql客户端。

yum-config-manager  --add-repo   https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
systemctl enable docker
systemctl start docker
yum install -y net-tools
yum install -y mysql

下载ocp 的docker镜像

此镜像,并未发布到dockerhub上,需要到官方服务器下载

https://obweb-download-center.oss-cn-beijing.aliyuncs.com/ocp-3.1.1-ce.tar.gz?versionId=CAEQGBiBgICFg.G.8BciIGVlMTA2NjBjNDYxMjRlM2Q5MjNiMzRlNjYzZTNkMDE1

创建安装配置

下载完毕后,将该软件包复制到root的目录下,再进行解压

tar xzvf ocp-3.1.1-ce.tar.gz
cd ocp-3.1.1-ce
#创建配置文件ocp.yaml
./ocp_installer.sh genconf -c ocp.yaml

修改配置文件ocp.yaml

vi ocp.yaml

#填写 OCP 宿主机的 IP 地址
OCP_IP_ARRAY=(192.168.240.21)     # (IP1 IP2 IP3)
#安装 OCP 使用的用户,默认为 root
SSH_USER=root    # if not root, make sure remote user can use sudo without password    admin   ALL=(ALL)   NOPASSWD:ALL
SSH_PORT=22
SSH_AUTH=password     # can be password or pubkey
#宿主机 root 用户的密码
SSH_PASSWORD='rootPASSword'     # password for passowrd auth, when use pubkey auth, is passphrase
SSH_KEY_FILE='/root/.ssh/id_rsa.pub'   # pubkey auth
#MetaDB 所在主机。与 部署 OceanBase 数据库 中 mini-single-example.yaml 文件中 servers 的值保持一致。
OCP_METADB_HOST=192.168.240.21
#MetaDB 的端口号,与 部署 OceanBase 数据库 中 mini-single-example.yaml 文件中 mysql_port 的值保持一致。
OCP_METADB_PORT=2881
# 创建租户 时创建的 MetaDB 的用户,为 ocp@ocp_meta
OCP_METADB_USER=root@sys
# 创建租户 时设置的 ocp@ocp_meta 的密码
OCP_METADB_PASSWORD='rootPWD123'   # password may contains special char, make sure correctly quote
#MetaDB 的数据库名
OCP_METADB_DBNAME=ocp
# 创建租户 时创建的 MonitorDB 的用户,为 ocp@ocp_monitor。
OCP_MONITORDB_USER=root@sys
# 创建租户 时设置的 ocp@ocp_monitor 的密码
OCP_MONITORDB_PASSWORD='rootPWD123'    # password may contains special char, make sure correctly quote
#MonitorDB 的数据库名
OCP_MONITORDB_DBNAME=ocp_monitor
OCP_WEB_PORT=8080OCP_LB_VIP=       # HA OCP VIP
OCP_LB_VPORT=     # HA OCP VPORT
#OCP 镜像的路径,请根据 前提条件 中上传镜像的实际位置进行配置
OCP_IMAGE=/root/ocp-3.1.1-ce/ocp.tar.gz  # absoulute path of ocp image file
#这里修改为4
OCP_CPU=4
#这里修改为5
OCP_MEMORY=5G
OCP_LOG_DIR=/data/ocp_logs

执行如下命令安装社区版 OCP

./ocp_installer.sh install -c ocp.yaml

验证 OCP 容器状态

docker stats ocp
docker exec -it ocp bash
pgrep -a java

验证结果

[root@ob00 admin]# pgrep -a java
39 /usr/lib/jvm/java-1.8.0/bin/java -server -XX:+UseG1GC -Xms3584m -Xmx3584m -Xss512k -XX:+PrintCommandLineFlags -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=1024m -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/home/admin/ocp-server/bin/../log/gc.log -XX:+UseGCLogFileRotation -XX:GCLogFileSize=50M -XX:NumberOfGCLogFiles=2 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/admin/ocp-server/bin/../log/ -Dfile.encoding=UTF-8 -jar /home/admin/ocp-server/bin/../lib/ocp-server-3.1.1-20210916.jar

启动正常。

验证 OCP 登录

http://192.168.240.21:8080/login
在显示的登录页面,输入 OCP 的用户名(admin)和密码(root)

验证 OCP 版本

curl --user admin:root http://192.168.240.21:8080/api/v2/info

输出信息

[root@ob00 ocp-3.1.1-ce]# curl --user admin:root http://192.168.240.21:8080/api/v2/info
{"artifact":"ocp-server",
"buildVersion":"3.1.1-20210916",
"buildJavaVersion":"1.8",
"buildTime":"2021-12-30T17:58:15.968+08:00",
"name":"ocp-server",
"springBootVersion":"2.2.5.RELEASE",
"group":"com.oceanbase"}

验证时间

curl 'http://<OCP_HOST>:<OCP_PORT>/api/v2/time'

输出结果

[root@ob00 ocp-3.1.1-ce]# curl  http://192.168.240.21:8080/api/v2/time
"2022-03-17T09:59:35.06+08:00"

【原创】使用Docker试用OceanBase Cloud Platform(OCP)相关推荐

  1. (二)为自动化MLOps设置GitHub、Docker和Google Cloud Platform

    目录 Git存储库 谷歌云平台 Docker 下一步 下载源 - 1.2 MB 在本系列文章中,我们将引导您完成将CI/CD应用于AI任务的过程.您最终会得到满足Google MLOps 成熟度模型2 ...

  2. Google Cloud Platform免费申请试用后结算账号(Billing Account)自动关闭,不能开启的问题

    自动谷歌赠送的300美金有效期延长到12个月后,相信不少人现在都在试用google的cloud platform. 注册账号比较简单,从试用进入就会得到一步步的引导. 问题在于注册成功后,很多人卡在b ...

  3. 如何取消 Google Cloud Platform 试用 关闭 GCP 帐号 删除信用卡 取消订阅

    关闭您的 Google Cloud Platform 帐号 step: 1. 关停(删除)项目 https://console.cloud.google.com/cloud-resource-mana ...

  4. 在Google Cloud platform上创建Kubernetes cluster并使用

    登录Google Cloud platform,创建一个新的Kubernetes Cluster: 该集群的node个数选择为1,从Machine type下拉列表里选择CPU配置: 展开Advanc ...

  5. 在Google Cloud Platform上持续部署Node.js

    by Gautam Arora 由Gautam Arora 在Google Cloud Platform上持续部署Node.js (Continuous Deployment for Node.js ...

  6. SAP Cloud Platform Neo环境的权限管理

    SAP云平台的帮助文档:https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/a1ab5c4cc117455 ...

  7. SAP Cloud Platform Identity Authentication service

    subaccount和Identity Authentication tenant是一一对应关系: 错误消息: No Identity Authentication tenants found for ...

  8. Trial accounts of SAP Cloud Platform do not provide an Identity Authentication tenant

    Prerequisites You have an Identity Authentication tenant. Restriction Trial accounts of SAP Cloud Pl ...

  9. SAP Cloud Platform和S/4HANA的互联

    通过两个系统互相连接互相信任的配置,使得: (1) SAP Cloud Platform subaccount will get a destination which holds data for ...

最新文章

  1. etcd 笔记(05)— etcd 代码结构、各模块功能、整体架构、各模块之间的交互、请求和应答流程
  2. kali linux samba,Kali Linux 渗透测试:SMB、SMTP扫描工具(14)
  3. Linux大神必会操作——系统排错
  4. 在VS.NET 的项目中使用生成事件
  5. Python - 装饰器
  6. win10下载ie浏览器
  7. 细说共模干扰和差模干扰
  8. Assassin’s Creed(hdu4415,贪心)
  9. PNG8格式图片详解
  10. Java SE基础知识详解第[12]期—集合(Set、Collections、Map、集合嵌套)
  11. k8s 一套代码部署两个实例
  12. AFX_PMSG数据结构
  13. 关于send和recv在UDP的使用
  14. 创建会计凭证保存前BTE增强
  15. 说不玩但是我还是玩了..
  16. https请求连接超时
  17. 快速了解 Robot Operating System(ROS) 机器人操作系统
  18. centos or redhat?
  19. 电机功率和转矩、转速之间的关系
  20. MySQL适合运行在Docker中吗?

热门文章

  1. 使用xpath时候出现AttributeError: ‘list‘ object has no attribute ‘strip‘解决方法
  2. Qt-网易云音乐界面实现-1 窗口隐藏拖拽移动,自定义标题栏
  3. WindowsAPI详解——TerminateProcess 终止|杀死其它进程
  4. 算法 归并排序的复杂度分析(含图解流程和Master公式)
  5. 为什么喜欢Kindle
  6. 国内的IT类的技术博客都有哪些?
  7. 小程序-if判断语句/条件判断语句简析 /显示隐藏判断
  8. 汇丰银行 java_汇丰银行java框架_汇丰银行面试经历(IT类).doc
  9. 提示:SQL Server 阻止了对组件'Ad Hoc Distributed Queries '的STATEMENT 'OpenRowset/OpenDatasource'...
  10. 生活的灾祸-面对困境我们如何突围