eCloud Data Master 安装手册 V2.5

35
eCloud Data Master 安装手册 V2.5.3 南京云信达科技有限公司 www.ecloudtech.com.cn

Transcript of eCloud Data Master 安装手册 V2.5

Page 1: eCloud Data Master 安装手册 V2.5

eCloud Data Master

安装手册 V2.5.3

南京云信达科技有限公司

www.ecloudtech.com.cn

Page 2: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 1 -

目 录

第一章 前言 ...............................................................................................................- 2 -

1.1 概述 ...................................................................................................................- 2 -

1.2 读者对象 ...........................................................................................................- 2 -

1.3 版本信息 ...........................................................................................................- 2 -

1.4 修订记录 ...........................................................................................................- 2 -

第二章 安装前准备 ...................................................................................................- 3 -

第三章 Master 端安装 ..............................................................................................- 4 -

第四章 Storage 端安装 ...........................................................................................- 6 -

第五章 Client 端安装 ............................................................................................ - 12 -

5.1 Linux(Unix)平台安装 ............................................................................... - 12 -

5.1.1 简介 ....................................................................................................... - 12 -

5.1.2 安装 obclient....................................................................................... - 12 -

5.1.3 客户端初始化 ....................................................................................... - 13 -

5.1.4 验证安装 ............................................................................................... - 15 -

5.2 window 客户端安装 .................................................................................... - 15 -

5.2.1 前提条件 ............................................................................................... - 15 -

5.2.2 操作步骤 ............................................................................................... - 16 -

第六章 部署微服务环境(可选项) .................................................................... - 19 -

6.1 部署 docker 环境 ......................................................................................... - 19 -

6.2 部署 registry 服务(可选项) ................................................................... - 21 -

6.3 部署微服务所需 DB 镜像 ........................................................................... - 22 -

第七章 卸载 ............................................................................................................ - 27 -

7.1 简介 ................................................................................................................ - 27 -

7.2 master 端卸载 .............................................................................................. - 27 -

7.2.1 卸载应用 ............................................................................................... - 27 -

7.2.2 清理 tomcat 相关目录 ...................................................................... - 27 -

7.2.3 卸载数据库 ........................................................................................... - 27 -

7.2.4 清理遗留文件 ....................................................................................... - 28 -

7.3 Storage 端卸载 ............................................................................................ - 29 -

7.3.1 简单删除 ............................................................................................... - 29 -

7.3.2 深度删除 ............................................................................................... - 29 -

7.3.3 微服务删除(可选项) ....................................................................... - 30 -

7.4 Client 端卸载 ................................................................................................ - 32 -

7.4.1 Linux 客户端卸载................................................................................ - 32 -

7.4.2 Windows 客户端卸载......................................................................... - 33 -

Page 3: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 2 -

第一章 前言

1.1 概述

本指南的内容主要是为了让用户了解 CDM 的安装以及卸载过程以及注意事项。

1.2 读者对象

本指南主要适用于以下工程师:

⚫ 技术支持工程师

⚫ 维护工程师

⚫ 用户

1.3 版本信息

本版本信息 上个版本信息 功能修改

V2.5.3 V2.5.0

1.4 修订记录

版本 发布日期 攥写者 审核 说明

V2.1 2018-9-11 张娟 吴子文 初稿,内部发布

V2.1.1 2018-10-13 张娟 吴子文 添加、修改

V2.2 2018-11-15 张娟 吴子文 添加、修改

V2.2.1 2018-12-07 张娟 吴子文 添加、修改

V2.5 2018-12-30 张娟 吴子文 添加、修改

V2.5.3 2019-04-12 张娟 吴子文 添加、修改

Page 4: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 3 -

第二章 安装前准备

请准备好 CDM 主节点和存储节点的硬件环境,准备好存储节点和客户端所需的物理连

接,提前获取 CDM 相应的安装文件。

说明:本文的 Storage、Master 安装,均基于公司定制系统 ecos_centos75_r009。

Page 5: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 4 -

第三章 Master 端安装

步骤1 以 Master 安装用户登录 Master 所在服务器,上传安装文件至主机

