Skip to content

Commit 1c367dd

Browse files
First release of Oracle GoldenGate Veridata docker scripts (#2115)
Initial release. Signed-off-by: Arnab Nandi <arnab.x.nandi@oracle.com> Reviewed-by: Avi Miller <avi.miller@oracle.com>
1 parent 809e2da commit 1c367dd

18 files changed

+1521
-0
lines changed

Diff for: CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@
2828
/OracleWebCenterSites/ @prshshuk
2929
/OracleWebCenterPortal/ @dgothe
3030
/OracleWebLogic/ @mriccell
31+
/OracleVeridata/ @arnabnandioracle

Diff for: OracleVeridata/12.2.1.4/Dockerfile

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#Copyright (c) 2021 Oracle and/or its affiliates.
2+
#
3+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
#
5+
# ORACLE DOCKERFILES PROJECT
6+
# --------------------------
7+
# This is the Dockerfile for OGG Veridata Infrastructure 12.2.1.4.0
8+
#
9+
# HOW TO BUILD THIS IMAGE
10+
# -----------------------
11+
# The OGG Veridata Infrastructure image extends the Oracle FMW Infrastructure 12.2.1.4-191221 image, you must first build the Oracle FMW Infrastructure image.
12+
# Run:
13+
# $ docker build -f Dockerfile -t oracle/oggvdt:12.2.1.4.0 .
14+
#
15+
# IMPORTANT
16+
# ---------
17+
# The resulting image of this Dockerfile contains a OGG Veridata Infrastructure.
18+
#
19+
# ----------------------------------------------------------------------------------------------
20+
21+
ARG FMW_VERSION=${FMW_VERSION}
22+
23+
FROM oracle/fmw-infrastructure:${FMW_VERSION}
24+
25+
ARG VERIDATA_VERSION
26+
ARG INSTALLER_VERSION
27+
ARG INSTALLER
28+
ARG PATCH_FILE
29+
ARG OWNER_GROUP
30+
31+
32+
33+
# Common environment variables required for this build
34+
# ----------------------------------------------------
35+
ENV VDT_PKG=${INSTALLER} \
36+
VDT_JAR=fmw_${INSTALLER_VERSION}_ogg*.jar \
37+
ORACLE_HOME=/u01/oracle \
38+
PATH=$PATH:/u01/oracle/oracle_common/common/bin:/u01/oracle/container-scripts \
39+
HEALTHCHECK_SCRIPT=/u01/oracle/container-scripts/healthCheck.sh \
40+
VERIDATA_ADMIN_SERVER="false" \
41+
VERIDATA_MANAGED_SERVER="false" \
42+
VERIDATA_AGENT="false" \
43+
DOMAIN_NAME="base_domain" \
44+
DOMAIN_ROOT="${DOMAIN_ROOT:-/u01/oracle/user_projects/domains}" \
45+
PATCH_FILE_LOCATION=/u01 \
46+
SERVER_START="False" \
47+
PATCH_FILE=${PATCH_FILE}
48+
49+
50+
51+
# Setup subdirectory for Veridata install package and container-scripts
52+
# -----------------------------------------------------------------
53+
RUN mkdir -p /u01 && \
54+
chmod a+xr /u01 && \
55+
export PATH=/usr/sbin:${PATH}
56+
57+
58+
# Copy packages
59+
# -------------
60+
COPY $VDT_PKG install.file oraInst.loc /u01/
61+
62+
63+
# Install
64+
# ------------------------------------------------------------
65+
66+
USER oracle
67+
RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$VDT_PKG && cd - && \
68+
$JAVA_HOME/bin/java -jar /u01/$VDT_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME && \
69+
rm /u01/$VDT_JAR /u01/$VDT_PKG && \
70+
rm -rf /u01/oracle/cfgtoollogs
71+
72+
73+
# Copy packages and scripts
74+
# -------------------------
75+
USER root
76+
COPY container-scripts/* /u01/oracle/container-scripts/
77+
COPY vdt.env vdtagent.env ${PATCH_FILE} /u01/oracle/
78+
RUN chmod a+xr /u01/oracle/container-scripts/*.* &&\
79+
chmod a+xr /u01/oracle/${PATCH_FILE} && \
80+
mkdir $ORACLE_HOME/temp && \
81+
chown ${OWNER_GROUP} -R $ORACLE_HOME/temp && \
82+
chown ${OWNER_GROUP} -R $ORACLE_HOME
83+
84+
USER oracle
85+
RUN /u01/oracle/container-scripts/applyRollbackPatch.sh
86+
RUN rm /u01/oracle/$PATCH_FILE ; exit 0
87+
HEALTHCHECK --start-period=5m --interval=2m CMD ${HEALTHCHECK_SCRIPT}
88+
WORKDIR ${ORACLE_HOME}
89+

Diff for: OracleVeridata/12.2.1.4/README.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
# Oracle GoldenGate (OGG) Veridata
3+
4+
## Overview
5+
6+
This Docker configuration has been used to create the Oracle GoldenGate Veridata image. The README facilitates the configuration and environment set up for DevOps users. This project includes the creation of an Oracle GoldenGate Veridata domain and agent.
7+
8+
9+
## Prerequisites
10+
11+
Use the docker network command to create a network for the Admin, Managed Server and optional repository database (if necessary).
12+
13+
`docker network create -d bridge VdtBridge`
14+
15+
## Building the Docker Image
16+
17+
1. Pull the Oracle FMW Infrastructure Docker image:
18+
19+
https://github.com/oracle/docker-images/tree/main/OracleFMWInfrastructure/dockerfiles/12.2.1.4
20+
21+
Use `docker tag` to tag it to `oracle/fmw-infrastructure:12.2.1.4.0-210701`
22+
23+
2. Oracle Database:
24+
25+
Oracle Database is required to install Oracle GoldenGate Veridata repository.
26+
You can use an existing Oracle Database or build a Oracle Database image.
27+
28+
Build and deploy an Oracle Database container using the provided scripts in the following link:
29+
30+
https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance
31+
32+
33+
3. Oracle GoldenGate Veridata Installer:
34+
35+
Download the Oracle GoldenGate Veridata 12.2.1.4.0 Installer in to your local directory from the following location:
36+
37+
https://www.oracle.com/middleware/technologies/goldengate-downloads.html
38+
39+
40+
4. Latest Bundle Patch (optional but recommended)
41+
42+
1. Download the latest bundle patch. Go to https://support.oracle.com and login.
43+
2. Navigate to *Patch & Updates* and search for product patch.
44+
3. Run `buildContainerImage.sh`
45+
46+
```bash
47+
#!/bin/bash
48+
49+
Usage: buildContainerImage.sh -v [version]
50+
Builds a container Image for Oracle GoldenGate Veridata.
51+
52+
Parameters:
53+
-v: Release version to build. Default is 12.2.1.4.0
54+
-i: OGG Veridata Installer zip file location
55+
-f: FMW Release version.Default is 12.2.1.4-210701
56+
-p: Patch file
57+
-h: Help
58+
```
59+
For example:
60+
`buildContainerImage.sh -v 12.2.1.4-210630 -i fmw_12.2.1.4.0_ogg_Disk1_1of1.zip -p p32761281_122140_Generic.zip`
61+
62+
63+
## How to Run Oracle GoldenGateVeridata Server
64+
65+
1. Oracle Database
66+
67+
Make sure the Database is running on the network, created earlier, using `--network`.
68+
This is required when your Oracle Database repository server is running in a container.
69+
70+
2. Oracle GoldenGate Veridata Admin Server and Managed Server
71+
72+
Edit `./vdt.env` file. Following list of properties are required:
73+
74+
*DATABASE_HOST*
75+
*DATABASE_PORT*
76+
*DATABASE_SERVICE*
77+
*SCHEMA_PREFIX*
78+
*DATABASE_USER*
79+
*DATABASE_PASSWORD*
80+
*VERIDATA_USER*
81+
*DOMAIN_HOST_VOLUME*
82+
83+
Start a container to launch the Administration Server and Veridata Managed Servers from the image created earlier. To facilitate running, the following scripts are provided:
84+
`run_admin_server.sh`,`run_managed_server.sh`.
85+
86+
To run the Admin Server, execute the following:
87+
88+
`docker run --name ${ADMIN_CONTAINER_NAME} -it --network=VdtBridge -p 7001:7001 --env-file vdt.env -v ${DOMAIN_HOST_VOLUME}:/u01/oracle/user_projects oracle/oggvdt:12.2.1.4.0 createOrStartVdtDomain.sh`
89+
90+
To run a Veridata Managed Server, execute the following:
91+
92+
`docker run --name ${VERIDATA_CONTAINER_NAME} -it --network=VdtBridge -p 7003:7003 --env-file vdt.env --volumes-from ${adminhost} oracle/oggvdt:12.2.1.4.0 startManagedServer.sh`
93+
94+
Note: The Oracle GoldenGate Veridata domain is created during the first run of the container before the Admin Server is started. Subsequent runs will only start the Admin Server.
95+
Oracle recommends that the `vdt.env` file be deleted or secured after the container and WebLogic Server are started so that the user name and password are not inadvertently exposed.
96+
97+
98+
3. Oracle GoldenGate Veridata Agent
99+
100+
1. Edit `./vdtagent.env`. Following list of properties are required
101+
102+
*AGENT_PORT*
103+
*AGENT_JDBC_URL*
104+
*AGENT_HOST_VOLUME*
105+
106+
2. Start a container to launch the Veridata Agent from the image created earlier. To facilitate running, the following script has is being provided `run_agent.sh`.
107+
108+
3. To run a Veridata Agent, execute:
109+
110+
`docker run -d -p ${AGENT_PORT}:${AGENT_PORT} --env-file vdtagent.env -v ${AGENT_HOST_VOLUME}:/u01/oracle/vdt_agent --name ${agenthost} --network=VdtBridge oracle/oggvdt:12.2.1.4 createOrStartVdtAgent.sh`
111+
112+
# Copyright
113+
114+
Copyright (c) 2021 Oracle and/or its affiliates.

Diff for: OracleVeridata/12.2.1.4/buildContainerImage.sh

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
#!/bin/bash
2+
#
3+
# Since: February, 2020
4+
# Description: script to build a Docker image for Oracle GoldenGate Veridata.
5+
#
6+
#
7+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8+
#
9+
# Copyright (c) 2020-2021 Oracle and/or its affiliates.
10+
#
11+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
12+
#
13+
#
14+
usage() {
15+
cat << EOF
16+
17+
Usage: buildContainerImage.sh -v [version]
18+
Builds a Docker container for Oracle GoldenGate Veridata.
19+
20+
Parameters:
21+
-v: Release version to build. Default is 12.2.1.4.0
22+
-i: OGG Veridata Installer zip file
23+
-f: FMW Release version.Default is 12.2.1.4-210701
24+
-p: Patch file
25+
-h: Help
26+
27+
28+
29+
Copyright (c) 2020-2021 Oracle and/or its affiliates.
30+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
31+
32+
EOF
33+
exit 0
34+
}
35+
36+
37+
# Validate packages
38+
checksumPackages() {
39+
echo "Checking if required packages are present and valid..."
40+
md5sum -c
41+
if [ "$?" -ne 0 ]; then
42+
echo "MD5 for required packages to build this image did not match!"
43+
echo "Make sure to download missing files in folder . See *.zip files for more information"
44+
exit $?
45+
fi
46+
}
47+
48+
if [ "$#" -eq 0 ]; then usage; fi
49+
50+
#Parameters
51+
VERSION="12.2.1.4.0"
52+
FMW_VERSION="12.2.1.4-210701"
53+
SKIPMD5=1
54+
PATCH_FILE=""
55+
VDT_INSTALLER=""
56+
57+
58+
59+
while getopts "hc:v:i:f:p:" optname; do
60+
case ${optname} in
61+
v)
62+
VERSION="$OPTARG"
63+
;;
64+
i)
65+
VDT_INSTALLER="$OPTARG"
66+
;;
67+
f)
68+
FMW_VERSION="$OPTARG"
69+
;;
70+
p)
71+
PATCH_FILE="$OPTARG"
72+
;;
73+
c)
74+
SKIPMD5=0
75+
;;
76+
h)
77+
usage
78+
;;
79+
*)
80+
# Should not occur
81+
echo "Unknown error while processing options inside buildContainerImage.sh"
82+
;;
83+
esac
84+
done
85+
86+
echo $VERSION
87+
echo $VDT_INSTALLER
88+
echo $PATCH_FILE
89+
90+
91+
# OGG Veridata Image Name
92+
IMAGE_NAME="oracle/oggvdt:$VERSION"
93+
INSTALLER_VERSION="12.2.1.4.0"
94+
95+
96+
97+
if [ ! "$SKIPMD5" -eq 1 ]; then
98+
checksumPackages
99+
else
100+
echo "Skipped MD5 checksum."
101+
fi
102+
103+
# Proxy settings
104+
PROXY_SETTINGS=""
105+
if [ "${http_proxy}" != "" ]; then
106+
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}"
107+
fi
108+
109+
if [ "${https_proxy}" != "" ]; then
110+
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}"
111+
fi
112+
113+
if [ "${ftp_proxy}" != "" ]; then
114+
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}"
115+
fi
116+
117+
if [ "${no_proxy}" != "" ]; then
118+
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}"
119+
fi
120+
121+
if [ "$PROXY_SETTINGS" != "" ]; then
122+
echo "Proxy settings were found and will be used during build."
123+
fi
124+
125+
if [ "$PATCH_FILE" == "" ]; then
126+
echo "WARNING !! Apply the latest Patch"
127+
fi
128+
129+
if [ -z "${owner_group}" ]; then
130+
owner_group="oracle:oracle"
131+
export owner_group="$owner_group"
132+
fi
133+
134+
export VERIDATA_VERSION="$VERSION"
135+
export FMW_VERSION="$FMW_VERSION"
136+
export PATCH_FILE="$PATCH_FILE"
137+
# ################## #
138+
# BUILDING THE IMAGE #
139+
# ################## #
140+
echo "Building image '$IMAGE_NAME' ..."
141+
echo "Proxy Settings '$PROXY_SETTINGS'"
142+
# BUILD THE IMAGE (replace all environment variables)
143+
144+
145+
BUILD_START=$(date '+%s')
146+
147+
docker build --build-arg VERIDATA_VERSION=${VERIDATA_VERSION} --build-arg INSTALLER_VERSION=${INSTALLER_VERSION} --build-arg INSTALLER=${VDT_INSTALLER} --build-arg FMW_VERSION=${FMW_VERSION} --build-arg PATCH_FILE=${PATCH_FILE} --build-arg OWNER_GROUP=${owner_group} --force-rm=true --no-cache=true $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile . || {
148+
echo "There was an error building the image."
149+
exit 1
150+
}
151+
BUILD_END=$(date '+%s')
152+
BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START`
153+
154+
echo ""
155+
156+
if [ $? -eq 0 ]; then
157+
cat << EOF
158+
Oracle GoldenGate Veridata Docker Image for version: $VERSION.
159+
160+
--> $IMAGE_NAME
161+
162+
Build completed in $BUILD_ELAPSED seconds.
163+
164+
EOF
165+
else
166+
echo "Oracle GoldenGate Veridata container image was not successfully created. Check the output and correct any reported problems with the build operation."
167+
fi

0 commit comments

Comments
 (0)