黑屏环境下,如何利用OBD部署OceanBase企业版集群

2024-08-31 00:36

本文主要是介绍黑屏环境下,如何利用OBD部署OceanBase企业版集群,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、前言

OBD,作为OceanBase官方推出的部署工具,显著简化了OB单机及集群的部署流程。此前,OBD能够支持对社区版OB进行一键部署,那OBD是否同样支持OB企业版的部署呢?

本文为大家介绍通过OBD,在OB企业版集群部署过程中遇到的一些问题和解决方案,希望能为大家提供一些参考。

二、部署准备

开发机资源cpu与内存存储大小
阿里云AY12C8G40G
阿里云AY22C8G40G
阿里云AY32C8G40G
资源包版本
OceanBase企业版4.2.2.0
OB-Deploy2.4.1(2.5以上不支持商业版,2.4.1可兼容431版本的OB,预计3.0开始支持商业版)
OBProxy4.2.3.0
OBClient2.2.6

注意⚠️:本篇文档部署的是企业版OceanBase,并非社区版

前置条件:为了方便OBD远程部署,需要将集群内开发机的SSH登录用户名和密码改为一样的,如:

username:root
password:xxxxx

一台机器上先准备如下四个文件(如下载到AY1上),点击前往 mirror 网站搜索下载

三、部署流程

📖 以下部署流程只需要在一台机器上完成即可,如我所用的机器是 AY1,其 IP 为 192.168.0.167

解压 ob-deploy 文件

rpm -ivh ob-depoly.xxxxxx.rpm

然后将所有的 rpm 加入 OBD 的镜像当中

rpm mirror remote disable
rpm mirror clone *.rpm
rpm mirror list local

查看是否添加成功

1718846954

进入 /usr/obd/example 目录下,编辑 mini-distribute-withe-obproxy-example.yaml 文件

## Only need to configure when remote login is required
user:username: 你设置的用户名,一般是rootpassword: 你设置的密码
#   key_file: your ssh-key file path if needport: 22timeout: 30
oceanbase:servers:- name: server1# Please don't use hostname, only IP can be supportedip: 192.168.18.207- name: server2ip: 192.168.18.205- name: server3ip: 192.168.18.206global:# Starting from observer version 4.2, the network selection for the observer is based on the 'local_ip' parameter, and the 'devname' parameter is no longer mandatory.# If the 'local_ip' parameter is set, the observer will first use this parameter for the configuration, regardless of the 'devname' parameter.# If only the 'devname' parameter is set, the observer will use the 'devname' parameter for the configuration.# If neither the 'devname' nor the 'local_ip' parameters are set, the 'local_ip' parameter will be automatically assigned the IP address configured above.# devname: eth0cluster_id: 1 # please set memory limit to a suitable value which is matching resource.memory_limit: 6G # The maximum running memory for an observersystem_memory: 1G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.datafile_size: 2G # Size of the data file.datafile_next: 2G # the auto extend step. Please enter an capacity, such as 2Gdatafile_maxsize: 20G # the auto extend max size. Please enter an capacity, such as 20Glog_disk_size: 13G # The size of disk space used by the clog files.cpu_count: 16production_mode: falseenable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.# observer cluster name, consistent with obproxy's cluster_nameappname: obcluster# root_password: # root user password, can be empty# proxyro_password: # proxyro user pasword, consistent with obproxy's observer_sys_password, can be emptyserver1:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/observer# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone1server2:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/observer# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone2server3:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/observer# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone3
obproxy:# Set dependent components for the component.# When the associated configurations are not done, OBD will automatically get the these configurations from the dependent components.depends:- oceanbaseservers:- 192.168.18.207global:listen_port: 2883 # External port. The default value is 2883.prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.home_path: /root/obproxy# oceanbase root server list# format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.# rs_list: 192.168.1.2:2881;192.168.1.3:2881;192.168.1.4:2881enable_cluster_checkout: false# observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.# cluster_name: obclusterskip_proxy_sys_private_check: trueenable_strict_kernel_release: falseproxy_id: 100client_session_id_version: 2# obproxy_sys_password: # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.# observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.

编辑好文件后我们就可以部署 obcluster 这个集群了

obd cluster deploy obcluster -c mini-distributed-with-obproxy-example.yaml

部署成功截图

1718846933

此时启动 obcluster 可能会报错

1718846983

what❓

针对此问题有两种解决方法

方法一

  • 如果对安全检查不是很在意,且仅仅是简单测试的话可以试试该方法,如下直接删除安全检查脚本即可(结果可能不稳定,且也需要每台机器运行一遍,故不推荐该方法)