“/usr/local/src”目录。

]# cd /usr/local/src/

]# ll

系统显示如下信息:

total 199380

-rw-r--r-- 1 root root 204162402 Sep 9 10:37

cdm*-master-install-For-CentOS7.5-master-***.zip

其中标红部分为软件包名称,请以实际获取到的为准。

步骤2 解压安装文件。

]# unzip cdm*-master-install-For-CentOS7.5-master-***.zip

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

系统显示如下信息:

Archive: cdm*-master-install-For-CentOS7.5-master-****.zip

creating: cdm2-master-install/

inflating: cdm2-master-install/install_tc.sh

creating: cdm2-master-install/mysql/

inflating: cdm2-master-install/mysql/MySQL-devel-5.6.40-1.el7.x86_64.rpm

inflating: cdm2-master-install/mysql/MySQL-client-5.6.40-1.el7.x86_64.rpm

inflating: cdm2-master-install/mysql/MySQL-server-5.6.40-1.el7.x86_64.rpm

inflating: cdm2-master-install/mysql/perl-Data-Dumper-2.145-3.el7.x86_64.rpm

creating: cdm2-master-install/script/

inflating: cdm2-master-install/script/cdm.sql

inflating: cdm2-master-install/script/init.sql

inflating: cdm2-master-install/install.sh

creating: cdm2-master-install/apps/

inflating: cdm2-master-install/apps/jre8.gz

extracting: cdm2-master-install/apps/cdm.zip

inflating: cdm2-master-install/readme.txt

步骤3 安装 Master。

Page 6: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 5 -

]# cd cdm2-master-install/

]# chmod 755 install.sh

]# ./install.sh

系统显示如下信息:

This machine ip is: 10.0.*.*(master 服务器地址)

Delete existing MYSQL ...

Delete existing MYSQL ... Successful

Install MYSQL ...

… 省略 …

The system was successfully installed.

Open http://IP:8080/cdm and check if the system is successfully started!

步骤4 通过浏览器访问 http://IP:8080/cdm 验证安装是否成功,如能正常打开 【产

品激活】页面,则安装成功。

其中,ip 表示为 Master 所在服务器地址。

步骤5 (可选)升级为保密版本。

CDM 分为普通版本和保密版本(即三员版本),包括:安全审计员,安全保

密员,系统管理员。不同的登录账户拥有不同的操作权限,更好的维护了系统

安全。

1. 执行如下命令,为升级脚本赋权。

]# cd /usr/local/src/cdm2-master-install

]# chmod 755 upgrade_confidential.sh

]# ./upgrade_confidential.sh

2. 验证保密版本是否升级成功。

通过浏览器访问 http://IP:8080/cdm,待产品激活成功后,使用 sysadmin 用

户登录,系统提示【用户不存在】即说明升级成功。

Page 7: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 6 -

第四章 Storage 端安装

步骤1 以 Storager 安装用户登录 Storage 所在的服务器,上传安装文件到主机

“/usr/local/src”目录下。

]# cd /usr/local/src/

]# ll

系统显示如下信息:

total 130836

-rw-r--r-- 1 root root 104689214 Sep 9 12:44 obstorage-init-2.run

-rw-r--r-- 1 root root 29284153 Sep 9 12:44

obstorage-linux.el7.x86_64-master-****.run

其中标红部分为软件包名称,请以实际获取到的为准。

步骤2 为安装文件赋予执行权限。

]# chmod 755 *.run

步骤3 安装 obstorage。

]# ./obstorage-linux.****-1.run

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

系统显示如下信息:

Verifying archive integrity... 100% All good.

Uncompressing CDM obstorage installer 100%

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

步骤4 安装 obstorage-init。

]# ./obstorage-init-*-2.run

系统显示如下信息:

Verifying archive integrity... 100% All good.

Uncompressing Initialize the base environment of the storage node[1.0.8] 100%

Page 8: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 7 -

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

步骤5 初始化配置。

1. 执行存储端初始化程序。

]# /opt/obstorage/bin/initStorage.exe

2. 初始化存储池。

