Skip to content

Commit

Permalink
readme file changes (#2758)
Browse files Browse the repository at this point in the history
* readme file changes

* readme file changes

* readme file changes
  • Loading branch information
s1saurabh authored Feb 7, 2024
1 parent 310a71f commit 8377b74
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 87 deletions.
132 changes: 66 additions & 66 deletions OracleDatabase/RAC/OracleRACStorageServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,59 @@ Refer below instructions for setup of NFS Container for RAC -

- [Oracle ASM on NFS Server for RAC testing](#oracle-asm-on-nfs-server-for-rac-testing)
- [How to build NFS Storage Container Image](#how-to-build-nfs-storage-container-image)
- [How to build NFS Storage Container Image on Podman Host](#how-to-build-nfs-storage-container-image-on-podman-host)
- [How to build NFS Storage Container Image on Docker Host](#how-to-build-nfs-storage-container-image-on-docker-host)
- [How to build NFS Storage Container Image on Podman Host](#how-to-build-nfs-storage-container-image-on-podman-host)
- [Create Bridge Network](#create-bridge-network)
- [NFS Server installation on Host](#nfs-server-installation-on-host)
- [Running RACStorageServer container](#running-racstorageserver-container)
- [RAC Storage Container for Podman Host Machine](#rac-storage-container-for-podman-host-machine)
- [RAC Storage container for Docker Host Machine](#rac-storage-container-for-docker-host-machine)
- [RAC Storage Container for Podman Host Machine](#rac-storage-container-for-podman-host-machine)
- [Create NFS Volume](#create-nfs-volume)
- [Copyright](#copyright)

## How to build NFS Storage Container Image
### How to build NFS Storage Container Image on Podman Host

### How to build NFS Storage Container Image on Docker Host
You need to make sure that you have atleast 60GB space available for container to create the files for RAC storage.

**IMPORTANT:** If you are behind the proxy, you need to set `http_proxy` and `https_proxy` env variable based on your enviornment before building the image.
**IMPORTANT:** If you are behind the proxy, you need to set http_proxy env variable based on your enviornment before building the image. Please ensure that you have the `podman-docker` package installed on your OL8 Podman host to run the command using the docker utility.
```bash
dnf install podman-docker -y
```

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

The `buildDockerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. Go into the **dockerfiles** folder and run the **buildDockerImage.sh** script:

```bash
cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleRACStorageServer/dockerfiles
./buildDockerImage.sh -v latest
./buildDockerImage.sh -v 19.3.0
```
You would see successful build message similar like below-

For detailed usage of command, please execute folowing command:
```bash
Oracle RAC Storage Server Podman Image version latest is ready to be extended:

--> oracle/rac-storage-server:latest
cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleRACStorageServer/dockerfiles
./buildDockerImage.sh -h
```
### How to build NFS Storage Container Image on Podman Host

### How to build NFS Storage Container Image on Docker Host
You need to make sure that you have atleast 60GB space available for container to create the files for RAC storage.

**IMPORTANT:** If you are behind the proxy, you need to set http_proxy env variable based on your enviornment before building the image. Please ensure that you have the `podman-docker` package installed on your OL8 Podman host to run the command using the docker utility.
```bash
dnf install podman-docker -y
```
**IMPORTANT:** If you are behind the proxy, you need to set `http_proxy` and `https_proxy` env variable based on your enviornment before building the image.

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

The `buildDockerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. Go into the **dockerfiles** folder and run the **buildDockerImage.sh** script:

```bash
cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleRACStorageServer/dockerfiles
./buildDockerImage.sh -v 19.3.0
./buildDockerImage.sh -v latest
```

For detailed usage of command, please execute folowing command:
You would see successful build message similar like below-
```bash
cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleRACStorageServer/dockerfiles
./buildDockerImage.sh -h
Oracle RAC Storage Server Podman Image version latest is ready to be extended:

--> oracle/rac-storage-server:latest
```

## Create Bridge Network
Expand All @@ -80,8 +80,52 @@ Ensure to install NFS server rpms on host to utilize NFS volumes in containers-
yum -y install nfs-utils
```
## Running RACStorageServer container

### Running RACStorageServer Podman container

### RAC Storage container for Docker Host Machine

#### Prerequisites for RAC Storage Container for Docker Host

Create placeholder for NFS storage and make sure it is empty -
```bash
export ORACLE_DBNAME=ORCLCDB
mkdir -p /docker_volumes/asm_vol/$ORACLE_DBNAME
rm -rf /docker_volumes/asm_vol/$ORACLE_DBNAME/asm_disk0*
```

Execute following command to create the container:

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

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

**NOTE**: Expose directory to container which has atleast 60GB. In the above example, we are using `/docker_volumes/asm_vol/$ORACLE_DBNAME` and you need to change values according to your env. Inside container, it will be /oradata and do not change this.

In the above example, we used **192.168.17.0/24** subnet for NFS server. You can change the subnet values according to your environment. Also, SELINUX must be disabled or in permissive mode in Docker Host Machine.

To check the racstorage container/services creation logs , please tail docker logs. It will take 10 minutes to create the racnode-storage container service.

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

you should see following in docker logs output:

```bash
#################################################
runOracle.sh: NFS Server is up and running
Create NFS volume for /oradata
#################################################
```

### RAC Storage Container for Podman Host Machine

#### Prerequisites for RAC Storage Container for Podman Host

Expand All @@ -92,9 +136,7 @@ mkdir -p /scratch/stage/rac-storage/$ORACLE_DBNAME
rm -rf /scratch/stage/rac-storage/$ORACLE_DBNAME/asm_disk0*
```

#### RAC Storage Container for Podman Host Machine

If you are building RAC storage container using Podman , you can use following command.
Execute following command to create the container:

```bash
export ORACLE_DBNAME=ORCLCDB
Expand Down Expand Up @@ -131,48 +173,6 @@ In the above example, we used **192.168.17.0/24** subnet for NFS server. You can

**Note** : If SELINUX is enabled on the Podman host, then 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).

#### Prerequisites for RAC Storage Container for Docker Host

Create placeholder for NFS storage and make sure it is empty -
```bash
export ORACLE_DBNAME=ORCLCDB
mkdir -p /docker_volumes/asm_vol/$ORACLE_DBNAME
rm -rf /docker_volumes/asm_vol/$ORACLE_DBNAME/asm_disk0*
```

#### RAC Storage container for Docker Host Machine
Execute following command to create the container:

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

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

**NOTE**: Expose directory to container which has atleast 60GB. In the above example, we are using `/docker_volumes/asm_vol/$ORACLE_DBNAME` and you need to change values according to your env. Inside container, it will be /oradata and do not change this.

In the above example, we used **192.168.17.0/24** subnet for NFS server. You can change the subnet values according to your environment. Also, SELINUX must be disabled or in permissive mode in Docker Host Machine.

To check the racstorage container/services creation logs , please tail docker logs. It will take 10 minutes to create the racnode-storage container service.

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

you should see following in docker logs output:

```bash
#################################################
runOracle.sh: NFS Server is up and running
Create NFS volume for /oradata
#################################################
```

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

Expand Down
2 changes: 1 addition & 1 deletion OracleDatabase/RAC/OracleRealApplicationClusters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ To create an Oracle RAC environment on Podman, complete each of these steps in o

### Section 5.1 : Prerequisites for Running Oracle RAC on Podman

You must install and configure [Podman release 4.0.2](https://docs.oracle.com/en/operating-systems/oracle-linux/Podman/) or later on Oracle Linux 8.5 or later to run Oracle RAC on Podman.
You must install and configure [Podman release 4.0.2](https://docs.oracle.com/en/operating-systems/oracle-linux/podman/podman-InstallingPodmanandRelatedUtilities.html#podman-install) or later on Oracle Linux 8.5 or later to run Oracle RAC on Podman.

**Notes**:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Once you have built your Oracle RAC container image, you can create a Oracle RAC

## Section 1 : Prerequisites for RAC Database on Docker with Docker Compose

**IMPORTANT :** You must execute all the steps specified in this section (customized for your environment) before you proceed to the next section. Docker and Docker Compose is not supported with OL8. You need OL7.9 with UEK R5 or R6. This guide and example is mainly for development and testing purposes only.
**IMPORTANT :** You must execute all the steps specified in this section (customized for your environment) before you proceed to the next section. Docker and Docker Compose is not supported with OL8. You need OL7.9 with UEK R5 or above. This guide and example is mainly for development and testing purposes only.

- It is assumed that before proceeding further you have executed the pre-requisites from [Section 1 : Prerequisites for running Oracle RAC in containers](../../../OracleRealApplicationClusters/README.md) and [Section 4.1 : Prerequisites for Running Oracle RAC on Docker](../../../OracleRealApplicationClusters/README.md) for Single Docker Host Machine .
- Create DNS docker image, if you are planing to use DNS container for testing. Please refer [DNS Container README.MD](../../../OracleDNSServer/README.md). You can skip this step if you are planing to use **your own DNS Server**.
- Create Oracle Connection Manager Docker image.Please refer [RAC Oracle Connection Manager README.MD](../../../OracleConnectionManager/README.md) for details.
- Create Storage Server Docker image, if you are planning to use NFS Storage Devices provided in this guide.Please refer [How to build NFS Storage Container Image](../../../OracleRACStorageServer/README.md) for details.

- If you have not built the Oracle RAC container image, execute the steps in [Section 2: Building Oracle RAC Database Container Images](../../../OracleRealApplicationClusters/README.md) based on your environment.

Expand Down Expand Up @@ -250,6 +251,15 @@ mkdir -p /docker_volumes/asm_vol/$ORACLE_DBNAME
rm -rf /docker_volumes/asm_vol/$ORACLE_DBNAME/asm_disk0*
```

```bash
#-----Create docker volume---
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
```

After copying compose file, you can bring up DNS Container, Storage Container, RAC Container and CMAN container by following below commands-
```bash
#---------Bring up DNS------------
Expand Down Expand Up @@ -279,15 +289,6 @@ racnode-storage | Create NFS volume for /oradata/
racnode-storage | ####################################################
```

```bash
#-----Create docker volume---
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
```

```bash
#-----Bring up racnode1----------
docker compose up -d ${RACNODE1_CONTAINER_NAME} && docker compose stop ${RACNODE1_CONTAINER_NAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ In case, of MCVLAN or IPVLAN networks, you may want to edit `podman-compose.yml`

### Section 3.2: Deploy the RAC Container with NFS Storage Devices

Once pre-requisites for NFS Storage Devices and above necessary variables are exported, copy `podman-compose.yml` file from [this location](./samples/racpodmancompose/compose-files/nfsdevices/)
Once pre-requisites for NFS Storage Devices and above necessary variables are exported, copy `podman-compose.yml` file from [this location](./compose-files/nfsdevices/podman-compose.yml)

Create placeholder for NFS storage and make sure it is empty -
```bash
Expand All @@ -241,6 +241,15 @@ mkdir -p /scratch/stage/rac-storage/$ORACLE_DBNAME
rm -rf /scratch/stage/rac-storage/ORCLCDB/asm_disk0*
```

```bash
#----------Create NFS volume--------------
podman 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
```

After copying compose file, you can bring up DNS Container, Storage Container, RAC Container and CMAN container by following below commands-
```bash
#---------Bring up DNS------------
Expand All @@ -262,20 +271,13 @@ podman-compose logs ${DNS_CONTAINER_NAME}
podman-compose --podman-run-args="-t -i --systemd=always" up -d ${STORAGE_CONTAINER_NAME}
podman-compose exec ${STORAGE_CONTAINER_NAME} tail -f /tmp/storage_setup.log

Export list for racnode-storage:
/oradata *
#################################################
Setup Completed
#################################################
```

```bash
#----------Create NFS volume--------------
podman 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
```

```bash
#-----Bring up racnode1----------
podman-compose --podman-run-args="-t -i --systemd=always --cpuset-cpus 0-1 --memory 16G --memory-swap 32G" up -d ${RACNODE1_CONTAINER_NAME} && \
Expand Down

0 comments on commit 8377b74

Please sign in to comment.