首页 > 其他分享 >obd demo快速部署单副本oceanbase(在线)

obd demo快速部署单副本oceanbase(在线)

时间:2023-04-18 17:57:53浏览次数:51  
标签:ok oceanbase demo obd ce el7

资源要求:

  • 可用内存不少于8G
  • 安装目录空间不少于50G(默认安装在当前安装用户的家目录下)

 

1. 什么是obd?

odb是oceanbase社区版部署工具oceanbase deployer的简称,通过obd可以快速完成oceanbase clusterr的部署。

不传入配置文件的情况下,在单机通过执行obd demo可以快速部署oceanbase cluster的最新版本,集群名称是demo。

使用obd demo快速部署安装的是最新的版本,默认安装的组件:grafana、obproxy-ce、oceanbase-ce、obagent、prometheus。

 

2. 下载obd

https://www.oceanbase.com/softwarecenter

 

3. 安装obd

[root]# rpm -ivh ob-deploy-2.0.0-10.el7.x86_64.rpm

 

4. 执行obd demo快速部署

[root]# obd demo

或者

[root]# obd demo -c oceanbase-ce,obproxy-ce,obagent,prometheus,grafana --home_path=/root/
Cluster param config check ok
Open ssh connection ok
Generate grafana configuration ok
Generate obproxy configuration ok
Generate observer configuration ok
Generate obagent configuration ok
Generate prometheus configuration ok
+--------------------------------------------------------------------------------------------+
|                                          Packages                                          |
+--------------+---------+------------------------+------------------------------------------+
| Repository   | Version | Release                | Md5                                      |
+--------------+---------+------------------------+------------------------------------------+
| grafana      | 7.5.17  | 1                      | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obproxy-ce   | 4.1.0.0 | 7.el7                  | 2a9d9bf67f179dcca2a8c9e7c77373d94e7e2abe |
| oceanbase-ce | 4.1.0.0 | 100000192023032010.el7 | 8439ecf8db5e0649bd49671b41ea9e8c85756b63 |
| obagent      | 1.3.0   | 22.el7                 | d57fbb4962b2fbecb6282358c59295fdfba4d6ac |
| prometheus   | 2.37.1  | 10000102022110211.el7  | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
+--------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Cluster status check ok
Initializes grafana work home ok
Initializes obproxy work home ok
Initializes observer work home ok
Initializes obagent work home ok
Initializes prometheus work home ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository install ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository lib check ok
Remote obproxy-ce-4.1.0.0-7.el7-2a9d9bf67f179dcca2a8c9e7c77373d94e7e2abe repository install ok
Remote obproxy-ce-4.1.0.0-7.el7-2a9d9bf67f179dcca2a8c9e7c77373d94e7e2abe repository lib check ok
Remote oceanbase-ce-4.1.0.0-100000192023032010.el7-8439ecf8db5e0649bd49671b41ea9e8c85756b63 repository install ok
Remote oceanbase-ce-4.1.0.0-100000192023032010.el7-8439ecf8db5e0649bd49671b41ea9e8c85756b63 repository lib check !!
Remote obagent-1.3.0-22.el7-d57fbb4962b2fbecb6282358c59295fdfba4d6ac repository install ok
Remote obagent-1.3.0-22.el7-d57fbb4962b2fbecb6282358c59295fdfba4d6ac repository lib check ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository install ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository lib check ok
Try to get lib-repository
Package oceanbase-ce-libs-4.1.0.0-100000192023032010.el7 is available.
install oceanbase-ce-libs-4.1.0.0 for local ok
Remote oceanbase-ce-libs-4.1.0.0-100000192023032010.el7-a83b1dd1cab44d3f610d439931322be7a08555f2 repository install ok
Remote oceanbase-ce-4.1.0.0-100000192023032010.el7-8439ecf8db5e0649bd49671b41ea9e8c85756b63 repository lib check ok
demo deployed
Get local repositories ok
Search plugins ok
Open ssh connection ok
Load cluster param plugin ok
Check before start observer ok
[WARN] OBD-1012: (127.0.0.1) clog and data use the same disk (/)

Check before start obagent ok
Check before start prometheus ok
Check before start grafana ok
Check before start obproxy ok
Start observer ok
observer program health check ok
Connect to observer ok
Initialize oceanbase-ce ok
Start obagent ok
obagent program health check ok
Connect to Obagent ok
Start promethues ok
prometheus program health check ok
Connect to Prometheus ok
Initialize prometheus ok
Start grafana ok
grafana program health check ok
Connect to grafana ok
Initialize grafana ok
Start obproxy ok
obproxy program health check ok
Connect to obproxy ok
Initialize obproxy-ce ok
Wait for observer init ok
+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 4.1.0.0 | 2881 | zone1 | ACTIVE |
+-----------+---------+------+-------+--------+
obclient -h127.0.0.1 -P2881 -uroot -Doceanbase -A