----------------------------------------

Please select an initialization item

----------------------------------------

0. Initialization profile

1. Initialize the storage pool

q. Quit

----------------------------------------

Please enter your choice: 1

3. 输入 0 选择初始化 ip 信息。

------------------------------

Select the ip entry to initialize

------------------------------

0. Initialize backup ip

1. Initialize synchronization ip

s. Save and exit

q. Quit

------------------------------

Please enter your choice: 0

在初始化 ip 信息该子菜单中,提供两个 IP 初始化选项。

⚫ 【Initialize backup ip】:备份 IP,如果没有专门规划的备份 IP,也可以填写其

它可以访问到该主机的 IP。且支持同时输入多个 ip,ip 之间使用连字符(-)

进行连接。如:192.168.100.5-192.168.100.6。该项必填。

⚫ 【Initialize synchronization ip】:用来选做复制,归档时候的网络地址,如果没

有专门规划的同步 IP,可以不填,系统将复用备份 IP 地址。该项为可选项。

此处以配置 backup ip 为例,配置 synchronization ip 的方法相同。

输入 0 后,输入 IP 地址。

Page 9: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 8 -

Please enter backup IP (ipv4): 10.0.*.*

完成配置后,保存配置并返回上级菜单。

------------------------------

Select the ip entry to initialize

------------------------------

0. Initialize backup ip

1. Initialize synchronization ip

s. Save and exit

q. Quit

------------------------------

Please enter your choice: s

4. 初始化配置文件。

在该子菜单,主要选择用于备份的方式,目前支持 ISCSI、FC、IB 三种方式,

根据主机实际配置情况,选择合适的方式。此处以 ISCSI 方式为例,进行说

明。其它方式与之类似。

5. 选择合适的连接方式。

------------------------------

Please select the connector type

------------------------------

0. ISCSI

1. FC

2. IB

s. Save and exit

q. Quit

------------------------------

Please enter your choice: 0

6. 选择合适传输通道。

⚫ 选择 ISCSI

------------------------------

Please select the initiator name

------------------------------

0. iqn.2016-07.com.ecloudtech:ecos75r007-dev-60-27.stor

q. Quit

------------------------------

Please enter your choice: 0

Page 10: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 9 -

⚫ 选择 IB

------------------------------

Please select ib gid number

------------------------------

0. 'mlx4_0' port 1: fe80:0000:0000:0000:f452:1403:007f:d5c1

1. 'mlx4_0' port 2: fe80:0000:0000:0000:f452:1403:007f:d5c2

q. Quit

------------------------------

Please enter your choice:

⚫ 选择 FC

第一次进行初始化时,FC 的状态全为 Linkdown

------------------------------

Please select fc wwn number

------------------------------

0. 21:00:00:24:ff:55:d0:ae [Linkdown]

1. 21:00:00:24:ff:55:d0:af [Linkdown]

q. Quit

------------------------------

Please enter your choice:

随机选择一个 FC 端口后,保存,重启主机。再次进入该选择页面,此时 FC

端口状态将会正常显示。请根据实际情况进行调整。

------------------------------

Please select fc wwn number

------------------------------

0. 21:00:00:24:ff:55:d0:ae [Online]

1. 21:00:00:24:ff:55:d0:af [Linkdown]

q. Quit

------------------------------

Please enter your choice:

7. 保存,并返回主菜单。

------------------------------

Please select the connector type

------------------------------

0. ISCSI

1. FC

2. IB

s. Save and exit

q. Quit

Page 11: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 10 -

------------------------------

Please enter your choice: s

8. 进入初始化菜单:

----------------------------------------

Please select an initialization item

----------------------------------------

0. Initialize IP information

1. Initialization profile

2. Initialize the storage pool

q. Quit

----------------------------------------

Please enter your choice: 2

9. 选择磁盘。

根据规划,选择需要加入存储池的磁盘。当选择多个磁盘时,选项之间,连续

选择使用 ‘-(连字号)’ 进行分隔,非连续选择,使用 ‘,(逗号)’ 进

行分隔。

------------------------------

Select disk

