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

news2024/9/28 11:15:24

一、前言

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: 你设置的用户名,一般是root
   password: 你设置的密码
#   key_file: your ssh-key file path if need
   port: 22
   timeout: 30
oceanbase:
  servers:
    - name: server1
      # Please don't use hostname, only IP can be supported
      ip: 192.168.18.207
    - name: server2
      ip: 192.168.18.205
    - name: server3
      ip: 192.168.18.206
  global:
    # 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: eth0
    cluster_id: 1 
    # please set memory limit to a suitable value which is matching resource.
    memory_limit: 6G # The maximum running memory for an observer
    system_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 2G
    datafile_maxsize: 20G # the auto extend max size. Please enter an capacity, such as 20G
    log_disk_size: 13G # The size of disk space used by the clog files.
    cpu_count: 16
    production_mode: false
    enable_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_name
    appname: obcluster
    # root_password: # root user password, can be empty
    # proxyro_password: # proxyro user pasword, consistent with obproxy's observer_sys_password, can be empty
  server1:
    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: /redo
    zone: zone1
  server2:
    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: /redo
    zone: zone2
  server3:
    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: /redo
    zone: 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:
    - oceanbase
  servers:
    - 192.168.18.207
  global:
    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:2881
    enable_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: obcluster
    skip_proxy_sys_private_check: true
    enable_strict_kernel_release: false
    proxy_id: 100
    client_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.。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2089056.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

短视频矩阵系统怎么开发搭建使用?解决内容创作分发效率问题的工具系统

目录 前言 : 一、短视频矩阵系统开发目的 系统主要功能 二、怎么开发 前言 : 短视频矩阵系统是一种综合性的短视频营销工具,它集成了短视频创作、管理、分发、数据分析等多种功能于一体。 一、短视频矩阵系统开发目的 在帮助创作者和企…

C++中类的相关学习

动态内存分配和回收(堆区) C语言中动态内存分配和回收使用malloc函数和free函数完成的 C依旧可以使用上述的两个函数完成,动态内存分配和回收 C也可以使用两个关键字new和delete来完成动态内存的分配和回收 内存分配 单个申请 格式&…

Chapter 07 watch侦听器

欢迎大家订阅【Vue2Vue3】入门到实践 专栏,开启你的 Vue 学习之旅! 文章目录 前言一、基本用法二、深度侦听 前言 在 Vue 中,watch 侦听器是一个非常实用的工具,用于处理自定义数据的变化。本文详细讲解了 watch 侦听器的基本用法…

Pytorch实现多层LSTM模型,并增加emdedding、Dropout、权重共享等优化

简述 本文是 Pytorch封装简单RNN模型,进行中文训练及文本预测 一文的延申,主要做以下改动: 1.将nn.RNN替换为nn.LSTM,并设置多层LSTM: 既然使用pytorch了,自然不需要手动实现多层,注意nn.RNN…

JVM1-初识JVM

目录 什么是JVM JVM的功能 解释和运行 内存管理 即时编译 Java性能低的主要原因和跨平台特性 常见的JVM 什么是JVM JVM 全称是 Java Virtual Machine,中文译名:Java虚拟机 JVM本质上是一个运行在计算机上的程序,它的职责是运行Java字…

AI大模型编写多线程并发框架(六十三):监听器优化·下

系列文章目录 文章目录 系列文章目录前言一、项目背景二、第十一轮对话-修正运行时数据三、修正任务计数器四、第十二轮对话-生成单元测试五、验证通过七、参考文章 前言 在这个充满技术创新的时代,AI大模型正成为开发者们的新宠。它们可以帮助我们完成从简单的问答…

C++,如何写单元测试用例?

文章目录 1. 概述1.1 什么是单元测试?1.2 为什么要做单元测试? 2. 写测试用例的方法3. 编写测试用例的通用原则3.1 目的性原则3.2 独立性原则3.3 可重复性原则3.4 小规模原则3.5 一致性原则3.6 自动化原则3.7 边界条件原则3.8 错误检测原则3.9 性能原则3…

西门子PLC控制激光读头,profient转Ethernet IP网关应用

在智能制造的浪潮下,企业对于生产线的灵活性、智能化水平以及数据交互能力提出了更高要求。西门子PLC以其高可靠性和丰富的功能模块,广泛应用于各种自动化生产线中。而激光读头作为精密测量与定位的关键设备,其高精度、非接触式测量特性在自动…

力扣862.和至少为K的最短子数组

力扣862.和至少为K的最短子数组 双端单调队列 前缀和 用单调队列存遍历过的前缀和&#xff0c;同时两个优化 1. 2. class Solution {public:int shortestSubarray(vector<int>& nums, int k) {int n nums.size(),ans n 1;long s[n1];s[0] 0L;for(int i0;i…

