Skip to content

Commit

Permalink
lin fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
s1saurabh committed Feb 1, 2025
1 parent f3e7870 commit b3faad0
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 87 deletions.
10 changes: 5 additions & 5 deletions OracleDatabase/RAC/OracleRealApplicationClusters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Example: Building Oracle RAC image for v 21.3.0-
./buildContainerImage.sh -v 21.3.0
```

### Building Oracle RAC Database Container Slim Image
### Building Oracle RAC Database Container Slim Image
In this document, an `Oracle RAC container slim image` refers to a container image that does not include installing Oracle Grid Infrastructure and Oracle Database during the Oracle RAC image creation. To build an Oracle RAC slim image that doesn't contain the Oracle RAC Database and Grid infrastructure software, run the following command:
```bash
./buildContainerImage.sh -v <Software Version> -i -o '--build-arg SLIMMING=true'
Expand All @@ -119,7 +119,7 @@ Example: Building Oracle RAC image for v 21.3.0-
-t: user-defined image name and tag (e.g., image_name:tag). Default is set to `oracle/database-rac:<VERSION>` for RAC Image and `oracle/database-rac:<VERSION>-slim` for RAC slim image.
-o: passes on container build option (e.g., --build-arg SLIMMIMG=true for slim,--build-arg BASE_OL_IMAGE=oraclelinux:8 to change base image). The default is "--build-arg SLIMMING=false"
```
- After the `21.3.0` Oracle RAC container image is built, to apply the 21c RU and build the 21c patched image, refer to [Example of how to create a patched database image](./samples/applypatch/README.md).
- After the `21.3.0` Oracle RAC container image is built, to apply the 21c RU and build the 21c patched image, refer to [Example of how to create a patched database image](./samples/applypatch/README.md).
- If you are behind a proxy wall, then you must set the `https_proxy` or `http_proxy` environment variable based on your environment before building the image.
- In the slim image case, the resulting images will not contain the Oracle Grid Infrastructure binaries and Oracle RAC Database binaries.

Expand Down Expand Up @@ -198,7 +198,7 @@ podman network create -d ipvlan --subnet=192.168.18.0/24 --opt mtu=9000 -o paren
rm -rf /opt/.secrets/pwdfile.txt
```
- Oracle recommends using Podman secrets inside the containers. To create Podman secrets, run the following command:

```bash
podman secret create pwdsecret /opt/.secrets/pwdfile.enc
podman secret create keysecret /opt/.secrets/key.pem
Expand All @@ -217,8 +217,8 @@ Notes:
Oracle RAC can be deployed with various scenarios, such as using NFS vs Block Devices, Oracle RAC Container Image vs Slim Image, with User Defined Response files, and so on. All are covered in detail in the instructions below.

### Oracle RAC Containers on Podman
#### [1. Setup Using Oracle RAC Container Image](docs/rac-container/racimage/README.md)
#### [2. Setup Using Oracle RAC Container Slim Image](docs/rac-container/racslimimage/README.md)
#### [1. Setup Using Oracle RAC Container Image](docs/rac-container/racimage/README.md)
#### [2. Setup Using Oracle RAC Container Slim Image](docs/rac-container/racslimimage/README.md)

## Connecting to an Oracle RAC Database

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Learn about container deployment options for Oracle Real Application Clusters (O

Oracle Real Application Clusters (Oracle RAC) is an option for the award-winning Oracle Database Enterprise Edition. Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide highly scalable and available database solutions for all business applications.

Oracle RAC uses Oracle Clusterware as a portable cluster software that allows clustering of independent servers so that they cooperate as a single system, and Oracle Automatic Storage Management (Oracle ASM) to provide simplified storage management that is consistent across all servers and storage platforms. Oracle Clusterware and Oracle ASM are part of the Oracle Grid Infrastructure, which bundles both solutions in an easy-to-deploy software package.
Oracle RAC uses Oracle Clusterware as a portable cluster software that allows clustering of independent servers so that they cooperate as a single system, and Oracle Automatic Storage Management (Oracle ASM) to provide simplified storage management that is consistent across all servers and storage platforms.
Oracle Clusterware and Oracle ASM are part of the Oracle Grid Infrastructure, which bundles both solutions in an easy-to-deploy software package.

For more information on Oracle RAC Database 21c, refer to the [Oracle Database documentation](http://docs.oracle.com/en/database/).

This guide helps you install Oracle RAC on Containers on Host Machines as explained in detail below. With the current release, you prepare the host machine, build or use pre-built Oracle RAC Container Images v21.3, and set up Oracle RAC on Single or Multiple Host machines with Oracle ASM. In this installation guide, we use [Podman](https://docs.podman.io/en/v3.0/) to create Oracle RAC Containers and manage them.
This guide helps you install Oracle RAC on Containers on Host Machines as explained in detail below. With the current release, you prepare the host machine, build or use pre-built Oracle RAC Container Images v21.3, and set up Oracle RAC on Single or Multiple Host machines with Oracle ASM.
In this installation guide, we use [Podman](https://docs.podman.io/en/v3.0/) to create Oracle RAC Containers and manage them.

## Using this Documentation
To create an Oracle RAC environment, follow these steps:
Expand Down Expand Up @@ -56,12 +58,14 @@ Before you proceed to the next section, you must complete each of the steps list
* Install `git` from dnf or yum repository and clone the git repo. We clone this repo on a path called `<GITHUB_REPO_CLONED_PATH>` and refer here.
* If you are planning to use NFS storage for OCR, Voting Disk, and Database files, then configure NFS storage and export at least one NFS mount. You can also use the `<GITHUB_REPO_CLONED_PATH>/docker-images/OracleDatabase/RAC/OracleRACStorageServer` container for the shared file system on NFS. Refer [OracleRACStorageServer](../OracleRACStorageServer/README.md).

* If SELinux is enabled on the Podman host, you must create an SELinux policy for Oracle RAC on Podman. For details about this procedure, see `How to Configure Podman for SELinux Mode` in the publication [Oracle Real Application Clusters Installation Guide for Podman Oracle Linux x86-64](https://docs.oracle.com/en/database/oracle/oracle-database/21/racpd/target-configuration-oracle-rac-podman.html#GUID-59138DF8-3781-4033-A38F-E0466884D008). Also, when you are performing the installation using any files from a Podman host machine where SELinux is enabled, make sure they are labeled correctly with `container_file_t` context. You can use `ls -lZ <file_name/<Directory_name>` to see the security context set on files.
* If SELinux is enabled on the Podman host, you must create an SELinux policy for Oracle RAC on Podman. For details about this procedure, see `How to Configure Podman for SELinux Mode` in the publication [Oracle Real Application Clusters Installation Guide for Podman Oracle Linux x86-64](https://docs.oracle.com/en/database/oracle/oracle-database/21/racpd/target-configuration-oracle-rac-podman.html#GUID-59138DF8-3781-4033-A38F-E0466884D008).
Also, when you are performing the installation using any files from a Podman host machine where SELinux is enabled, make sure they are labeled correctly with `container_file_t` context. You can use `ls -lZ <file_name/<Directory_name>` to see the security context set on files.

* To resolve VIPs and SCAN IPs, in this guide we use a DNS container. Before proceeding to the next step, create a [DNS server container](../OracleDNSServer/README.md).
If you have a preconfigured DNS server in your environment, then you can replace `-e DNS_SERVERS=10.0.20.25`, `--dns=10.0.20.25`, `-e DOMAIN=example.info`, and `--dns-search=example.info` parameters in the examples in this guide with the `DOMAIN_NAME` and `DNS_SERVER` based on your environment.

* The Oracle RAC `Containerfile` does not contain any Oracle software binaries. Download the following software from the [Oracle Technology Network](https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html), if you are planning to build Oracle RAC Container Images from the next section. However, if you are using pre-built RAC images from the Oracle Container Registry, you can skip this step.
* The Oracle RAC `Containerfile` does not contain any Oracle software binaries. Download the following software from the [Oracle Technology Network](https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html), if you are planning to build Oracle RAC Container Images from the next section.
However, if you are using pre-built RAC images from the Oracle Container Registry, you can skip this step.
- Oracle Grid Infrastructure 21c (21.3) for Linux x86-64
- Oracle Database 21c (21.3) for Linux x86-64

Expand All @@ -73,7 +77,8 @@ If you have a preconfigured DNS server in your environment, then you can replace

## Getting Oracle RAC Database Container Images

Oracle RAC is supported for production use on Podman starting with Oracle Database 19c (19.16), and Oracle Database 21c (21.7). You can also deploy Oracle RAC on Podman using the pre-built images available on the Oracle Container Registry. Refer to [this documentation](https://docs.oracle.com/en/operating-systems/oracle-linux/docker/docker-UsingDockerRegistries.html#docker-registry) for details on using the Oracle Container Registry.
Oracle RAC is supported for production use on Podman starting with Oracle Database 19c (19.16), and Oracle Database 21c (21.7). You can also deploy Oracle RAC on Podman using the pre-built images available on the Oracle Container Registry.
Refer to [this documentation](https://docs.oracle.com/en/operating-systems/oracle-linux/docker/docker-UsingDockerRegistries.html#docker-registry) for details on using the Oracle Container Registry.

Example of pulling an Oracle RAC Image from the Oracle Container Registry:
```bash
Expand All @@ -97,7 +102,7 @@ To assist in building the images, you can use the [`buildContainerImage.sh`](./c

In this document, Oracle RAC Database Container Image refers to an Oracle RAC Database Container Image with Oracle Grid Infrastructure and Oracle Database software binaries installed during Oracle RAC Podman image creation. The resulting images will contain the Oracle Grid Infrastructure and Oracle RAC Database software binaries.
Before you begin, you must download grid and database binaries and stage them under `<GITHUB_REPO_CLONED_PATH>/docker-images/OracleDatabase/RAC/OracleRealApplicationCluster/containerfiles/<VERSION>`.

```bash
./buildContainerImage.sh -v <Software Version>
```
Expand All @@ -106,8 +111,8 @@ Example: Building Oracle RAC image for v 21.3.0-
./buildContainerImage.sh -v 21.3.0
```

### Building Oracle RAC Database Container Slim Image
In this document, an Oracle RAC container slim image refers to a container image that does not include installing Oracle Grid Infrastructure and Oracle Database during the Oracle RAC image creation. To build an Oracle RAC slim image that doesn't contain the Oracle RAC Database and Grid infrastructure software, run the following command:
### Building Oracle RAC Database Container Slim Image
In this document, an Oracle RAC container slim image refers to a container image that does not include installing Oracle Grid Infrastructure and Oracle Database during the Oracle RAC image creation. To build an Oracle RAC slim image that doesn't contain the Oracle RAC Database and Grid infrastructure software, run the following command:
```bash
./buildContainerImage.sh -v <Software Version> -i -o '--build-arg SLIMMING=true'
```
Expand All @@ -126,14 +131,15 @@ Example: Building Oracle RAC image for v 21.3.0-
-t: user-defined image name and tag (e.g., image_name:tag). Default is set to `oracle/database-rac:<VERSION>` for RAC Image and `oracle/database-rac:<VERSION>-slim` for RAC slim image.
-o: passes on container build option (e.g., --build-arg SLIMMIMG=true for slim,--build-arg BASE_OL_IMAGE=oraclelinux:9 to change base image). The default is "--build-arg SLIMMING=false"
```
- Ensure that you have enough space in `/var/lib/containers` while building the Oracle RAC image. Also, if required use `export TMPDIR=</path/to/tmpdir>` for Podman to refer to any other folder as the temporary podman cache location instead of the default '/tmp' location.
- After the `21.3.0` Oracle RAC container image is built, to apply the 21c RU and build the 21c patched image, refer to [Example of how to create a patched database image](./samples/applypatch/README.md).
- Ensure that you have enough space in `/var/lib/containers` while building the Oracle RAC image. Also, if required use `export TMPDIR=</path/to/tmpdir>` for Podman to refer to any other folder as the temporary podman cache location instead of the default '/tmp' location.
- After the `21.3.0` Oracle RAC container image is built, to apply the 21c RU and build the 21c patched image, refer to [Example of how to create a patched database image](./samples/applypatch/README.md).
- If you are behind a proxy wall, then you must set the `https_proxy` or `http_proxy` environment variable based on your environment before building the image.
- In the slim image case, the resulting images will not contain the Oracle Grid Infrastructure binaries and Oracle RAC Database binaries.

## Network Management

Before you start the installation, you must plan your private and public network. Refer to section `Podman Host Preparation` in the publication [Oracle Real Application Clusters Installation Guide](#https://review.us.oracle.com/review2/Review.html#reviewId=467473;scope=document;status=open,fixed;documentId=4229197) for Podman Oracle Linux x86-64. You can create a `network bridge` on every container host so containers running within that host can communicate with each other. For example: create `rac_pub1_nw` for the public network (`10.0.20.0/24`) and `rac_priv1_nw` (`192.168.17.0/24`) for a private network. You can use any network subnet for testing. In this document we define the public network on `10.0.20.0/24` and the private network on `192.168.17.0/24`.
Before you start the installation, you must plan your private and public network. Refer to section `Podman Host Preparation` in the publication [Oracle Real Application Clusters Installation Guide](https://docs.oracle.com/cd/F39414_01/racpd/oracle-real-application-clusters-installation-guide-podman-oracle-linux-x86-64.pdf) for Podman Oracle Linux x86-64.
You can create a `network bridge` on every container host so containers running within that host can communicate with each other. For example: create `rac_pub1_nw` for the public network (`10.0.20.0/24`) and `rac_priv1_nw` (`192.168.17.0/24`) for a private network. You can use any network subnet for testing. In this document we define the public network on `10.0.20.0/24` and the private network on `192.168.17.0/24`.

```bash
podman network create --driver=bridge --subnet=10.0.20.0/24 rac_pub1_nw
Expand All @@ -160,7 +166,7 @@ b. [Podman ipvlan network](https://docs.docker.com/network/drivers/ipvlan/) usin
podman network create -d ipvlan --subnet=192.168.18.0/24 -o parent=ens7 rac_priv2_nw --disable-dns --internal
```

## Password Management
## Password Management
- Specify the secret volume for resetting the grid, oracle, and database user password during node creation or node addition. The volume can be a shared volume among all the containers. For example:

```bash
Expand All @@ -176,7 +182,7 @@ openssl pkeyutl -in pwdfile.txt -out pwdfile.enc -pubin -inkey key.pub -encrypt
rm -rf /opt/.secrets/pwdfile.txt
```
- Oracle recommends using Podman secrets inside the containers. To create Podman secrets, run the following command:

```bash
podman secret create pwdsecret /opt/.secrets/pwdfile.enc
podman secret create keysecret /opt/.secrets/key.pem
Expand All @@ -192,7 +198,7 @@ Notes:
- In this example we use `pwdsecret` as the common password for SSH setup between containers for the oracle, grid, and Oracle RAC database users. Also, `keysecret` is used to extract secrets inside the Oracle RAC Containers.

## Oracle RAC on Containers Deployment Scenarios
Oracle RAC can be deployed with various scenarios, such as using podman vs podman-compose, NFS vs Block Devices, Oracle RAC Container Image vs Slim Image, with User Defined Response files, and so on. All are covered in detail in the instructions that follow.
Oracle RAC can be deployed with various scenarios, such as using podman vs podman-compose, NFS vs Block Devices, Oracle RAC Container Image vs Slim Image, with User Defined Response files, and so on. All are covered in detail in the instructions that follow.

### Oracle RAC Containers on Podman
#### [1. Setup Using Oracle RAC Container Image](./rac-container/racimage/README.md)
Expand Down
Loading

0 comments on commit b3faad0

Please sign in to comment.