------------------------------

0. sdb 50.0G VMware unused

1. sdc 50.0G VMware unused

2. sdd 50.0G VMware unused

q. Quit

------------------------------

Please enter your choice(e.g. 0-3 or 1,3,5 or 0-3,5): 0-1,2

10. 为存储池命名。

如果直接回车,就会使用默认的 bkpool 进行命名。

Please enter the name of the pool (default: bkpool): dbpool

步骤6 返回主菜单。

存储池创建完成后,按【回车键】,返回主菜单。

Pool initialization succeeded

Please enter the Enter key to return:

Page 12: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 11 -

步骤7 退出主菜单。

----------------------------------------

Please select an initialization item

----------------------------------------

0. Initialize IP information

1. Initialization profile

2. Initialize the storage pool

q. Quit

----------------------------------------

Please enter your choice: q

步骤8 验证安装。

安装过程无报错,检查 obstorage 进程是否存在。

]# ps aux |grep cdm-storage.jar

系统显示如下信息:

root 11167 0.1 0.1 39201524 440780 ? Sl Sep05 10:17 java -jar

/opt/obstorage/bin/cdm-storage.jar

步骤9 重启主机,完成安装。

]# shutdown -r now

Page 13: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 12 -

第五章 Client 端安装

5.1 Linux(Unix)平台安装

5.1.1 简介

Linux(Unix) 平台根据系统版本不同,有不同的安装包,请根据实际系统类型,选择

对应的安装包,进行安装。目前支持以下版本,此处以 CentOS 7.5 为例,进行说明。

其它 Linux 版本安装方法类似。

⚫ AIX6.x

⚫ AIX7.x

⚫ HP-UX 11.23

⚫ EL6:RHEL6.x、CentOS6.x

⚫ EL7:RHEL7.x、CentOS7.x

⚫ SUSE11

⚫ Solaris10

说明:如果使用 iSCSI 方式连接,需要提前安装 iSCSI Initiator,以

CentOS7.5 为例,需安装 iscsi-initiator-utils RPM 包,其它系统请自行

安装对应的 iSCSI Initiator 客户端。

5.1.2 安装 obclient

步骤1 上传安装包到主机“/usr/local/src”目录下。

]# cd /usr/local/src/

]# ll

系统显示如下信息:

total 35804

-rw-r--r-- 1 root root 36660493 Sep 9 21:47 obclient-linux.****.run

其中标红部分为软件包名称,请以实际获取到的为准。

Page 14: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 13 -

步骤2 赋权

为安装文件赋予执行权限。

]# chmod 755 *.run

步骤3 安装 obclient。

]# ./obclient-linux.****.run

系统显示如下信息:

Verifying archive integrity... 100% All good.

Uncompressing CDM linux client installer 100%

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

5.1.3 客户端初始化

5.1.3.1 Linux 客户端初始化

步骤1 执行客户端初始化。

]# /opt/obclient/bin/initClient.exe

步骤2 填写备份 IP。

如果没有规划专门的备份 IP,填写其它可以访问到该主机的 IP。

Please enter backup IP (ipv4): 10.0.*.*

步骤3 选择连接类型。

根据实际规划,选择合适的连接器类型(此处以 iSCSI)为例。

------------------------------

Please select the connector type

------------------------------

0. ISCSI

1. FC

2. IB

s. Save and exit

q. Quit

Page 15: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 14 -

------------------------------

Please enter your choice: 0

步骤4 选择连接通道。

选择合适的通道。

------------------------------

Please select the initiator name

------------------------------

0. iqn.1994-05.com.redhat:472676e6f5b8

q. Quit

------------------------------

Please enter your choice: 0

步骤5 完成初始化。

保存退出后,完成客户端的初始化。

------------------------------

Please select the connector type

------------------------------

0. ISCSI

1. FC

2. IB

s. Save and exit

q. Quit

------------------------------

Please enter your choice: s

5.1.3.2 Unix 客户端初始化

Unix 客户端初始化需要手工进行,使用以下命令进行编辑,编辑完成后,保存退出。

$ vi /opt/obclient/etc/config.ini

