You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sample Docker build files to facilitate installation, configuration, and environment setup for DevOps users.
2
+
Sample Docker and Podman build files to facilitate installation, configuration, and environment setup for DevOps users.
3
3
4
4
**IMPORTANT:** This image can be used to setup ASM on NFS for RAC. You can skip if you have physical block devices or NAS server for Oracle RAC and Grid. You need to make sure that NFS server container must be up and running for RAC functioning. This image is for only testing purpose.
5
5
6
-
## How to build and run
6
+
Refer below instructions for setup of NFS Container for RAC -
7
+
8
+
-[Oracle ASM on NFS Server for RAC testing](#oracle-asm-on-nfs-server-for-rac-testing)
9
+
-[How to build NFS Storage Container Image](#how-to-build-nfs-storage-container-image)
10
+
-[How to build NFS Storage Container Image on Podman Host](#how-to-build-nfs-storage-container-image-on-podman-host)
11
+
-[How to build NFS Storage Container Image on Docker Host](#how-to-build-nfs-storage-container-image-on-docker-host)
12
+
-[Create Bridge Network](#create-bridge-network)
13
+
-[NFS Server installation on Host](#nfs-server-installation-on-host)
-[RAC Storage Container for Podman Host Machine](#rac-storage-container-for-podman-host-machine)
16
+
-[RAC Storage container for Docker Host Machine](#rac-storage-container-for-docker-host-machine)
17
+
-[Create NFS Volume](#create-nfs-volume)
18
+
-[Copyright](#copyright)
19
+
20
+
## How to build NFS Storage Container Image
21
+
### How to build NFS Storage Container Image on Podman Host
22
+
23
+
You need to make sure that you have atleast 60GB space available for container to create the files for RAC storage.
24
+
25
+
**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.
26
+
27
+
To assist in building the images, you can use the [buildDockerImage.sh](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage.
28
+
29
+
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:
30
+
31
+
```bash
32
+
./buildDockerImage.sh -v latest
33
+
```
34
+
You would see successful build message similar like below-
35
+
```bash
36
+
Oracle RAC Storage Server Podman Image version latest is ready to be extended:
37
+
38
+
--> oracle/rac-storage-server:latest
39
+
```
40
+
41
+
### How to build NFS Storage Container Image on Docker Host
7
42
You need to make sure that you have atleast 60GB space available for container to create the files for RAC storage.
8
43
9
44
**IMPORTANT:** If you are behind the proxy, you need to set http_proxy env variable based on your enviornment before building the image.
@@ -13,37 +48,90 @@ To assist in building the images, you can use the [buildDockerImage.sh](dockerfi
13
48
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:
14
49
15
50
```bash
16
-
./buildDockerImage.sh -v (Software Version)
17
51
./buildDockerImage.sh -v 19.3.0
18
52
```
19
53
20
-
**NOTE**: To build RACStorage Image for 18.3.0, pass the version 18.3.0 to buildDockerImage.sh
21
-
22
54
For detailed usage of command, please execute folowing command:
23
55
```bash
24
56
./buildDockerImage.sh -h
25
57
```
26
58
27
-
###Create Bridge
28
-
Before creating container, create the bridge for NFS storage container.
59
+
## Create Bridge Network
60
+
Before creating container, create the bridge private network for NFS storage container.
To check the racstorage container/services creation logs , please tail docker logs. It will take 10 minutes to create the racnode-storage container service.
**NOTE**: Expose directory to container which has atleast 60GB. In the above example, we are using `/scratch/stage/rac-storage/$ORACLE_DBNAME` and you need to change values according to your env. Inside container, it will be /oradata and do not change this.
128
+
129
+
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.
130
+
131
+
**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).
132
+
45
133
46
-
###Running RACStorageServer Docker container
134
+
#### RAC Storage container for Docker Host Machine
47
135
Execute following command to create the container:
**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.
62
150
63
-
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.
151
+
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.
64
152
65
153
To check the racstorage container/services creation logs , please tail docker logs. It will take 10 minutes to create the racnode-storage container service.
66
154
@@ -76,10 +164,21 @@ runOracle.sh: NFS Server is up and running
76
164
Create NFS volume for /oradata
77
165
#################################################
78
166
```
79
-
**IMPORTANT:** The NFS volume must be `/oradata` which you will export to RAC containers for ASM storage. It will take 10 minutes for setting up NFS server.
80
167
81
-
### NFS Volume
82
-
Create NFS volume using following command:
168
+
**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.
169
+
170
+
### Create NFS Volume
171
+
Create NFS volume using following command on Podman Host:
Create NFS volume using following command on Docker Host:
83
182
84
183
```bash
85
184
docker volume create --driver local \
@@ -89,4 +188,10 @@ docker volume create --driver local \
89
188
racstorage
90
189
```
91
190
92
-
**IMPORTANT:** If you are not using 192.168.17.0/24 subnet then you need to change **addr=192.168.17.25** based on your environment.
191
+
**IMPORTANT:** If you are not using 192.168.17.0/24 subnet then you need to change **addr=192.168.17.80** based on your environment.
192
+
193
+
**IMPORTANT:** The NFS volume must be `/oradata` which you will export to RAC containers for ASM storage. It will take 10 minutes for setting up NFS server.
194
+
195
+
## Copyright
196
+
197
+
Copyright (c) 2014-2024 Oracle and/or its affiliates. All rights reserved.
Oracle RAC Storage Server Docker Image version $VERSION is ready to be extended:
115
113
116
114
--> $IMAGE_NAME
117
115
118
116
Build completed in $BUILD_ELAPSED seconds.
119
117
120
118
EOF
121
-
122
119
else
123
120
echo"Oracle RAC Storage Server Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation."
0 commit comments