Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion OracleDatabase/OracleConnectionManager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ podman exec -i -t racnodepc1-cman /bin/bash
/opt/scripts/startup/configCMAN.sh -addrule -e DB_HOSTDETAILS=<HOST-DETAILS>
For example :
/opt/scripts/startup/configCMAN.sh -addrule -e DB_HOSTDETAILS=HOST=racnodep9:IP=10.0.20.178:RULE_SRC=racnodepc2-cman
/opt/scripts/startup/configCMAN.sh -addrule -e DB_HOSTDETAILS=HOST=db1.example.com:RULE_SRC=*:RULE_DST=db1:RULE_SRV=apppdb1:RULE_ACT=accept:RULE_NEXT_HOP=cman-sidb.default.svc.cluster.local:1521
```
### Deleting rules from the Oracle Connection Manager

Expand All @@ -183,7 +184,7 @@ Run this command inside the OracleConnectionManager container.
| DOMAIN | The domain name associated with the container environment. |
| PUBLIC_IP | The public IP address assigned to the Oracle Connection Manager container. |
| PUBLIC_HOSTNAME | The public hostname assigned to the Oracle Connection Manager container. |
| DB_HOSTDETAILS | This is optional field. Details regarding the database host configuration, including host names, rules, and IP addresses to be registered with Connection manager in a command separated format, indicating different hosts and their associated details such as rules and IP addresses. Example: `HOST=racnodepc1-scan:RULE_ACT=accept,HOST=racnodep1:IP=10.0.20.170`. |
| DB_HOSTDETAILS | This is optional field. Details regarding the database host configuration, including host names, rules, IP addresses, and optional next hop to be registered with Connection Manager in a comma separated format. Supported per-host tokens include `HOST`, `IP`, `RULE_SRC`, `RULE_DST`, `RULE_SRV`, `RULE_ACT`, and `RULE_NEXT_HOP` or `NEXT_HOP`. Example: `HOST=racnodepc1-scan:RULE_ACT=accept,HOST=racnodep1:IP=10.0.20.170:RULE_NEXT_HOP=cman-sidb.default.svc.cluster.local:1521`. |
| DNS_SERVER | The default is set to `10.0.20.25`, which is the DNS container resolving the Connection Manager and Oracle Database containers. Replace this with your DNS server IP if needed. |
| USER_CMAN_FILE | (Optional) If you want to provide your own pre-created `cman.ora` file, set this environment variable and attach the file as a Podman volume in the `podman run` command. |

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# hadolint global ignore=DL3025,DL3044,DL4000
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1982-2019 Oracle and/or its affiliates. All rights reserved.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
Expand All @@ -23,6 +24,10 @@
# ---------------
FROM oraclelinux:7-slim

# Maintainer
# ----------
MAINTAINER Sanjay Singh (Sanjay.Singh@oracle.com), Paramdeep Saini (paramdeep.saini@oracle.com)

# Environment variables required for this build (do NOT change)
# -------------------------------------------------------------
# Linux Env Variable
Expand All @@ -43,7 +48,6 @@ ENV SETUP_LINUX_FILE="setupLinuxEnv.sh" \
INSTALL_DB_BINARIES_FILE="installDBBinaries.sh" \
container="true"
# Use second ENV so that variable get substituted
# hadolint ignore=DL3044
ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH \
SCRIPT_DIR=$INSTALL_DIR/startup \
Expand All @@ -53,26 +57,25 @@ ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
# Copy binaries
# -------------
# Grid Binaries
COPY $INSTALL_FILE_1 $SETUP_LINUX_FILE $CHECK_SPACE_FILE $CLIENT_RSP $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/install/
COPY $INSTALL_FILE_1 $SETUP_LINUX_FILE $CHECK_SPACE_FILE $DB_INSTALL_RSP $DB_SETUP_FILE $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/install/

COPY $RUN_FILE $CMANORA $CONFIG_CMAN_FILE $FUNCTIONS $INSTALL_DIR/startup/
# hadolint ignore=DL3044

RUN chmod 755 $INSTALL_DIR/install/*.sh && \
sync && \
$INSTALL_DIR/install/$CHECK_SPACE_FILE && \
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
$INSTALL_DIR/install/$DB_SETUP_FILE && \
$INSTALL_DIR/install/$DB_SETUP_FILE && \
sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-19c.conf && \
sed -e '/ *nofile /s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-19c.conf && \
su oracle -c "$INSTALL_DIR/install/$INSTALL_DB_BINARIES_FILE EE" && \
$INVENTORY/orainstRoot.sh && \
$DB_HOME/root.sh && \
rm -rf $INSTALL_DIR/install && \
rm -f /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf && \
rm -f /etc/sysctl.d/99-sysctl.conf && \
rm -f /etc/sysctl.d/99-sysctl.conf && \
rm -f /etc/rc.d/init.d/oracle-database-preinstall-19c-firstboot && \
rm -f /etc/security/limits.d/oracle-database-preinstall-19c.conf && \
rm -f $INSTALL_DIR/install/* && \
chown -R oracle:oinstall $SCRIPT_DIR && \
chmod 755 $SCRIPT_DIR/*.sh && \
chmod 666 $SCRIPT_DIR/*.ora && \
Expand All @@ -83,5 +86,4 @@ WORKDIR /home/oracle
EXPOSE 1521 5500

# Define default command to start Oracle Database.
# hadolint ignore=DL3025
CMD exec $SCRIPT_DIR/$RUN_FILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# hadolint global ignore=DL3025,DL3044,DL4000
# LICENSE UPL 1.0
#
# Copyright (c) 1982-2019 Oracle and/or its affiliates. All rights reserved.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
# This is the Dockerfile for Oracle Connection Manager
#
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# (1) LINUX.X64_193000_client.zip
# Oracle Database 19c Client (19.3) for Linux x86-64
# Download Oracle Connection Manager as part of the Oracle Database Client
# from https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html
#
# HOW TO BUILD THIS IMAGE
# -----------------------
# Put all downloaded files in the same directory as this Dockerfile
# Run:
# $ docker build -t oracle/cman:19.3.0 .
#
# Pull base image
# ---------------
FROM oraclelinux:7-slim

# Maintainer
# ----------
MAINTAINER Sanjay Singh (Sanjay.Singh@oracle.com), Paramdeep Saini (paramdeep.saini@oracle.com)

# Environment variables required for this build (do NOT change)
# -------------------------------------------------------------
# Linux Env Variable
ENV SETUP_LINUX_FILE="setupLinuxEnv.sh" \
INSTALL_DIR=/opt/scripts \
# Grid Env variables
INVENTORY=/u01/app/oraInventory \
DB_BASE=/u01/app/oracle \
DB_HOME=/u01/app/oracle/product/19.3.0/client_1 \
INSTALL_FILE_1="LINUX.X64_193000_client.zip" \
DB_INSTALL_RSP="client19c_install.rsp" \
DB_SETUP_FILE="setupDB.sh" \
RUN_FILE="runOracle.sh" \
CONFIG_CMAN_FILE="configCMAN.sh" \
CHECK_SPACE_FILE="checkSpace.sh" \
CMANORA="cman.ora" \
FUNCTIONS="functions.sh" \
INSTALL_DB_BINARIES_FILE="installDBBinaries.sh" \
container="true"
# Use second ENV so that variable get substituted
ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH \
SCRIPT_DIR=$INSTALL_DIR/startup \
DB_PATH=$DB_HOME/bin:$DB_HOME/OPatch/:/usr/sbin:$PATH \
DB_LD_LIBRARY_PATH=$DB_HOME/lib:/usr/lib:/lib

# Copy binaries
# -------------
# Grid Binaries
COPY $INSTALL_FILE_1 $SETUP_LINUX_FILE $CHECK_SPACE_FILE $CLIENT_RSP $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/install/

COPY $RUN_FILE $CMANORA $CONFIG_CMAN_FILE $FUNCTIONS $INSTALL_DIR/startup/

RUN chmod 755 $INSTALL_DIR/install/*.sh && \
sync && \
$INSTALL_DIR/install/$CHECK_SPACE_FILE && \
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
$INSTALL_DIR/install/$DB_SETUP_FILE && \
sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-19c.conf && \
su oracle -c "$INSTALL_DIR/install/$INSTALL_DB_BINARIES_FILE EE" && \
$INVENTORY/orainstRoot.sh && \
$DB_HOME/root.sh && \
rm -rf $INSTALL_DIR/install && \
rm -f /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf && \
rm -f /etc/sysctl.d/99-sysctl.conf && \
rm -f /etc/rc.d/init.d/oracle-database-preinstall-19c-firstboot && \
rm -f /etc/security/limits.d/oracle-database-preinstall-19c.conf && \
rm -f $INSTALL_DIR/install/* && \
chown -R oracle:oinstall $SCRIPT_DIR && \
chmod 755 $SCRIPT_DIR/*.sh && \
chmod 666 $SCRIPT_DIR/*.ora && \
sync

USER oracle
WORKDIR /home/oracle
EXPOSE 1521 5500

# Define default command to start Oracle Database.
CMD exec $SCRIPT_DIR/$RUN_FILE
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ CMAN_###CMAN_HOSTNAME###.###DOMAIN### =
(action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
)
)
)
)
Loading
Loading