Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 10 additions & 67 deletions OracleDatabase/RAC/OracleRACStorageServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Refer to the following instructions for setup of NFS Container for Oracle RAC:
- [NFS Server installation on Podman Host](#nfs-server-installation-on-podman-host)
- [SELinux Configuration on Podman Host](#selinux-configuration-on-podman-host)
- [Oracle RAC Storage Container for Podman Host](#oracle-rac-storage-container-for-podman-host)
- [Oracle RAC Storage container for Docker Host](#oracle-rac-storage-container-for-docker-host)
- [Create NFS Volume](#create-nfs-volume)
- [Copyright](#copyright)

Expand All @@ -22,7 +21,7 @@ To create the files for Oracle RAC storage, ensure that you have at least 60 GB

To assist in building the images, you can use the [`buildContainerImage.sh`](containerfiles/buildContainerImage.sh) script. See below for instructions and usage.

In this guide, we refer to Oracle Linux 8 onwards as the Podman Host, and Oracle Linux 7 as the Docker Host machines.
In this guide, we refer to Oracle Linux 8 onwards as the Podman Host.

The `buildContainerImage.sh` script is just a utility shell script that performs MD5 checks. It provides an easy way for beginners to get started. Expert users are welcome to directly call `podman build` with their preferred set of parameters. Go into the **containerfiles** folder and run the **buildContainerImage.sh** script on your Podman host:

Expand All @@ -38,20 +37,15 @@ In a successful build, you should see build messages similar to the following:
--> oracle/rac-storage-server:latest
```

**NOTE**: To build an Oracle RAC storage Image for the Docker host, pass the version `ol7` to buildContainerImage.sh

For detailed usage notes for this script, run the following command:
```bash
./buildContainerImage.sh -h
Usage: buildContainerImage.sh -v [version] [-o] [Docker build option]
Builds a Docker Image for Oracle Database.
Usage: buildContainerImage.sh -v [version] [-o] [Podman build option]
Builds a Podman Image for Oracle Database.

Parameters:
-v: version to build
Choose one of: latest ol7
Choose "latest" version for podman host machines
Choose "ol7" for docker host machines
-o: passes on Docker build option
-v: version to build e.g latest
-o: passes on Podman build option
```

### Create Bridge Network
Expand Down Expand Up @@ -130,7 +124,7 @@ podman run -d -t \
localhost/oracle/rac-storage-server:latest
```

To check the Oracle RAC storage container and services creation logs, you can run a `tail` command on the Docker logs. It should take approximately 10 minutes to create the racnode-storage container service.
To check the Oracle RAC storage container and services creation logs, you can run a `tail` command on the Podman logs. It should take approximately 10 minutes to create the racnode-storage container service.

```bash
podman exec racnode-storage tail -f /tmp/storage_setup.log
Expand All @@ -144,61 +138,15 @@ Export list for racnode-storage:
#################################################
```


### Oracle RAC Storage container for Docker Host

To use NFS volumes in containers, you must install NFS server RPMs on the Podman host:

```bash
yum install -y nfs-utils
```
#### Prerequisites for an Oracle RAC Storage Container for Docker Host

Create a placeholder for NFS storage, and ensure that it is empty:
```bash
export ORACLE_DBNAME=ORCLCDB
mkdir -p /scratch/docker_volumes/asm_vol/$ORACLE_DBNAME
rm -rf /scratch/docker_volumes/asm_vol/$ORACLE_DBNAME/asm_disk0*
```

#### Deploying Oracle RAC Storage Container for Docker Host

If you are building an Oracle RAC storage container on Docker host machines, then run the following commands:

```bash
export ORACLE_DBNAME=ORCLCDB
docker run -d -t \
--hostname racnode-storage \
--dns-search=example.info \
--cap-add SYS_ADMIN \
--cap-add AUDIT_WRITE \
--volume /scratch/docker_volumes/asm_vol/$ORACLE_DBNAME:/oradata --init \
--network=rac_pub1_nw --ip=10.0.20.80 \
--tmpfs=/run \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro \
--name racnode-storage \
oracle/rac-storage-server:ol7
```

To check the Oracle RAC storage container and services creation logs, you can run a `tail` command on the Docker logs. It should take 10 minutes to create the racnode-storage container service.

```bash
docker logs -f racnode-storage
```

**IMPORTANT:** During the container startup, five files with the name `asm_disk0[1-5].img` will be created under `/oradata`. If the files are already present, then they will not be recreated. These files can be used for ASM storage in Oracle RAC containers.

**NOTE**: Place the directory in a container that has at least 60 GB. In the preceding example, we are using `/scratch/stage/rac-storage/$ORACLE_DBNAME`. Change these values according to your environment. Inside the container, the directory will be `/oradata`. Do not change this value.

In the preceding example, we use **192.168.17.0/24** as the subnet for the NFS server. You can change the subnet values according to your environment.

You should see following in the Docker logs output:

In the following example, we use **192.168.17.0/24** as the subnet for the NFS server. You can change the subnet values according to your environment.

**IMPORTANT:** The NFS volume must be `/oradata`, which you will export to Oracle RAC containers for ASM storage. It will take approximately 10 minutes to set up the NFS server.

### Create NFS Volume
#### Create NFS volume using the following command on the Podman Host

```bash
podman volume create --driver local \
Expand All @@ -208,15 +156,7 @@ podman volume create --driver local \
racstorage
```

#### Create NFS volume using following command on Docker Host

```bash
docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.17.80,rw,bg,hard,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0 \
--opt device=192.168.17.80:/oradata \
racstorage
```
**IMPORTANT:** If you are not using the `192.168.17.0/24` subnet then you must change **addr=192.168.17.80** based on your environment.

## Environment variables explained
Expand All @@ -226,6 +166,9 @@ racstorage
| DNS_SERVER | Default set to `10.0.20.25`. Specify the comma-separated list of DNS server IP addresses where both Oracle RAC nodes are resolved. |
| DOMAIN | Default set to `example.info`. Specify the domain details for the Oracle RAC Container Environment. |

## Sample Container Files for Older Releases
To setup an Oracle RAC storage Container for the Docker host on Oracle Linux 7, refer older [README](./README1.md#how-to-build-nfs-storage-container-image-on-docker-host)
instructions.
## License
Unless otherwise noted, all scripts and files hosted in this repository that are required to build the container images are under UPL 1.0 license.

Expand Down
8 changes: 5 additions & 3 deletions OracleDatabase/RAC/OracleRealApplicationClusters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ However, if you are using pre-built RAC Images from the Oracle Container Registr
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 Oracle Container Registry.

Example of pulling an Oracle RAC Database Image from the Oracle Container Registry:
Example of pulling an Oracle RAC Image from the Oracle Container Registry:
```bash
podman pull container-registry.oracle.com/database/rac_ru:21.16
podman tag container-registry.oracle.com/database/rac_ru:21.16 localhost/oracle/database-rac:21c
# For Oracle RAC Container Image
podman pull container-registry.oracle.com/database/rac_ru:latest
podman tag container-registry.oracle.com/database/rac_ru:latest localhost/oracle/database-rac:21c
```
**NOTE** Currently, latest tag in Oracle Container registry represents `21.16.0` tag. If you are pulling any other version of container image, then retag approriately as per your environment to use in `podman create` commands later.

If you are using pre-built Oracle RAC images from the [Oracle Container Registry](https://container-registry.oracle.com), then you can skip the section [Building Oracle RAC Database Container Image](#building-oracle-rac-database-container-image).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python3 main.py --delracnode="del_rachome=true;del_gridnode=true"
Validate racnodep3 is deleted successfully from Oracle RAC on Container Cluster -
```bash
podman exec -it racnodep1 bash
[root@racnodep1 bin]# /u01/app/23.3.0/grid/bin/olsnodes -n
[root@racnodep1 bin]# /u01/app/21c/grid/bin/olsnodes -n
racnodep1 1
racnodep2 2
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This section provides information about the environment variables that can be us
| DB_HOME | Mandatory | Setup using Slim Image | Path to Oracle Database home directory. Default value is `/u01/app/oracle/product/21c/dbhome_1`. |
| DB_BASE | Mandatory | Setup using Slim Image | Path to the base directory of Oracle Database. Default value is `/u01/app/oracle`. |
| INVENTORY | Mandatory | Setup using Slim Image | Path to the Oracle Inventory directory. Default value is `/u01/app/oraInventory`. |
| STAGING_SOFTWARE_LOC | Mandatory | Setup using Slim Image | Location where the Oracle software zip files are staged. Default value is `/scratch/software/21c/goldimages/240308`. |
| STAGING_SOFTWARE_LOC | Mandatory | Setup using Slim Image | Location where the Oracle software zip files are staged. Default value is `/scratch/software/21c/goldimages/`. |
| GRID_SW_ZIP_FILE | Mandatory | Setup using Slim Image | Name of the Oracle Grid Infrastructure software zip file. Default value is `LINUX.X64_213000_grid_home.zip`. |
| DB_SW_ZIP_FILE | Mandatory | Setup using Slim Image | Name of the Oracle Database software zip file. Default value is `LINUX.X64_213000_db_home.zip`. |
| GRID_RESPONSE_FILE | Mandatory | Setup using User Defined Response Files | Path to the Oracle Grid Infrastructure response file. Default value is `/tmp/grid_21c.rsp`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ Refer to [this documentation](https://docs.oracle.com/en/operating-systems/oracl
Example of pulling an Oracle RAC Image from the Oracle Container Registry:
```bash
# For Oracle RAC Container Image
podman pull container-registry.oracle.com/database/rac_ru:21.16
podman tag container-registry.oracle.com/database/rac_ru:21.16 localhost/oracle/database-rac:21.3.0
podman pull container-registry.oracle.com/database/rac_ru:latest
podman tag container-registry.oracle.com/database/rac_ru:latest localhost/oracle/database-rac:21c
```
**NOTE** Currently, latest tag in Oracle Container registry represents `21.16.0` tag. If you are pulling any other version of container image, then retag approriately as per your environment to use in `podman create` commands later.

If you are using pre-built Oracle RAC images from the Oracle Container Registry, then you can skip the section that follows where we build the container images.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ You can validate if the environment is healthy by running the below command-
```bash
podman ps -a

58642afb20eb localhost/oracle/rac-dnsserver:latest /bin/sh -c exec $... 23 hours ago Up 23 hours (healthy) rac-dnsserver
58642afb20eb localhost/oracle/rac-dnsserver:latest /bin/sh -c exec $... 23 hours ago Up 23 hours (healthy) rac-dnsserver
a192f4e9092a localhost/oracle/database-rac:21c 10 hours ago Up 10 hours (healthy) racnodep1
745679457df5 localhost/oracle/database-rac:21c 10 hours ago Up 10 hours (healthy) racnodep2
```
Expand All @@ -287,7 +287,7 @@ Refer to [README](../CLEANUP.md) for instructions on how to cleanup an Oracle RA

## Support

At the time of this release, Oracle RAC on Podman is supported for Oracle Linux 9.3 later. To see current Linux support certifications, refer [Oracle RAC on Podman Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/21/install-and-upgrade.html)
At the time of this release, Oracle RAC on Podman is supported for Oracle Linux 8.10 later. To see current Linux support certifications, refer [Oracle RAC on Podman Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/21/install-and-upgrade.html)

## License

Expand Down
8 changes: 2 additions & 6 deletions OracleDatabase/RAC/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ Review the README of the following sections in the order given. After reviewing
* (Optional) Public IP for OracleConnectionManager container.
* Ensure to have internet connectivity for DNF Package Manager.

## OracleConnectionManager

Provides Docker build files to create an Oracle Connection Manager container image. If you are planing to run RAC containers on single host and RAC containers IPs are not accessible on your network, you can use connection manager image to access RAC database on your network. For more details, see [OracleConnectionManager/README.md](./OracleConnectionManager/README.md).

## Oracle Restart
Provides Details to create Oracle Database on Oracle Restart. For more details, see [OracleRealApplicationClusters/docs/orestart/README.md](./OracleRealApplicationClusters/docs/orestart/README.md)

Expand All @@ -38,11 +34,11 @@ You need to review `OracleRACDNSServer` and `OracleRACStorageServer` sections, c

* **OracleRACDNSServer Container**

Provides Podman build files to create a local DNS Server container for Oracle RAC on Podman. This container-based DNS server provides IP addresses and the hostname resolution for the containers on the host. For more details, see [OracleRACDNSServer/README.md](./OracleDNSServer/README.md).
Provides Podman build files to create a local DNS Server container for Oracle RAC on Podman. This container-based DNS server provides IP addresses and the hostname resolution for the containers on the host. For more details, see [OracleRACDNSServer/README.md](./OracleDNSServer/README.md)

* **OracleRACStorageServer Container**

Provides Podman build files to create an NFS-based storage server for Oracle RAC. If you do not have a block storage or NAS device for Oracle RAC to store OCR, Voting files and Datafiles, then you can use the Oracle RAC Storage Server Container Image to provide shared storage. For more details, see [OracleRACStorageServer/README.md](./OracleRACStorageServer/README.md).
Provides Podman build files to create an NFS-based storage server for Oracle RAC. If you do not have a block storage or NAS device for Oracle RAC to store OCR, Voting files and Datafiles, then you can use the Oracle RAC Storage Server Container Image to provide shared storage. For more details, see [OracleRACStorageServer/README.md](./OracleRACStorageServer/README.md)

* **Oracle Real Application Clusters for Developers**
Provides Details to create an Oracle RAC Database Container Image for developers. For more details, see [OracleRealApplicationClusters/docs/developers/README.md](./OracleRealApplicationClusters/docs/developers/README.md)
4 changes: 4 additions & 0 deletions OracleDatabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Provides terraform scripts to deploy Oracle Sharding in Oracle Cloud with Oracle

## RAC
Provides Podman build files to create an Oracle RAC Database podman image. For more details, see [RAC/README.md](./RAC/README.md).

## OracleConnectionManager

Provides container build files to create an Oracle Connection Manager container image. If you are planing to run RAC containers on single host and RAC containers IPs are not accessible on your network, you can use connection manager image to access RAC database on your network. For more details, see [OracleConnectionManager/README.md](./OracleConnectionManager/README.md)