+-----------------------------------------------------------------+
|                             obagent                             |
+--------------+--------------------+--------------------+--------+
| ip           | mgragent_http_port | monagent_http_port | status |
+--------------+--------------------+--------------------+--------+
| 192.168.1.71 | 8089               | 8088               | active |
+--------------+--------------------+--------------------+--------+
+-----------------------------------------------------+
|                      prometheus                     |
+--------------------------+------+----------+--------+
| url                      | user | password | status |
+--------------------------+------+----------+--------+
| http://192.168.1.71:9090 |      |          | active |
+--------------------------+------+----------+--------+
+-------------------------------------------------------------------+
|                              grafana                              |
+--------------------------------------+-------+-----------+--------+
| url                                  | user  | password  | status |
+--------------------------------------+-------+-----------+--------+
| http://192.168.1.71:3000/d/oceanbase | admin | oceanbase | active |
+--------------------------------------+-------+-----------+--------+
+---------------------------------------------+
|                   obproxy                   |
+-----------+------+-----------------+--------+
| ip        | port | prometheus_port | status |
+-----------+------+-----------------+--------+
| 127.0.0.1 | 2883 | 2884            | active |
+-----------+------+-----------------+--------+
obclient -h127.0.0.1 -P2883 -uroot -Doceanbase -A
demo running
Trace ID: 3056bf54-d834-11ed-9207-000c29501e19
If you want to view detailed obd logs, please run: obd display-trace 3056bf54-d834-11ed-9207-000c29501e19

 

5. 查看集群信息,集群名称为demo

[root]# obd cluster list
+--------------------------------------------------+
|                   Cluster List                   |
+------+-------------------------+-----------------+
| Name | Configuration Path      | Status (Cached) |
+------+-------------------------+-----------------+
| demo | /root/.obd/cluster/demo | running         |
+------+-------------------------+-----------------+
Trace ID: 9e0b5fee-d8d1-11ed-831e-000c29501e19
If you want to view detailed obd logs, please run: obd display-trace 9e0b5fee-d8d1-11ed-831e-000c29501e19

 

6. 查看demo集群组件信息

[root]# obd cluster display demo
Get local repositories and plugins ok
Open ssh connection ok
Cluster status check ok
Connect to observer ok
Wait for observer init ok
+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 4.1.0.0 | 2881 | zone1 | ACTIVE |
+-----------+---------+------+-------+--------+
obclient -h127.0.0.1 -P2881 -uroot -Doceanbase -A

Connect to Obagent ok
+-----------------------------------------------------------------+
|                             obagent                             |
+--------------+--------------------+--------------------+--------+
| ip           | mgragent_http_port | monagent_http_port | status |
+--------------+--------------------+--------------------+--------+
| 192.168.1.71 | 8089               | 8088               | active |
+--------------+--------------------+--------------------+--------+
Connect to Prometheus ok
+-----------------------------------------------------+
|                      prometheus                     |
+--------------------------+------+----------+--------+
| url                      | user | password | status |
+--------------------------+------+----------+--------+
| http://192.168.1.71:9090 |      |          | active |
+--------------------------+------+----------+--------+
Connect to grafana ok
+-------------------------------------------------------------------+
|                              grafana                              |
+--------------------------------------+-------+-----------+--------+
| url                                  | user  | password  | status |
+--------------------------------------+-------+-----------+--------+
| http://192.168.1.71:3000/d/oceanbase | admin | oceanbase | active |
+--------------------------------------+-------+-----------+--------+
Connect to obproxy ok
+---------------------------------------------+
|                   obproxy                   |
+-----------+------+-----------------+--------+
| ip        | port | prometheus_port | status |
+-----------+------+-----------------+--------+
| 127.0.0.1 | 2883 | 2884            | active |
+-----------+------+-----------------+--------+
obclient -h127.0.0.1 -P2883 -uroot -Doceanbase -A
Trace ID: 36f87f38-d8d3-11ed-96c8-000c29501e19
If you want to view detailed obd logs, please run: obd display-trace 36f87f38-d8d3-11ed-96c8-000c29501e19
如果想查看obd的详细日志信息,请执行:
obd display-trace 36f87f38-d8d3-11ed-96c8-000c29501e19

 

7. 通过obclient连接oceanbase

[root]# obclient -h127.0.0.1 -P2881 -uroot -Doceanbase -A
Enter password: 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221499392
Server version: OceanBase_CE 4.1.0.0 (r100000192023032010-0265dfc6d00ff4f0ff4ad2710504a18962abaef6) (Built Mar 20 2023 10:12:57)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| LBACSYS            |
| mysql              |
| oceanbase          |
| ORAAUDITOR         |
| SYS                |
| test               |
+--------------------+
7 rows in set (0.027 sec)

 

