【原创】使用Docker试用OceanBase Cloud Platform(OCP)
本文基于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)相关推荐
- (二)为自动化MLOps设置GitHub、Docker和Google Cloud Platform
目录 Git存储库 谷歌云平台 Docker 下一步 下载源 - 1.2 MB 在本系列文章中,我们将引导您完成将CI/CD应用于AI任务的过程.您最终会得到满足Google MLOps 成熟度模型2 ...
- Google Cloud Platform免费申请试用后结算账号(Billing Account)自动关闭,不能开启的问题
自动谷歌赠送的300美金有效期延长到12个月后,相信不少人现在都在试用google的cloud platform. 注册账号比较简单,从试用进入就会得到一步步的引导. 问题在于注册成功后,很多人卡在b ...
- 如何取消 Google Cloud Platform 试用 关闭 GCP 帐号 删除信用卡 取消订阅
关闭您的 Google Cloud Platform 帐号 step: 1. 关停(删除)项目 https://console.cloud.google.com/cloud-resource-mana ...
- 在Google Cloud platform上创建Kubernetes cluster并使用
登录Google Cloud platform,创建一个新的Kubernetes Cluster: 该集群的node个数选择为1,从Machine type下拉列表里选择CPU配置: 展开Advanc ...
- 在Google Cloud Platform上持续部署Node.js
by Gautam Arora 由Gautam Arora 在Google Cloud Platform上持续部署Node.js (Continuous Deployment for Node.js ...
- SAP Cloud Platform Neo环境的权限管理
SAP云平台的帮助文档:https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/a1ab5c4cc117455 ...
- SAP Cloud Platform Identity Authentication service
subaccount和Identity Authentication tenant是一一对应关系: 错误消息: No Identity Authentication tenants found for ...
- 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 ...
- SAP Cloud Platform和S/4HANA的互联
通过两个系统互相连接互相信任的配置,使得: (1) SAP Cloud Platform subaccount will get a destination which holds data for ...
最新文章
- C#下用P2P技术实现点对点聊天
- 如果让你拥有100万粉丝,你会做什么
- numpy.mod详解
- IBM 火雪挺:人工智能如何影响衣食住行?
- js String方法集合
- 实时操作系统与通用计算机操作系统的区别,实时操作系统(RTOS)和通用操作系统(OS)之间的区别...
- 使用no-gui 模式执行分布式测试
- Reporting service 技巧
- centos6安装PHP5.4
- java银行叫号课程设计_《银行排队叫号系统设计》课程设计.doc
- 大学四年总结与感悟及给刚上大学的同学的一些建议
- jQuery Validate使用记录
- python股票回测源码_股票量化交易回测框架pyalgotrade源码阅读(一)
- 详解matlab均衡算法equalize()
- AI人工智能入门—知识地图
- 支付宝网站付沙箱配置
- AI时代——人工智能技术图谱,它来啦(机器学习+深度学习学习路线)
- SQLIntegrityConstraintViolationException: ORA-00001: unique constraint及sequence调整初始值
- JS–for循环嵌套
- vite的搭建与使用
热门文章
- java类默认访问权限_Java的四种访问权限
- Web语义化的理解(H5语义化的作用)
- 红旗Linux桌面4.1文本布置历程图解(四)
- Python爬虫爬取数据的步骤
- eixt(0),ExitProcess和TerminateProcess的区别和联系
- 美国SigmasTek泰克免维护蓄电池的设计寿命_优点
- 理想不是超越生活,而是基于现实
- 编译iproute命令为ip库
- 开发的第一款iOS小游戏,大家多多支持
- 问题解决Xshell :No matching outgoing encryption algorithm found