OGG|Oracle GoldenGate 微服务架构

OGG|Oracle GoldenGate 微服务架构_第1张图片

作者 | JiekeXu

来源 |公众号 JiekeXu DBA之路(ID: JiekeXu_IT)

大家好,我是 JiekeXu,很高兴又和大家见面了,今天和大家一起来学习利用 OGG 微服务架构,欢迎点击上方蓝字关注我,标星或置顶,更多干货第一时间到达!

前文讲述了 利用 OGG 迁移 Oracle11g 到 19C,学习了 OGG 的经典架构,现在来学习一下 Oracle GoldenGate 微服务架构,Oracle GoldenGate 微服务架构(MA)是从 GoldenGate 12.3 开始引入,目前最新的 Oracle GoldenGate(OGG)微服务架构是 21.4 版本。

OGG|Oracle GoldenGate 微服务架构_第2张图片


OGG 全企业解决方案

基于微服务的实时数据事务与事件的复制

OGG|Oracle GoldenGate 微服务架构_第3张图片


GoldenGate 平台解决方案功能

OGG|Oracle GoldenGate 微服务架构_第4张图片


Oracle GoldenGate 微服务中包括哪些内容?

核心变化有:
• 改进了CLI
•类似于 SQL*Plus。可以使用 AdminClient 连接到本地服务器或任何远程服务器上的任何 OGG Microservices 部署。
• 更安全的是,它现在需要用户名/密码来更改 OGG。
• 本地身份验证–创建本地凭据存储,以安全地存储每个常用部署的密码
• 美化了 WebUI
• 直观的图形用户界面,可在大多数浏览器上用于管理您的 GoldenGate 环境。
• 可以从 CLI 执行的任何操作都可以从 Web UI 执行。
• 减少学习曲线,并消除语法问题。
• REST API
•已经构建了一个完整的 Rest API,以便优化 GoldenGate 复制的开发和自动化。
• Web 用户界面是使用此 API 构建的。

Oracle GoldenGate 微服务体系结构

OGG|Oracle GoldenGate 微服务架构_第5张图片

OGG MA 微服务架构由以下 5 个部分组成:

  • Service Manager

  • Administration Server

  • Distribution Server

  • Receiver Server

  • Performance Metrics Server

OGG|Oracle GoldenGate 微服务架构_第6张图片

Service Manager: Service Manager 是 OGG MA  的守护进程服务。它可以管理,监控和起停 MA 的其他服务。而且通过 Service Manager 可以管理多个本地 OGG 的部署。

Administration Server: Administration Server 是管理和配置 OGG 数据同步进程的服务。您可以配置数据库登录凭据,添加更改抽取(extract)和应用(replicat)进程,以及查看运行报告,统计信息,添加附加日志,配置 checkpoint、heartbeat 表等。Administration Server 将会取代 GGSCI,当然在 MA 架构中仍然提供命令行工具AdminClient,绝大多数命令都是与经典架构相同的。

AdminClient 位于 OGG 安装目录的 bin 目录下:

OGG MA 架构需要通过以下的命令连接到 OGG 部署

通过预配的数据库凭据登录数据库

dblogin userid alias oggsrc

通过 help 命令查看帮助:

您也可以通过下面的链接查看详细的 AdminClient 命令手册。

https://docs.oracle.com/goldengate/c1230/gg-winux/GGSAU/how-use-admin-client.htm#GGSAU-GUID-84B33389-0594-4449-BF1A-A496FB1EDB29

OGG|Oracle GoldenGate 微服务架构_第7张图片

Distribution Server: Distribution Server 可以理解为 OGG 投递进程的替代者。在Distribution Server 之中,可以配置 trail 文件投递的源端和目标端,以及彼此联通的网络协议。

Receiver Server:Receiver Server 可以理解为 Collector 进程的替代者。它用来接收由Distribution Server 传送过来的 trail 文件。

下图显示了各种客户端(Oracle 产品,命令行,浏览器和程序化 REST API 接口),您可以使用它们来使用服务接口来管理部署。

OGG|Oracle GoldenGate 微服务架构_第8张图片

GoldenGate 提供了实时的、基于日志的变更数据捕获和在同构和异构系统之间的交付。这技术使您能够构建一个具有成本效益和低影响的实时数据集成和持续可用性解决方案。GoldenGate 以事务完整性从已提交的事务中复制数据,并将现有基础设施的开销降到最低。该架构支持一对多、多对多、级联、双向等多种数据复制拓扑。它的各种各样的用例包括实时业务智能; 查询卸载; 零停机升级和迁移; 和 Active-active 数据库用于数据分发、数据同步和高可用性。在 12.3 版中引入了微服务架构,作为一种新的管理架构支持 rest 的服务是GoldenGate 环境的一部分。支持 rest 的服务提供远程配置,通过 HTML5 网页、命令行界面和 api 进行管理和监控。

