Showing posts with label Service manager web UI access. Show all posts
Showing posts with label Service manager web UI access. Show all posts

Tuesday, June 20, 2023

Deploying Oracle Golden Gate (version: 21.3) Service Manager and Configuration in Silent mode (first time setup)

Deploying Oracle Golden Gate (version: 21.3) Service Manager and Configuration in Silent mode (first time setup)

As usual for the prereqs and definations on OGG deployment, please refer to the below blog:

We will breeze through the FS setup alone:

[root@vcentos79-oracle-sby1 ~]# vgs
  VG          #PV #LV #SN Attr   VSize   VFree
  appdata-vg    1   3   0 wz--n-  49.98g    5.98g
  centos        1   2   0 wz--n- <19.00g       0
  ostmpswp-vg   1   2   0 wz--n-   7.98g 1008.00m

[root@vcentos79-oracle-sby1 ~]# lvcreate -L 1000 appdata-vg -n oggdata-lv
  Rounding up size to full physical extent 1008.00 MiB
  Logical volume "oggdata-lv" created.

[root@vcentos79-oracle-sby1 ~]# mkfs.xfs /dev/appdata-vg/oggdata-lv
meta-data=/dev/appdata-vg/oggdata-lv isize=512    agcount=4, agsize=64512 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=258048, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=855, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

[root@vcentos79-oracle-sby1 ~]# cp /etc/fstab /etc/fstab_18jun23
[root@vcentos79-oracle-sby1 ~]# vi /etc/fstab

line added in /etc/fstab: /dev/appdata-vg/oggdata-lv /oggdata xfs defaults 0 0

[root@vcentos79-oracle-sby1 ~]# mkdir /oggdata
[root@vcentos79-oracle-sby1 ~]# mount /oggdata
[root@vcentos79-oracle-sby1 ~]# chown oracle:dba /oggdata

[root@vcentos79-oracle-sby1 ~]# ls -ld /oggdata
drwxr-xr-x. 2 oracle dba 6 Jun 18 16:53 /oggdata
[root@vcentos79-oracle-sby1 ~]# df -h /oggdata
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/appdata--vg-oggdata--lv 1005M   33M  973M   4% /oggdata
[root@vcentos79-oracle-sby1 ~]#

This completes the mountpoint setup for golden gate deployment.

TNS entry validation:
Ensure DB TNS entry is there in the $OH/network/admin/tnsnames.ora file

DBCASLNT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vcentos79-oracle-sby1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBCASLNT)
    )
  )

But mostly we will be EZConnect only during replication setup.

Verify none of the ports we are planning to use are already in use:

[root@vcentos79-oracle-sby1 ~]# netstat -plantu|grep -E "9100|9011|9012|9013|9014|9015"
[root@vcentos79-oracle-sby1 ~]#

Various install parameters:
Environment Variables:

export OGG_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1
export TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib

Other variables:
Service Manager Deployment home= /oggdata/oggsrvm01
Deployment name=oggdep01
Deployment Path=/oggdata/oggdep01
deployment user=ggsca
deployment pswd=ggsca
DBSchema=ggadmin
datastore home=/oggdata/oggdata01perf01

Silent mode install output:

[oracle@vcentos79-oracle-sby1 ~]$ export OGG_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1
[oracle@vcentos79-oracle-sby1 ~]$ export TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin
[oracle@vcentos79-oracle-sby1 ~]$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib
[oracle@vcentos79-oracle-sby1 ~]$ cd /u01/app/oracle/product/21.3.0/ogg_home_1/bin
[oracle@vcentos79-oracle-sby1 bin]$ ls -altr oggca.sh
-rwxr-x---. 1 oracle oinstall 10362 Dec 16  2020 oggca.sh
[oracle@vcentos79-oracle-sby1 bin]$