rm -rf ~/.obd/plugins/oceanbase/*/start_check.py

方法二

  • 比较推荐的方法,只需要每台机器执行一遍如下命令
echo -e "* soft nproc 120000\n* hard nproc 120000" >> /etc/security/limits.d/20-nproc.conf
source /etc/profile

本篇文档使用方法二进行部署,随后重新执行启动集群命令

obd cluster start obcluster

1718847005

按照提示登录 OB 即可检验是否拉起分布式环境

1718847025

最终集群结果分析:

开发机内网IP节点角色
AY1192.168.0.167Observer + OBproxy
AY2192.168.0.168Observer
AY3192.168.0.169Observer


💡OBD 全程部署需要等待的时间大约为3分钟。若您想获取源码及更多详情,请访问我们的 GitHub 仓库:GitHub - oceanbase/obdeploy: A deployer and package manager for OceanBase open-source software.。

这篇关于黑屏环境下,如何利用OBD部署OceanBase企业版集群的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1122384

相关文章

VSCode配置Anaconda Python环境的实现

《VSCode配置AnacondaPython环境的实现》VisualStudioCode中可以使用Anaconda环境进行Python开发,本文主要介绍了VSCode配置AnacondaPytho... 目录前言一、安装 Visual Studio Code 和 Anaconda二、创建或激活 conda

pytorch+torchvision+python版本对应及环境安装

《pytorch+torchvision+python版本对应及环境安装》本文主要介绍了pytorch+torchvision+python版本对应及环境安装,安装过程中需要注意Numpy版本的降级,... 目录一、版本对应二、安装命令(pip)1. 版本2. 安装全过程3. 命令相关解释参考文章一、版本对

大数据spark3.5安装部署之local模式详解

《大数据spark3.5安装部署之local模式详解》本文介绍了如何在本地模式下安装和配置Spark,并展示了如何使用SparkShell进行基本的数据处理操作,同时,还介绍了如何通过Spark-su... 目录下载上传解压配置jdk解压配置环境变量启动查看交互操作命令行提交应用spark,一个数据处理框架

国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)

《国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)》本文给大家利用deepseek模型搭建私有知识问答库的详细步骤和遇到的问题及解决办法,感兴趣的朋友一起看看吧... 目录1. 第1步大家在安装完ollama后,需要到系统环境变量中添加两个变量2. 第3步 “在cmd中

Windows环境下安装达梦数据库的完整步骤

《Windows环境下安装达梦数据库的完整步骤》达梦数据库的安装大致分为Windows和Linux版本,本文将以dm8企业版Windows_64位环境为例,为大家介绍一下达梦数据库的具体安装步骤吧... 目录环境介绍1 下载解压安装包2 根据安装手册安装2.1 选择语言 时区2.2 安装向导2.3 接受协议

SpringBoot基于沙箱环境实现支付宝支付教程

《SpringBoot基于沙箱环境实现支付宝支付教程》本文介绍了如何使用支付宝沙箱环境进行开发测试,包括沙箱环境的介绍、准备步骤、在SpringBoot项目中结合支付宝沙箱进行支付接口的实现与测试... 目录一、支付宝沙箱环境介绍二、沙箱环境准备2.1 注册入驻支付宝开放平台2.2 配置沙箱环境2.3 沙箱

linux环境openssl、openssh升级流程

《linux环境openssl、openssh升级流程》该文章详细介绍了在Ubuntu22.04系统上升级OpenSSL和OpenSSH的方法,首先,升级OpenSSL的步骤包括下载最新版本、安装编译... 目录一.升级openssl1.官网下载最新版openssl2.安装编译环境3.下载后解压安装4.备份

如何使用Docker部署FTP和Nginx并通过HTTP访问FTP里的文件

《如何使用Docker部署FTP和Nginx并通过HTTP访问FTP里的文件》本文介绍了如何使用Docker部署FTP服务器和Nginx,并通过HTTP访问FTP中的文件,通过将FTP数据目录挂载到N... 目录docker部署FTP和Nginx并通过HTTP访问FTP里的文件1. 部署 FTP 服务器 (

C#集成DeepSeek模型实现AI私有化的流程步骤(本地部署与API调用教程)

《C#集成DeepSeek模型实现AI私有化的流程步骤(本地部署与API调用教程)》本文主要介绍了C#集成DeepSeek模型实现AI私有化的方法,包括搭建基础环境,如安装Ollama和下载DeepS... 目录前言搭建基础环境1、安装 Ollama2、下载 DeepSeek R1 模型客户端 ChatBo

Ubuntu 22.04 服务器安装部署(nginx+postgresql)

《Ubuntu22.04服务器安装部署(nginx+postgresql)》Ubuntu22.04LTS是迄今为止最好的Ubuntu版本之一,很多linux的应用服务器都是选择的这个版本... 目录是什么让 Ubuntu 22.04 LTS 变得安全?更新了安全包linux 内核改进一、部署环境二、安装系统