8. 通过mysqlclient连接oceanbase

[root]# mysql --version
mysql  Ver 8.0.26 for Linux on x86_64 (MySQL Community Server - GPL)
[root]# mysql -h 192.168.1.71 -P2881 -uroot@sys -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3221499453
Server version: 5.7.25 OceanBase_CE 4.1.0.0 (r100000192023032010-0265dfc6d00ff4f0ff4ad2710504a18962abaef6) (Built Mar 20 2023 10:12:57)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| LBACSYS            |
| mysql              |
| oceanbase          |
| ORAAUDITOR         |
| SYS                |
| test               |
+--------------------+
7 rows in set (0.02 sec)

 

9. 修改oceanbase密码,通过obd demo部署的集群密码默认为空

obclient [(none)]> select user,host,password from mysql.user;
+-------------+------+----------+
| user        | host | password |
+-------------+------+----------+
| root        | %    |          |
| proxyro     | %    |          |
| ocp_monitor | %    |          |
+-------------+------+----------+
obclient [(none)]> alter user 'root'@'%' identified by 'Gaoyu@029';
Query OK, 0 rows affected (0.15 sec)

 

标签:ok,oceanbase,demo,obd,ce,el7
From: https://www.cnblogs.com/haha029/p/17330524.html

相关文章

  • 通过docker快速部署oceanbase单机库
    docker方式部署oceanbase单库提示:  系统可用内存不能低于6G。  根目录(/)剩余磁盘空间不能小于30G。 1.搜索oceanbase的镜像[root]#dockersearchoceanbaseINDEXNAMEDESCRIPTION......
  • dbatools demo
    break#从PowerShellGallery安装dbatools模组Install-Moduledbatools<#01.查找SQL实例02.连接SQL实例03.检查备份04.检查磁盘空间05.备份数据库06.安装欧拉维护工具07.运行Job08.测试备份09.查看fail的job10.检查最大......
  • TS初始化Demo
    初始化Demo需要的文件 初始化tsconfig.json文件tsc--init 初始化package.json文件npminit 使用rollup打包,packge.json文件中加入依赖{"scripts":{"test":"echo\"Error:notestspecified\"&&exit1","build&quo......
  • 主机资源情况监视器demo
    importparamiko#导入paramiko模块用于SSH连接importpsutil#导入psutil模块用于获取系统信息importwx#导入wx模块用于构建GUI应用程序classRemoteMonitor(wx.Frame):#定义RemoteMonitor类,继承自wx.Frame类def__init__(self,host,username,password,port......
  • kubebuilder开发kubernetes operator demo
    环境准备go环境配置wgethttps://golang.google.cn/dl/go1.19.8.linux-amd64.tar.gztarzxvfgo1.19.8.linux-amd64.tar.gzmvgo/usr/local/vim/etc/profile在最结尾添加exportHOME=/rootexportGOROOT=/usr/local/goexportGOPATH=/opt/idcus/goexportPATH=$PATH:......
  • Spring AOP demo
    动态代理模式实现,比如可以在Bean的生命周期创建阶段,根据Pointcut判断当前bean是否满足切入条件,如果满足,再根据织入器ProxyFactory织入到JoinPoint,再根据bean创建代理对象名词JoinPoint:可以理解成系统中每一个可以应用aop的点,一般是指方法。spring中只支持方法,Pointcut:根据P......
  • googleTest demo
    googletest的目录在的官方目录在https://github.com/google/googletest.git。作为用户,googleTest的库可以认为提供了两个东西:各种宏,如TEST,TEST_F,通过#include"gtest/gtest.h",即可使用。gtest_main的库libgtest_main.a,即提供了一个主函数,可以和一个测试套的“容器”。静态库......
  • 文字滚动demo
    1、主要采用css的@keyframes关键帧和animation动画<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="......
  • fastdds学习之2——Helloworld Demo
    本节详细介绍了如何使用C++API一步一步地创建一个简单的FastDDS应用程序,其中包含发布者和订阅者。也可以使用eProsimaFastDDSGen工具自行生成与本节中实现的示例类似的示例。在构建发布/订阅应用程序中解释了这种额外的方法,本例程在eProsimaFastDDSGithub仓库中,环境搭建完成......
  • 如何使用海康demo工具配置将设备接入SkeyeVSS平台?​
    SkeyeVSS平台视频能力丰富齐全,部署灵活,操作简单,可快速接入多类型设备及协议,具体包括国标GB28181、RTMP、RTSP/Onvif、海康SDK、大华SDK、海康Ehome等,以及近期额外拓展的华为SDK、宇视SDK、萤石SDK、乐橙SDK等;在视频流分发方面,RTSP、FLV、HLS、WebRTC等格式均可在全终端、平台实现视......