Command:
./oggca.sh -silent \
CONFIGURATION_OPTION=ADD \
DEPLOYMENT_NAME=oggdep01 \
ADMINISTRATOR_USER=ggsca \
ADMINISTRATOR_PASSWORD=ggsca \
SERVICEMANAGER_DEPLOYMENT_HOME=/oggdata/oggsrvm01 \
HOST_SERVICEMANAGER=127.0.0.1 \
PORT_SERVICEMANAGER=9100 \
SECURITY_ENABLED=false \
STRONG_PWD_POLICY_ENABLED=false \
CREATE_NEW_SERVICEMANAGER=true \
REGISTER_SERVICEMANAGER_AS_A_SERVICE=true \
INTEGRATE_SERVICEMANAGER_WITH_XAG=false \
EXISTING_SERVICEMANAGER_IS_XAG_ENABLED=false \
OGG_SOFTWARE_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1 \
OGG_DEPLOYMENT_HOME=/oggdata/oggdep01 \
ENV_LD_LIBRARY_PATH=${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib \
ENV_TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin \
FIPS_ENABLED=false \
SHARDING_ENABLED=false \
ADMINISTRATION_SERVER_ENABLED=true \
PORT_ADMINSRVR=9011 \
DISTRIBUTION_SERVER_ENABLED=true \
PORT_DISTSRVR=9012 \
NON_SECURE_DISTSRVR_CONNECTS_TO_SECURE_RCVRSRVR=false \
RECEIVER_SERVER_ENABLED=true \
PORT_RCVRSRVR=9013 \
METRICS_SERVER_ENABLED=true \
METRICS_SERVER_IS_CRITICAL=false \
PORT_PMSRVR=9014 \
UDP_PORT_PMSRVR=9015 \
PMSRVR_DATASTORE_TYPE=BDB \
PMSRVR_DATASTORE_HOME=/oggdata/oggdata01perf01 \
OGG_SCHEMA=ggadmin

Actual command output:

[oracle@vcentos79-oracle-sby1 bin]$ ./oggca.sh -silent \
> CONFIGURATION_OPTION=ADD \
> DEPLOYMENT_NAME=oggdep01 \
> ADMINISTRATOR_USER=ggsca \
> ADMINISTRATOR_PASSWORD=ggsca \
> SERVICEMANAGER_DEPLOYMENT_HOME=/oggdata/oggsrvm01 \
ENV_LD_LIBRARY_PATH=${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib \
ENV_TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin \
FIPS_ENABLED=false \
SHARDING_ENABLED=false \
ADMINISTRATION_SERVER_ENABLED=true \
PORT_ADMINSRVR=9011 \
DISTRIBUTION_SERVER_ENABLED=true \
PORT_DISTSRVR=9012 \
NON_SECURE_DISTSRVR_CONNECTS_TO_SECURE_RCVRSRVR=false \
RECEIVER_SERVER_ENABLED=true \
PORT_RCVRSRVR=9013 \
METRICS_SERVER_ENABLED=true \
METRICS_SERVER_IS_CRITICAL=false \
PORT_PMSRVR=9014 \
UDP_PORT_PMSRVR=9015 \
PMSRVR_DATASTORE_TYPE=BDB \
PMSRVR_DATASTORE_HOME=/oggdata/oggdata01perf01 \
OGG_SCHEMA=ggadmin> HOST_SERVICEMANAGER=127.0.0.1 \
> PORT_SERVICEMANAGER=9100 \
> SECURITY_ENABLED=false \
> STRONG_PWD_POLICY_ENABLED=false \
> CREATE_NEW_SERVICEMANAGER=true \
> REGISTER_SERVICEMANAGER_AS_A_SERVICE=true \
> INTEGRATE_SERVICEMANAGER_WITH_XAG=false \
> EXISTING_SERVICEMANAGER_IS_XAG_ENABLED=false \
> OGG_SOFTWARE_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1 \
> OGG_DEPLOYMENT_HOME=/oggdata/oggdep01 \
> ENV_LD_LIBRARY_PATH=${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib \
> ENV_TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin \
> FIPS_ENABLED=false \
> SHARDING_ENABLED=false \
> ADMINISTRATION_SERVER_ENABLED=true \
> PORT_ADMINSRVR=9011 \
> DISTRIBUTION_SERVER_ENABLED=true \
> PORT_DISTSRVR=9012 \
> NON_SECURE_DISTSRVR_CONNECTS_TO_SECURE_RCVRSRVR=false \
> RECEIVER_SERVER_ENABLED=true \
> PORT_RCVRSRVR=9013 \
> METRICS_SERVER_ENABLED=true \
> METRICS_SERVER_IS_CRITICAL=false \
> PORT_PMSRVR=9014 \
> UDP_PORT_PMSRVR=9015 \
> PMSRVR_DATASTORE_TYPE=BDB \
> PMSRVR_DATASTORE_HOME=/oggdata/oggdata01perf01 \
> OGG_SCHEMA=ggadmin

In order to register Service Manager as a system service/daemon, as a "root" user, execute the following script:
        (1). /oggdata/oggsrvm01/bin/registerServiceManager.sh

To execute the configuration scripts:
  1.Open a terminal window
  2.Login as "root"
  3.Run the script


Successfully Setup Software.
[oracle@vcentos79-oracle-sby1 bin]$

As roor user in other window:

[root@vcentos79-oracle-sby1 oggdata01perf01]# /oggdata/oggsrvm01/bin/registerServiceManager.sh
Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
----------------------------------------------------
     Oracle GoldenGate Install As Service Script
----------------------------------------------------
OGG_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1
OGG_CONF_HOME=/oggdata/oggsrvm01/etc/conf
OGG_VAR_HOME=/oggdata/oggsrvm01/var
OGG_USER=oracle
Running OracleGoldenGateInstall.sh...
Created symlink from /etc/systemd/system/multi-user.target.wants/OracleGoldenGate.service to /etc/systemd/system/OracleGoldenGate.service.
[root@vcentos79-oracle-sby1 oggdata01perf01]#

[root@vcentos79-oracle-sby1 oggdata01perf01]# systemctl status OracleGoldenGate
● OracleGoldenGate.service - Oracle GoldenGate Service Manager
   Loaded: loaded (/etc/systemd/system/OracleGoldenGate.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2023-06-18 17:17:53 BST; 2min 11s ago
 Main PID: 15820 (ServiceManager)
   CGroup: /system.slice/OracleGoldenGate.service
           └─15820 /u01/app/oracle/product/21.3.0/ogg_home_1/bin/ServiceManager --inventory '/oggdata/oggsrvm01/etc/con...

Jun 18 17:17:53 vcentos79-oracle-sby1 systemd[1]: Started Oracle GoldenGate Service Manager.
Jun 18 17:17:53 vcentos79-oracle-sby1 ServiceManager[15820]: 2023-06-18T17:17:53.804+0100 INFO | Configuring user a...led.
Jun 18 17:17:53 vcentos79-oracle-sby1 ServiceManager[15820]: 2023-06-18T17:17:53.897+0100 INFO | Configuring user a...re'.
Jun 18 17:17:53 vcentos79-oracle-sby1 ServiceManager[15820]: 2023-06-18T17:17:53.897+0100 WARN | Configuring user s...at'.
Jun 18 17:17:53 vcentos79-oracle-sby1 OracleGoldenGate.sh[15820]: Oracle GoldenGate Service Manager for Oracle
Jun 18 17:17:53 vcentos79-oracle-sby1 OracleGoldenGate.sh[15820]: Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_21...047
Jun 18 17:17:53 vcentos79-oracle-sby1 OracleGoldenGate.sh[15820]: Copyright (C) 1995, 2021, Oracle and/or its affili...ed.
Jun 18 17:17:53 vcentos79-oracle-sby1 OracleGoldenGate.sh[15820]: Oracle Linux 7, x64, 64bit (optimized) on Jul 28 2...:40
Jun 18 17:17:53 vcentos79-oracle-sby1 OracleGoldenGate.sh[15820]: Operating system character set identified as UTF-8.
Hint: Some lines were ellipsized, use -l to show in full.
[root@vcentos79-oracle-sby1 oggdata01perf01]#

Output to verify:
Message in the install session: "Successfully Setup Software."
Root.sh action validation: systemctl status OracleGoldenGate > active (running)

Next step:
Stop the OS firewall in the DB server.

[root@vcentos79-oracle-sby1 oggdata01perf01]# systemctl stop firewalld
[root@vcentos79-oracle-sby1 oggdata01perf01]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sun 2023-06-18 17:21:09 BST; 6min ago
     Docs: man:firewalld(1)
  Process: 845 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 845 (code=exited, status=0/SUCCESS)

Jun 18 16:21:57 vcentos79-oracle-sby1 systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 18 16:21:58 vcentos79-oracle-sby1 systemd[1]: Started firewalld - dynamic firewall daemon.
Jun 18 16:21:59 vcentos79-oracle-sby1 firewalld[845]: WARNING: AllowZoneDrifting is enabled. This is considered an ...now.
Jun 18 17:21:09 vcentos79-oracle-sby1 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Jun 18 17:21:09 vcentos79-oracle-sby1 systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@vcentos79-oracle-sby1 oggdata01perf01]#

Or Add port 9100 to exemption list.

Launch the Service Manager Portal using chrome browser:
url: http://127.0.0.1:59101 
[note this is a virtual box deployment, so I have forwarded host port 9100 to 59101]

Enter ggsca as user and password. You will see the screen shown below.





Next Step : Replication Setup

Thanks

OKV platform certificate rotation - pitfall , awareness!!!!

OKV version: 21.9 Setup: Multimaster R/W cluster Plan: https://docs.google.com/spreadsheets/d/e/2PACX-1vSaXXTjj9cE1fvYpNmsDNBOkTIw78yTwQ6a9o...