1999-2023年上市公司年报文本数据(PDF+TXT)

1999-2023年上市公司年报文本数据&#xff08;PDFTXT&#xff09; 1、时间&#xff1a;1999-2023年 2、来源&#xff1a;上市公司年度报告 3、范围&#xff1a;A股上市公司&#xff0c;5600企业&#xff0c;6.3W份 4、格式&#xff1a;PDFTXT 5、下载链接&#xff1a; 199…

东方通Web服务器(TongWeb)控制台部署改自动部署操作

首先将控制台部署改自动部署的应用进行解除部署&#xff0c;具体如下&#xff1a;登录TongWeb管理控制台&#xff0c;在左侧导航栏中点击“应用管理”&#xff0c;通过应用列表中第一列复选框选中要解除部署的应用&#xff0c;点击“解部署”&#xff0c;完成应用解除部署操作。…

4.Copy Constructor的构造操作

目录 1、对象赋值问题引入 2、Bitwise Copy Semantics&#xff08;位逐次拷贝&#xff09; 3、处理class virtual function 4、处理virtual base class subobject 1、对象赋值问题引入 在C中&#xff0c;有三种情况会以一个object的内容作为另一个class object的初值。这三…

Upload-labs靶场通过攻略

pass-01 1.写一个一句话木马 2.上传php文件 当我们上传php文件时 提示文件类型不正确 3.修改php后缀 通过修改php后缀为jpg 抓包再次修改成php文件 4.查看是否上传成功 页面显示图片 表示上传成功 pass-02 1.上传一个php文件 页面显示文件类型不正确 2.抓包修改 可以看…

【Python零基础】文件使用和异常处理

文章目录 前言一、从文件中读取数据二、向文件中写入数据三、异常四、存储数据总结 前言 本篇笔者将展示Python如何处理文件数据&#xff0c;包括文件内容的读取和写入操作&#xff0c;以及程序运行时异常模块的处理方式&#xff0c;保证我们写出健壮的代码。 一、从文件中读取…

Nature揭示应变不变的射频电子器件新突破,无线健康监测的前景

【行业背景】 可拉伸电子设备是未来柔性电子技术发展的重要趋势。这些设备在皮肤接口、健康监测、智能穿戴等领域发挥着关键作用&#xff0c;离不开高性能的射频&#xff08;RF&#xff09;电子组件。射频电子设备的功能依赖于其基板材料的电气性能&#xff0c;然而传统的弹性…

突发:Runway 从 HuggingFace 上删库跑路,究竟发生了什么?

&#x1f525; 突发新闻&#xff1a;Runway 从 HuggingFace 上删库跑路&#xff0c;究竟发生了什么&#xff1f; 1️⃣ Runway 从 HuggingFace 上删库跑路&#xff01;究竟是技术问题还是另有隐情&#xff1f; 最近科技圈内流传着一则令人瞠目结舌的消息&#xff1a;曾经为AI图…

5款自动生成文案的神器,助你轻松创作优质文案

随着人工智能技术的发展&#xff0c;生活中的很多工作都可以自动化操作&#xff0c;就连创作文案也不再会让人绞尽脑汁的去思考怎么写&#xff0c;因为有了自动生成文案的神器&#xff0c;从而使创作者在写作文案的过程中更加得心应手&#xff0c;并且不费吹灰之力便能拥有优质…

优思学院|精益生产中现场管理的7大工具

在现代制造业中&#xff0c;精益生产&#xff08;Lean Production&#xff09;已成为提升生产效率、确保产品质量的关键方法论。精益生产的核心思想在于消除浪费、持续改进&#xff0c;而要实现这些目标&#xff0c;依赖于一系列行之有效的管理工具。在这篇文章中&#xff0c;我…

爆品是测出来的,不是选出来的

我在亚马逊摸爬滚打了五年&#xff0c;深深感受到了"七分选品&#xff0c;三分运营"的重要性。不管你的产品图片、描述多么精美&#xff0c;如果不去精选和测试&#xff0c;很难保证能出单。我见过很多跨境新手在选品上卡了几个月&#xff0c;纠结于卖什么。但实际上…

一次VUE3 使用axios调用萤石云OpenAPI踩坑经历

通过调用萤石云的获取设备列表功能&#xff0c;我们可以根据 ACCESS_TOKEN 获取该用户下的设备列表。 Python 调用接口 根据接口文档[1]&#xff0c;使用Python&#xff0c;很轻松就能获取到该列表&#xff0c;代码如下&#xff08;该代码用于拼接生成vue代码&#xff0c;这是…