Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest 21c podman changes #2911

Merged
merged 55 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8f505c0
latest 21c podman changes
s1saurabh Jan 31, 2025
1f4ba56
Ol8 changes
s1saurabh Jan 31, 2025
a59f0e0
remove old versions
s1saurabh Jan 31, 2025
e0fc121
remove unnecessary files
s1saurabh Jan 31, 2025
ef6a997
remove unnecessary files
s1saurabh Jan 31, 2025
69d59de
lint fixes
s1saurabh Jan 31, 2025
9c13ff6
linter fixes
s1saurabh Jan 31, 2025
cfb939f
shellcheck fix for storage container
s1saurabh Feb 1, 2025
7c18374
lint fixes
s1saurabh Feb 1, 2025
5a5345f
lint fixes
s1saurabh Feb 1, 2025
55a9874
containerfiel fixes
s1saurabh Feb 1, 2025
2adeaa0
dockerfiel lint fix
s1saurabh Feb 1, 2025
d0af650
fix readme file
s1saurabh Feb 1, 2025
2f6a886
fix files
s1saurabh Feb 1, 2025
16064ca
lint fixes
s1saurabh Feb 1, 2025
6724b1a
fix lint issues
s1saurabh Feb 1, 2025
4632055
lint issues
s1saurabh Feb 1, 2025
f1e8062
indentation fixes
s1saurabh Feb 1, 2025
f3e7870
remove extra spaces
s1saurabh Feb 1, 2025
b3faad0
lin fixes
s1saurabh Feb 1, 2025
8747299
lint fixes
s1saurabh Feb 1, 2025
bf14aad
lint fixes
s1saurabh Feb 1, 2025
28525fc
lint fixes
s1saurabh Feb 1, 2025
2fa66fe
lint fixes
s1saurabh Feb 1, 2025
bc1b773
lint fixes
s1saurabh Feb 1, 2025
9618833
lint fixes
s1saurabh Feb 1, 2025
ddc1cad
21c change from 21.3.0
s1saurabh Feb 3, 2025
d336354
21c changes
s1saurabh Feb 3, 2025
c3d719d
pick latest on patch RAC container
s1saurabh Feb 7, 2025
6705c22
Merge branch 'main' into latest21c
s1saurabh Feb 7, 2025
90f7676
lint fixes
s1saurabh Feb 7, 2025
54da469
Merge branch 'latest21c' of github.com:s1saurabh/docker-images into l…
s1saurabh Feb 7, 2025
e62390e
lint fixes
s1saurabh Feb 7, 2025
3169070
lint fixes
s1saurabh Feb 7, 2025
fefaf04
21.3.0 to 21c reference change
s1saurabh Feb 10, 2025
ab46ade
correct 21c size of image
s1saurabh Feb 10, 2025
7f4596f
pick latest Containerfile changes
s1saurabh Feb 11, 2025
45ea13f
fix copyright year to 2025
s1saurabh Feb 11, 2025
e5a7c84
final changes
s1saurabh Feb 11, 2025
45d422a
pick oracle restart changes
s1saurabh Feb 11, 2025
7bbcd92
pick style changes
s1saurabh Feb 11, 2025
3bc2855
copyright changes
s1saurabh Feb 11, 2025
95260db
copyright changes
s1saurabh Feb 11, 2025
68ddbb9
copyright changes
s1saurabh Feb 11, 2025
b158b5b
lint fixes
s1saurabh Feb 11, 2025
1bb97e2
lint fixes
s1saurabh Feb 11, 2025
fdd580b
DNS changed from dockerfile to containerfiles
s1saurabh Feb 11, 2025
080303e
lint fix
s1saurabh Feb 11, 2025
d27dbbc
cleanup unnecessary files
s1saurabh Feb 12, 2025
b072347
pick correct 19c containerfile
s1saurabh Feb 13, 2025
fe9dc6c
os check fix
s1saurabh Feb 14, 2025
9437f0b
pull latest doc changes
s1saurabh Feb 17, 2025
ebe6861
lint fixes
s1saurabh Feb 17, 2025
ae329ba
lint fixes
s1saurabh Feb 17, 2025
f16d642
Merge branch 'main' into latest21c
psaini79 Feb 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates.
# Copyright (c) 2018-2025 Oracle and/or its affiliates.
#
# shellcheck disable=SC2154
usage() {
Expand Down Expand Up @@ -121,7 +121,7 @@ echo "Building image '$IMAGE_NAME' ..."

# BUILD THE IMAGE (replace all environment variables)
BUILD_START=$(date '+%s')
if docker build --force-rm=true --no-cache=true "${DOCKEROPS[@]}" "${PROXY_SETTINGS[@]}" -t "$IMAGE_NAME" -f Dockerfile .; then
if docker build --force-rm=true --no-cache=true "${DOCKEROPS[@]}" "${PROXY_SETTINGS[@]}" -t "$IMAGE_NAME" -f Containerfile .; then
BUILD_END=$(date '+%s')
BUILD_ELAPSED=$((BUILD_END - BUILD_START))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected], [email protected]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected], [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected], [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018-2025 Oracle and/or its affiliates. All rights reserved.
#
# Since: January, 2018
# Author: [email protected]
Expand Down
245 changes: 138 additions & 107 deletions OracleDatabase/RAC/OracleRACStorageServer/README.md

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions OracleDatabase/RAC/OracleRACStorageServer/README1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Oracle ASM on NFS Server for RAC testing
Sample Docker and Podman build files to facilitate installation, configuration, and environment setup for DevOps users.

**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.

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 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 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 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
```

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
```

For detailed usage of command, please execute folowing command:
```bash
cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleRACStorageServer/dockerfiles
./buildDockerImage.sh -h
```
### How to build NFS Storage Container Image on Podman 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.

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
```
You would see successful build message similar like below-
```bash
Oracle RAC Storage Server Podman Image version latest is ready to be extended:

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

## Create Bridge Network
Before creating container, create the bridge private network for NFS storage container.

On the host-
```bash
docker network create --driver=bridge --subnet=192.168.17.0/24 rac_priv1_nw
```

**Note:** You can change subnet according to your environment.


## NFS Server installation on Host
Ensure to install NFS server rpms on host to utilize NFS volumes in containers-

```bash
yum -y install nfs-utils
```
## Running RACStorageServer 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

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

If SELinux is enabled on Podman Host (you can check by running `sestatus` command), then execute below to make SELinux policy as `permissive` and reboot the host machine. This will allow permissions to write to `asm-disks*` in the `/oradata` folder inside the podman containers-
```bash
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
reboot
```

Execute following command to create the container:

```bash
export ORACLE_DBNAME=ORCLCDB
podman run -d -t \
--hostname racnode-storage \
--dns-search=example.com \
--cap-add SYS_ADMIN \
--cap-add AUDIT_WRITE \
--cap-add NET_ADMIN \
--volume /scratch/stage/rac-storage/$ORACLE_DBNAME:/oradata \
--network=rac_priv1_nw \
--ip=192.168.17.80 \
--systemd=always \
--restart=always \
--name racnode-storage \
localhost/oracle/rac-storage-server:latest
```

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
podman exec racnode-storage tail -f /tmp/storage_setup.log
```
You would see successful message like below -
```bash
#################################################
Setup Completed
#################################################
```

**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.

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.

**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).


**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.

### Create NFS Volume
Create NFS volume using following command on Podman 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 192.168.17.0/24 subnet then you need to change **addr=192.168.17.25** based on your environment.

**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.

## Copyright

Copyright (c) 2014-2024 Oracle and/or its affiliates. All rights reserved.
Loading