OGG监控平台之Oracle GoldenGate Director
Oracle GoldenGate Director可以简化GoldenGate的监控和管理,可以通过图形界面或者web浏览器方便快捷的维护整个环境中的GoldenGate组件。OGG Director是部署在Oracle的中间件Weblogic Server上的Web应用,OGG Director可以安装在任何机器上,可以管理远程的OGG实例,远程的OGG实例不需要做任何的额外操作。
一、从Docker Hub或阿里云下载小麦苗上传的镜像文件
- 小麦苗的Docker Hub的地址:https://hub.docker.com/u/lhrbest
- OGG Director的地址:https://hub.docker.com/r/lhrbest/lhroggdirector
# 下载镜像
docker pull registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0
# 打tag
docker tag registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0 lhrbest/lhroggdirector:2.0
执行过程:
[root@docker36 ~]# docker search lhrogg
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
lhrbest/lhroggdirector 0
[root@docker36 ~]#
[root@docker36 ~]# docker pull registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0
2.0: Pulling from lhrbest/lhroggdirector
5ff999edc5fc: Already exists
5ff4a6691229: Pull complete
fe95c761b383: Pull complete
Digest: sha256:a851a290e43aeb5f7bf7631a16c9d021841fe9256511018a96dbd4227973bbdd
Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0
registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0
[root@docker36 ~]# docker tag registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector:2.0 lhrbest/lhroggdirector:2.0
[root@docker36 ~]# docker images | grep lhrogg
lhrbest/lhroggdirector 2.0 12716be53680 2 hours ago 6.2GB
registry.cn-hangzhou.aliyuncs.com/lhrbest/lhroggdirector 2.0 12716be53680 2 hours ago 6.2GB
二、创建容器并启动OGG Director
用到的命令:
# 创建容器
docker run -d --name lhroggdirector -h lhroggdirector \
-p 230:22 -p 7001-7050:7001-7050 \
--privileged=true \
lhrbest/lhroggdirector:2.0 /usr/sbin/init
# 进入容器
docker exec -it lhroggdirector bash
# 启动数据库
systemctl start mysql
# 启动weblogic
nohup /u01/ogg/Oracle/GG_Directorgg-director/domain/startWebLogic.sh &
# 网页登陆
http://192.168.1.36:7001/acon/
admin/admin
# 客户端设置
/u01/ogg/Oracle/GoldenGateDirector/bin/run-admin.sh
执行过程:
[root@docker36 ~]# docker run -d --name lhroggdirector -h lhroggdirector \
> -p 230:22 -p 7001-7050:7001-7050 \
> --privileged=true \
> lhrbest/lhroggdirector:2.0 /usr/sbin/init
933783a8905c05816a6dbd9bc7cbde770d618e164bce80a3cd156691ed455007
[root@docker36 ~]# docker exec -it lhroggdirector bash
[root@lhroggdirector /]#
[root@lhroggdirector /]# systemctl start mysql
[root@lhroggdirector /]# systemctl status mysql
● mysqld.service - LSB: start and stop MySQL
Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled)
Active: active (running) since Thu 2020-09-10 10:59:21 CST; 15s ago
Docs: man:systemd-sysv-generator(8)
Process: 146 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=0/SUCCESS)
CGroup: /docker/933783a8905c05816a6dbd9bc7cbde770d618e164bce80a3cd156691ed455007/system.slice/mysqld.service
├─167 /bin/sh /usr/local/mysql//bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/lhroggdirector.pid
└─379 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql//lib/plugin --user=mysql --log-error=lhroggdirector.err --pid-file=/usr/local/mysql/data/lhroggdirector.pid --port=3306
Sep 10 10:59:21 lhroggdirector systemd[1]: Starting LSB: start and stop MySQL...
Sep 10 10:59:21 lhroggdirector mysqld[146]: Starting MySQL[ OK ]
Sep 10 10:59:21 lhroggdirector systemd[1]: Started LSB: start and stop MySQL.
[root@lhroggdirector /]# nohup /u01/ogg/Oracle/GG_Directorgg-director/domain/startWebLogic.sh &
[1] 449
[root@lhroggdirector /]# nohup: ignoring input and appending output to ‘nohup.out’
[root@lhroggdirector /]#
[root@lhroggdirector /]# tail -n 6 nohup.out
<Sep 10, 2020 2:59:57 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.17.0.6:7001 for protocols iiop, t3, ldap, snmp, http.>
<Sep 10, 2020 2:59:57 AM UTC> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 127.0.0.1>
<Sep 10, 2020 2:59:57 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Sep 10, 2020 2:59:57 AM UTC> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "localhost" for domain "domain" running in Development Mode>
<Sep 10, 2020 2:59:57 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<Sep 10, 2020 2:59:57 AM UTC> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
日志最后显示“Server started in RUNNING mode”,表示启动正常。
三、登陆web
登录地址为:http://192.168.1.35:7001/acon/
用户名和密码都是admin
登陆之后为空页面:
四、添加待监控的OGG实例
4.1 登陆远程桌面
需要登陆远程桌面xrdp,本容器已安装,端口为7050,直接使用mstsc登陆即可。使用快捷键Windows+R键,然后输入mstsc即可:
登陆用户为root,密码为lhr
4.2 启动客户端界面
运行命令“/u01/ogg/Oracle/GoldenGateDirector/bin/run-admin.sh”调出director的客户端,输入用户名和密码都是admin,server为127.0.0.1:7001,如下图所示:
WU代表:Windows或Unix操作系统,其它参数大家都懂的。分别添加OGG源端和目标端,添加完成后,点击Save保存后,可以在web界面上看到效果:
在界面上可以执行很多操作,例如执行ggsci命令:
还有很多其他功能,这里不再演示了。
怎么样,是不是很爽,是不是非常方便呢,文末记得点赞哈。
- 点赞
- 收藏
- 关注作者
评论(0)