系统显示如下信息:

[OBCLIENT]

ip = 10.0.*.*

[CONNECTOR]

guid = fe80:0000:0000:0000:0002:c903:000d:1949

Page 16: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 15 -

wwn = 10:00:00:00:c9:c4:87:df

iqn = iqn.localhost.hostid.7f000001

[LOG]

loglevel = DEBUG

以上内容仅为示例,请根据主机实际情况填写。

选项的简单说明如下所示:

⚫ [OBCLIENT]:填写备份 IP

⚫ [CONNECTOR]:填写具体的连接方式

iqn:填写对应 iSCSI 方式

wwn:填写对应 FC 方式

⚫ guid:填写对应 IB 方式

⚫ [LOG]:默认 Log 等级为 DEBUG 级

5.1.4 验证安装

安装过程无报错,检查 obclient 进程是否存在。

]# ps aux |grep jar

系统显示如下信息:

root 1858 1.8 0.9 3488908 36660 pts/0 Sl 00:14 0:00 java -jar

/opt/obclient/bin/cdm-client.jar

5.2 window 客户端安装

5.2.1 前提条件

window 客户机上需要提前安装以下软件:

⚫ Microsoft .NET Framework 3.5

⚫ Visual C ++ Redistributable for Visual Studio 2015

⚫ Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)

⚫ Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)

Page 17: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 16 -

且需要关闭 Windows 防火墙。

5.2.2 操作步骤

步骤1 上传安装文件到任意目录下,此处上传到 D:\ 下,鼠标左键双击

obclient-windows.x86_64-****.exe 开始安装。

其中标红处的软件包名称请以实际获取到的为准。

步骤2 根据提示,点击【下一步】,完成安装。

步骤3 服务配置。

1. 启动 Microsoft iSCSI Initiator Service 服务。

2. 更改 CDM-Client 登录帐户。

3. 选择用户。

4. 更改登录帐户为 Administrator。

Page 18: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 17 -

5. 更新 Administrator 的登录密码。

6. 将“C:\eCloudTech\CDM\obclient\bin\agent\bin”目录下的“msvcr100.dll”

文件拷贝到“C:\Windows\System32”路径下。

如果路径下已存在该文件,则覆盖。

7. 重启 CDM-Client 服务。

Page 19: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 18 -

步骤4 验证安装。

安装过程无报错,检查 CDM-Client 服务正常运行。

Master 端可以正常发现该客户端则表示正常。

Page 20: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 19 -

第六章 部署微服务环境(可选项)

说明:微服务环境仅部署在 Storage 端。

6.1 部署 docker 环境

步骤1 安装 docker 版 obclient。

]# ./obclient-linux.****.run

其中标红部分为软件包名称,软件包名称请根据实际情况修改。

系统显示如下信息:

Verifying archive integrity... 100% All good.

Uncompressing CDM linux client installer 100%

步骤2 检查 docker 环境是否安装。

]# rpm -qa |grep docker

系统显示如下信息:

docker-ce-18.06.1.ce-3.el7.x86_64

步骤3 启动 docker 服务。

]# systemctl start docker.service

步骤4 导入 docker 测试镜像。

部署过程中所需的 docker 镜像请联系云信达工程师获取(下同)。

]# docker load -i hello-world.tar

系统显示如下信息:

Page 21: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 20 -

ee83fc5847cb: Loading layer

[==================================================>]

3.584kB/3.584kB

Loaded image: hello-world:latest

步骤5 启动测试镜像。

]# docker run hello-world

系统显示如下信息:

Hello from Docker!

This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:

1. The Docker client contacted the Docker daemon.

2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

(amd64)

3. The Docker daemon created a new container from that image which runs the

executable that produces the output you are currently reading.

4. The Docker daemon streamed that output to the Docker client, which sent it

to your terminal.

To try something more ambitious, you can run an Ubuntu container with:

$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

https://hub.docker.com/

For more examples and ideas, visit:

https://docs.docker.com/engine/userguide/

步骤6 设置 docker 开机启动。

验证成功后,将 docker 服务设置为开机启动。

]# systemctl enable docker.service