OGG MAA 架构

GoldenGate Hub 是一个架构概念,它将 GoldenGate 软件放置在与数据库不同的主机上操作,如图 2 所示。集线器必须在接近目标数据库的网络中,并期望网络延迟不应该超过2-3ms,或者通常小于 50 公里。这种架构的一个优点是它是隔离的来自源和目标数据库服务器的大部分 GoldenGate 资源使用,为应用程序启用更多的系统资源和数据库处理。另一个优点是,通过管理和,GoldenGate 的配置大大简化了从一个自包含的单一服务器监控整个 GoldenGate 基础设施,而不需要访问单独的 GoldenGate 安装在每个数据库服务器上。

OGG|Oracle GoldenGate 微服务架构_第9张图片


OUI 图形界面安装

OGG|Oracle GoldenGate 微服务架构_第10张图片

OGG|Oracle GoldenGate 微服务架构_第11张图片

使用 oggca 图形化创建服务管理器和部署。
易于使用的 WebUI 界面
用于部署的统一主页

OGG|Oracle GoldenGate 微服务架构_第12张图片

微服务架构重要文件位置

1. GLOBALS and ENCKEYS : $OGGDEPLOY/etc/conf/ogg/
2. Parameter files : $OGGDEPLOY/etc/conf/ogg/
3. Activity Logging : $OGGDEPLOY/etc/conf/logging
4. Report files : $OGGDEPLOY/var/lib/report/ (IE/IR)
5. SCA log files :$OGGDEPLOY/var/log/
6. Trails : $OGGDEPLOY/var/lib/data/
7. SQL scripts (ddl_setup etc.): $OGGHOME/lib/sql/legacy
8. COM : $OGGDEPLOY/var/temp
9. BR/checkpoint files : $OGGDEPLOY/var/run
10.Wallet for Trail file encryption : $OGGDEPLOY/var/lib/wallet
11. Datastore : $OGGDEPLOY/var/run/dirbdb or $OGGDEPLOY/var/run/dirlmdb
12. DB login Credential : $OGGDEPLOY/var/lib/credential
13. GG Service login wallet: $OGGDEPLOY/var/lib/credential/secureStore

部署之间的桥梁

OGG|Oracle GoldenGate 微服务架构_第13张图片

OGG|Oracle GoldenGate 微服务架构_第14张图片

OGG|Oracle GoldenGate 微服务架构_第15张图片

OGG|Oracle GoldenGate 微服务架构_第16张图片

Adminclient/GGSCI

微服务架构中没有 GGSCI
• 两者都是可以管理 GoldenGate 实例的命令界面
• 几乎所有 GGSCI 命令都可以运行,而无需对 Adminclient 进行任何更改
adminclient 的优势是什么?
• GG 用户身份验证,不同用户,不同角色,更安全
• 远程运行连接到任何 GG MA
• 支持 Linux 风格的命令历史记录和调用,
例如:

[ogg@oggma213dk bin]$ ./adminclient
Oracle GoldenGate Administration Client for Oracle
Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_210728.1047
Copyright (C) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
Oracle Linux 7, x64, 64bit (optimized) on Jul 28 2021 12:32:46
Operating system character set identified as US-ASCII.
OGG (not connected) 2> connect https://localhost:443 as oggadmin !
Password for 'oggadmin' at 'https://localhost':
Using default deployment 'oggma213dk'
OGG (https://localhost oggma213dk) 3> info all
Program Status Group Type Lag at Chkpt Time Since Chkpt
00:00:02 00:00:05
ADMINSRVR RUNNING
DISTSRVR RUNNING
PMSRVR RUNNING
RECVSRVR RUNNING
EXTRACT RUNNING EDB19MAC INTEGRATED


OGG (https://localhost oggma213dk) 4> info extract EDB19MAC, detail
Extract EDB19MAC Last Started 2021-09-02 03:26 Status RUNNING
Description Database 19c running on Mac Docker
Checkpoint Lag 00:00:00 (updated 00:00:00 ago)
Process ID 591
Log Read Checkpoint Oracle Integrated Redo Logs
2021-09-02 05:09:22
SCN 0.3656202 (3656202)
Settings Profile Default
Encryption Profile LocalWallet
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
et 4 1345 50 EXTTRAIL
Extract Source Begin End
Integrated Extract outbound server first scn: 0.3016529 (3016529)
Integrated Extract outbound server filtering start scn: 0.3016840 (3016840)


OGG 微服务 docker 镜像

• Docker Build files available on GIT, under Oracle Docker images
https://github.com/oracle/docker-images/tree/main/OracleGoldenGate/21c
• Download GoldenGate installation files from Oracle OTN download site
https://www.oracle.com/middleware/technologies/goldengate-downloads.html
• Run Docker Build command, giving the GG installation file to INSTALLER argument
$ docker build --tag=oracle/goldengate_microservices:21.3.0.0.0 \
--build-arg INSTALLER=213000_fbo_ggs_Linux_x64_Oracle_services_shiphome.zip .
Sending build context to Docker daemon
...
Successfully tagged oracle/goldengate_microsservices:21.3.0.0.0
• Check the image is successfully built
$ docker images oracle/goldengate-microservices:21*
REPOSITORY TAG IMAGE ID CREATED SIZE
oracle/goldengate-microservices 21.3.0.0.0 ff910ccc7f89 2 weeks ago 2.12GB
• Use docker run command to create the
container
$ docker run \
--name  \
-p :443 \
-e OGG_ADMIN= \
-e OGG_ADMIN_PWD= \
-e OGG_DEPLOYMENT= \
-v [:]/u02 \
-v [:]/u03 \
-v [:]/etc/nginx/cert \
oracle/goldengate_microservices:21.3.0.0.0


• Parameters
 - A name for the new container
(default: auto generated)
-p  - The host port to map to the Oracle
GoldenGate HTTPS server (default: no mapping)
-e OGG_ADMIN - The name of the administrative
account to create (default: oggadmin)
-e OGG_ADMIN_PWD - The password for the
administrative account (default: auto generated)
-e OGG_DEPLOYMENT - The name of the
deployment (default: Local)
-v /u02 - The volume used for persistent GoldenGate
data (default: use container storage)
-v /u03 - The volume used for temporary GoldenGate
data (default: use container storage)
-v /etc/nginx/cert - The volume used for storing the
SSL certificate for the HTTPS server (default: create a self-signed certificate)

Docker Run Example

$docker run --name oggma213dk -p 3443:443 -h oggma213dk \
-e OGG_ADMIN=oggadmin -e OGG_ADMIN_PWD=Uguess! -e OGG_DEPLOYMENT=oggma213dk \
-v /Users/werhe/Documents/Software/OracleDocker/OGG213Docker/u02:/u02 \
-v /Users/werhe/Documents/Software/OracleDocker/OGG213Docker/u03:/u03 \
-v /Users/werhe/Documents/Software/OracleDocker/OGG213Docker/cert:/etc/nginx/cert \
-d oracle/goldengate-microservices:21.3.0.0.0
$ docker ps -f name=oggma213dk
CONTAINER ID IMAGE COMMAND
abaa91df5aba oracle/goldengate-microservices:21.3.0.0.0
(healthy) 0.0.0.0:3443->443/tcp oggma213dk
CREATED STATUS PORTS NAMES
"/usr/local/bin/depl…" 14 hours ago Up About an hour

点击下方公众号,查看今日第二篇文章,了解 OGG 微服务部署及强大的图形化界面。

===========(OGG 系列未完待续)=============


参考链接

https://www.oracle.com/a/ocom/docs/goldengate-management-pack-datasheet.pdf
https://blogs.oracle.com/dataintegration/post/replication-paths-between-oracle-goldengate-msa-marketplace
https://docs.oracle.com/en/middleware/goldengate/core/21.3/ggmas/index.html
https://www.oracle.com/a/tech/docs/maa-goldengate-hub.pdf
https://www.likecs.com/show-204362261.html

https://www.bilibili.com/video/BV1ZA4y1f7yH?spm_id_from=333.999.0.0&vd_source=6cdb8b27487639ec92a5bec81de036c7

点击下方公众号“JiekeXu DBA之路”,欢迎关注我的公众号,一起学习新知识!

————————————————————————————
公众号:JiekeXu DBA之路
墨天轮:https://www.modb.pro/u/4347
CSDN :https://blog.csdn.net/JiekeXu
腾讯云:https://cloud.tencent.com/developer/user/5645107
————————————————————————————

cb9cca49de05706ed956bdf14fd5d9db.gif

Oracle 表碎片检查及整理方案

OGG|Oracle GoldenGate 基础

2021 年公众号历史文章合集整理

2020 年公众号历史文章合集整理

我的 2021 年终总结和 2022 展望

Oracle 19c  RAC 遇到的几个问题

利用 OGG 迁移 Oracle11g 到 19C

Oracle 查询表空间使用率超慢问题一则

国产数据库|TiDB 5.4 单机快速安装初体验

Oracle ADG 备库停启维护流程及增量恢复

Linux 环境搭建 MySQL8.0.28 主从同步环境

OGG|Oracle GoldenGate 微服务架构_第17张图片

你可能感兴趣的:(数据库,docker,大数据,linux,java)