系统显示如下信息:

Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to

/usr/lib/systemd/system/docker.service.

Page 22: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 21 -

6.2 部署 registry 服务(可选项)

步骤1 导入 registry 镜像。

该步骤只需要在项目的第一个存储节点执行。

]# docker load -i registry.tar

系统显示如下信息:

4da3a15c1916: Loading layer

[==================================================>]

5.06MB/5.06MB

f824ed3a5fe3: Loading layer

[==================================================>]

7.937MB/7.937MB

7a2efe6c629c: Loading layer

[==================================================>]

22.79MB/22.79MB

5030e231e2c6: Loading layer

[==================================================>]

3.584kB/3.584kB

00b6cd9831d7: Loading layer

[==================================================>]

2.048kB/2.048kB

Loaded image: registry:latest

步骤2 配置 registy 服务的信任关系。

该步骤在项目的每个存储节点都需要执行。

]# vim /etc/docker/daemon.json

系统显示如下信息:

{

"insecure-registries": ["10.0.60.27:5000"]

}

步骤3 重启 docker 使配置生效。

]# systemctl restart docker

Page 23: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 22 -

]# docker run -d -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED="true"

--restart=always --name registry registry

系统显示如下信息:

afec12352a9cefe3bb250ac3c3cfcce799388c2a008dc08a13a0e05b10cc18fb

步骤4 配置 config.ini 文件,新增以下条目。

]# vim /opt/obstorage/etc/config.ini

系统显示如下信息:

[OBSTORAGE]

… 省略 …

repo = 10.0.*.*:5000

步骤5 重启 obstorage 进程,使配置文件生效。

]# /etc/init.d/cdm-obstorage stop

]# /etc/init.d/cdm-obstorage start

6.3 部署微服务所需 DB 镜像

步骤1 导入 centos 基础镜像。

]# cat centos74-dockerbase.tar.gz |docker import - centos:7.4

系统显示如下信息:

sha256:7f32533b2c86aa272cf15ab84623ab682cb5e1bc362629815bdb1f7a75a7581e

步骤2 验证镜像导入情况。

]# docker images

系统显示如下信息:

REPOSITORY TAG IMAGE ID CREATED

SIZE

centos 7.4 7f32533b2c86 13 seconds ago

1.07GB

Page 24: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 23 -

hello-world latest 2cb0d9787c4d 2 months ago

1.85kB

registry latest b2b03e9146e1 2 months ago

33.3MB

步骤3 生成数据库镜像。

生成的镜像名称由三部分组成,请勿擅自变更,以免影响微服务使用,以

mysql5r6.zip 镜像为例,规划镜像名为 10.0.*.*:5000/mysql:5r6,其中名称各

组成部分说明如下表所示:

名称 说明

10.0.*.*:5000 项目内 registy 服务地址和端口号

mysql 数据库产品名

5r6 数据库具体版本(需要与镜像文件保持一致)

⚫ 生成 mysql 镜像,这里以生成 mysql 5.6 镜像为例。

1. 解压 docker file 文件。

]# unzip mysql5r6.zip

2. 生成镜像。

]# cd mysql5r6/

]# docker build -t 10.0.*.*:5000/mysql:5r6

系统显示如下信息:

Sending build context to Docker daemon 98.51MB

Step 1/12 : FROM centos:7.4

---> 7f32533b2c86

... 省略 ...

Removing intermediate container b2780ac4cbad

---> faa46eb71d1c

Step 12/12 : CMD /usr/sbin/sshd -D

Page 25: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 24 -

---> Running in 668bd663bffb

Removing intermediate container 668bd663bffb

---> d211f2758c18

Successfully built d211f2758c18

Successfully tagged 10.0.*.*:5000/mysql:5r6

3. 将生成的镜像推送到 registry 中。

]# docker push 10.0.*.*:5000/mysql:5r6

系统显示如下信息:

The push refers to repository [10.0.*.*:5000/mysql]

c5ee2a36c8ec: Pushed

61ee510b66f1: Pushed

99d12445f949: Pushed

ce256889e2e4: Pushed

3dd30dca3876: Pushed

e3e39cc0ac20: Pushed

bdb78733421c: Pushed

e41252ebef2c: Pushed

0c65e9c51a58: Pushed

5r6: digest:

sha256:8ec1c7deb30323d45b1952d7415317801c254dd58a8ace876396af79b6eaa93b

size: 2215

4. 验证镜像推送成功。

删除本地镜像。

]# docker rmi 10.0.*.*:5000/mysql:5r6

查看本地镜像

]# docker images

系统显示如下信息:

REPOSITORY TAG IMAGE ID CREATED

SIZE

centos 7.4 7f32533b2c86 4 hours ago

1.07GB

hello-world latest 2cb0d9787c4d 2 months ago

1.85kB

Page 26: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 25 -

registry latest b2b03e9146e1 2 months ago

33.3MB

重新下载 mysql 镜像。

]# docker pull 10.0.*.*:5000/mysql:5r6

系统显示如下信息:

5r6: Pulling from mysql

9f63b72005d6: Already exists

8c1cdcdb1a42: Pull complete

23befd1e6856: Pull complete

347dd31cca80: Pull complete

a2313ba88e2d: Pull complete

3aa7a5251bf1: Pull complete

446e796b0adb: Pull complete

dedfffe07b2b: Pull complete

1abbc8592f79: Pull complete

Digest:

sha256:8ec1c7deb30323d45b1952d7415317801c254dd58a8ace876396af79b6eaa93b

Status: Downloaded newer image for 10.0.*.*:5000/mysql:5r6

⚫ 生成 oracle 镜像,这里以生成 oracle 12c R2 镜像为例

1. 解压 docker file 文件。

]# unzip oracle12cr201.zip

2. 生成镜像

]# cd oracle12cr201/

]# docker build -t 10.0.*.*:5000/oracle:12cr201 .

系统显示如下信息:

Sending build context to Docker daemon 3.704GB

Step 1/48 : FROM centos:7.4

---> 637ee411353d

… 省略 …

Step 48/48 : CMD /usr/sbin/sshd -D

---> Running in 01f9ea33ee4a

Page 27: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 26 -

Removing intermediate container 01f9ea33ee4a

---> 49c204f57467

Successfully built 49c204f57467

Successfully tagged 10.0.*.*:5000/oracle:12cr201

3. 将生成的镜像推送到 registry 中。(参见“生成 mysql 镜像”第 3 步)。

4. 验证镜像推送成功。(参见“生成 mysql 镜像”第 4 步)。

Page 28: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 27 -

第七章 卸载

7.1 简介

当安装失败或者需要卸载安装时,可以参考如下步骤。

7.2 master 端卸载

7.2.1 卸载应用

步骤1 停止 tomcat。

]# systemctl stop tomcat

步骤2 检查 tomcat 进程是否存在。

]# ps aux |grep '/usr/local/cdm' |grep -v grep

如果 tomcat 进程未正常结束,使用以下命令强制停止。

]# ps -ef |awk '$0~/\/usr\/local\/cdm/{print $2}' |xargs kill -9

7.2.2 清理 tomcat 相关目录

步骤1 清理相关目录。

]# rm -rf /usr/local/jdk1.8.0_162/

]# rm -rf /usr/local/cdm/

步骤2 清理应用开机启动信息。

]# systemctl disable tomcat

]# rm -f /usr/lib/systemd/system/tomcat.service

7.2.3 卸载数据库

步骤1 停止数据库。

]# /etc/init.d/mysql stop

Page 29: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 28 -

步骤2 检查数据库是否成功关闭。

]# ps aux |grep mysql |grep -v grep

如果没有成功关闭,使用以下命令强制关闭。

]# ps -ef |awk '$0~/mysql/&&$0!~/awk/{print $2}' |xargs kill -9

步骤3 卸载数据库。

]# rpm -qa |egrep 'perl-Data-Dumper|^MySQL' |xargs rpm -e --nodeps

7.2.4 清理遗留文件

]# rm -rf /usr/my.cnf /var/lib/mysql/

Page 30: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 29 -

7.3 Storage 端卸载

7.3.1 简单删除

步骤1 停止 SCST 服务。

]# /etc/init.d/scst stop

系统显示如下信息:

Stopping SCST

步骤2 停止 obstorage 服务。

]# /etc/init.d/cdm-obstorage stop

验证 obstorage 服务停止。

]# ps aux |grep 'cdm-storage.jar' |grep -v grep

系统显示如下信息:

root 19450 0.4 0.8 3659060 35104 pts/0 Sl 16:48 0:00 java -jar

/opt/obstorage/bin/cdm-storage.jar

如果没有正常停止的话,使用以下命令,强制停止。

]# ps -ef |awk '$0~/cdm-storage\.jar/&&$0!~/awk/{print $2}' |xargs kill -9

步骤3 取消 obstorage 服务开机启动。

]# chkconfig --del cdm-obstorage

步骤4 删除 obstorage 服务相关文件。

]# rm -rf /opt/obstorage/ /etc/init.d/cdm-obstorage

7.3.2 深度删除

说明:深度删除前需要完成 Storage 的简单删除,且深度删除操作会清

除所有 storage 端上的相关数据,请谨慎执行。

Page 31: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 30 -

步骤1 查看当前存在的存储池。

]# zpool status

系统显示如下信息:

pool: bkpool

state: ONLINE

scan: none requested

config:

NAME STATE READ WRITE CKSUM

bkpool ONLINE 0 0 0

sdb ONLINE 0 0 0

errors: No known data errors

步骤2 销毁存储池。

]# zpool destroy -f bkpool

步骤3 删除相关 RPM 包。

]# rpm -qa |egrep

'kmod-(spl|zfs)|lib(nvpair1|uutil1|zfs2|zpool2)|scst(admin)*|spl-|^zfs-' |xargs rpm

-e --nodeps

7.3.3 微服务删除(可选项)

步骤1 停止 docker 服务。

停止 docker 服务并去除开机启动

]# systemctl stop docker.service

]# systemctl disable docker.service

系统显示如下信息:

Removed symlink /etc/systemd/system/multi-user.target.wants/docker.service.

步骤2 删除 docker RPM 包。

]# rpm -qa |egrep '^container|docker' |xargs rpm -e --nodeps

Page 32: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 31 -

步骤3 释放 docker 占用的空间。

]# rm -rf /var/lib/docker/

Page 33: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 32 -

7.4 Client 端卸载

说明:Client 端卸载需要关停客户端上对应的数据库软件。

7.4.1 Linux 客户端卸载

步骤1 停止 obclient 相关进程。

]# ps -ef |awk '$0~/obclient/&&$0!~/awk/{print $2}' |xargs kill -9

步骤2 去除 obclient 的开机启动权限。

]# chkconfig --del cdm-client

步骤3 清理普通挂载卷。

1. 确认块设备的提供者。

]# df -P |egrep '/dev/sd[a-z]+[^0-9]'

系统显示如下信息:

/dev/sdj 50000444 53132 47273444 1%

/obmnt/c-rvccztrz

]# cat /sys/block/sdj/device/vendor

ECOB

2. 卸载已挂载的块设备。

如果 vendor 的值是 ECOB,那么使用 umount 卸载该设备。

]# umount /dev/sdj

步骤4 清理加密挂载卷。

]# df -P 2>/dev/null |awk '$1~/veracrypt/{print $1}' |xargs umount -f

如果磁盘无法正常卸载(device is busy),请使用 lsof 或 fuser 命令,清理

占用资源的进程后,重新尝试。

步骤5 清理 obclient 文件残留。

Page 34: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 33 -

]# rm -rf /opt/obclient/ /etc/init.d/cdm-client

7.4.2 Windows 客户端卸载

步骤1 进入 C:\eCloudTech\ 目录,双击 uninst.exe 启动卸载。

Page 35: eCloud Data Master 安装手册 V2.5

eCloud Data Master V2.5.3 安装手册

- 34 -

步骤2 检查 CDM-Client 服务已被正常删除。