|
1 |
| -# Oracle DNS Server to resolve Oracle RAC IPs |
2 |
| - |
3 |
| -Sample container build files to facilitate installation, configuration, and environment setup for DevOps users. |
4 |
| - |
5 |
| -**IMPORTANT:** This image can be used to setup DNS server for RAC. You can skip this step if you already have a DNS server configure and which can be used for Oracle RAC. You should ensure that the DNS server container is up before starting RAC. This image is provided for test purposes only. |
6 |
| - |
7 |
| -## How to build and run |
8 |
| -You need to make sure that you have at least 350MB of space available for the container to create the files for RAC DNS server. |
9 |
| - |
10 |
| -**IMPORTANT:** If you are behind a proxy, you need to set the `http_proxy or https_proxy` env variable based on your environment 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. |
11 |
| -```bash |
12 |
| -dnf install podman-docker -y |
13 |
| -``` |
14 |
| - |
15 |
| -The `buildContainerImage.sh` script can assist with building the images. See below for instructions and usage. |
16 |
| - |
17 |
| -The `buildContainerImage.sh` script is a utility shell script that performs MD5 checks and is an easy way to get started. Users can also use the docker build command to build an image with custom configuration parameters. To run the script, go into the `dockerfiles` folder and run the `buildContainerImage.sh` script: |
18 |
| - |
19 |
| -```bash |
20 |
| -cd <git-cloned-path>/docker-images/OracleDatabase/RAC/OracleDNSServer/dockerfiles |
21 |
| -./buildContainerImage.sh-v <Software Version> |
22 |
| -./buildContainerImage.sh -v latest |
23 |
| -``` |
24 |
| -NOTE: To build the DNS server image, pass the version latest to `buildContainerImage.sh`. The RAC DNS server image is not tied to any release of the RAC release, you can use `latest` version to build the image. |
25 |
| - |
26 |
| -For detailed usage instructions, please execute the following command: |
27 |
| - |
28 |
| -```bash |
29 |
| -./buildContainerImage.sh -h |
30 |
| -``` |
31 |
| - |
32 |
| -## Create bridge |
33 |
| -Before you create the DNS server container, ensure you have created the required network bridges so you can attach the DNS server to the correct bridge. |
34 |
| - |
35 |
| -```bash |
36 |
| -docker network create --driver=bridge --subnet=172.16.1.0/24 rac_pub1_nw |
37 |
| -docker network create --driver=bridge --subnet=192.168.17.0/24 rac_priv1_nw |
38 |
| -``` |
39 |
| -**Note:** You can change the subnet according to your environment. |
40 |
| - |
41 |
| -## Running RAC DNS server container |
42 |
| -### Execute following command to create the container on Docker Host |
43 |
| - |
44 |
| -```bash |
45 |
| -docker create --hostname racdns \ |
46 |
| - --dns-search=example.com \ |
47 |
| - --cap-add=AUDIT_WRITE \ |
48 |
| - -e DOMAIN_NAME="example.com" \ |
49 |
| - -e WEBMIN_ENABLED=false \ |
50 |
| - -e RAC_NODE_NAME_PREFIXD="racnoded" \ |
51 |
| - -e SETUP_DNS_CONFIG_FILES="setup_true" \ |
52 |
| - --privileged=false \ |
53 |
| - --name rac-dnsserver \ |
54 |
| - oracle/rac-dnsserver:latest |
55 |
| -``` |
56 |
| -Connect networks to DNS container in DockerHost- |
57 |
| -```bash |
58 |
| -docker network disconnect bridge rac-dnsserver |
59 |
| -docker network connect rac_pub1_nw --ip 172.16.1.25 rac-dnsserver |
60 |
| -docker network connect rac_priv1_nw --ip 192.168.17.25 rac-dnsserver |
61 |
| -docker start rac-dnsserver |
62 |
| -``` |
63 |
| - |
64 |
| -### Execute following command to create the container on Podman Host |
65 |
| - |
66 |
| -```bash |
67 |
| -podman create --hostname racdns \ |
68 |
| - --dns-search=example.com \ |
69 |
| - --cap-add=AUDIT_WRITE \ |
70 |
| - -e DOMAIN_NAME="example.com" \ |
71 |
| - -e WEBMIN_ENABLED=false \ |
72 |
| - -e RAC_NODE_NAME_PREFIXP="racnodep" \ |
73 |
| - -e SETUP_DNS_CONFIG_FILES="setup_true" \ |
74 |
| - --privileged=false \ |
75 |
| - --name rac-dnsserver \ |
76 |
| - oracle/rac-dnsserver:latest |
77 |
| -``` |
78 |
| - |
79 |
| -Connect networks to DNS container in PodmanHost- |
80 |
| -```bash |
81 |
| -podman network disconnect podman rac-dnsserver |
82 |
| -podman network connect rac_pub1_nw --ip 172.16.1.25 rac-dnsserver |
83 |
| -podman network connect rac_priv1_nw --ip 192.168.17.25 rac-dnsserver |
84 |
| -podman start rac-dnsserver |
85 |
| -``` |
86 |
| -In the above example, we used **172.16.1.0/24** subnet for the DNS server. You can change the subnet values according to your environment. |
87 |
| - |
88 |
| -Also, `RAC_NODE_NAME_PREFIXD`, `RAC_NODE_NAME_PREFIXP`, and `PRIVATE_DOMAIN_NAME` are optional environment variables. You can utilize one depending on whether you are planning to use DNS Server on Docker or Podman Host and want to utilize the Private Network Domain respectively. |
89 |
| - |
90 |
| -To check the DNS server container/services creation logs, please tail the Docker logs. It may take up to 2 minutes for the racdns container to start completely. |
91 |
| - |
92 |
| -```bash |
93 |
| -docker logs -f rac-dnsserver |
94 |
| -``` |
95 |
| - |
96 |
| -you should see the following in docker logs output: |
97 |
| - |
98 |
| -```bash |
99 |
| -################################################# |
100 |
| -DNS Server IS READY TO USE! |
101 |
| -################################################# |
102 |
| -``` |
| 1 | +# Oracle DNS Server to resolve Oracle RAC IPs |
| 2 | + |
| 3 | +Example container build files to facilitate installation, configuration, and environment setup for DevOps users. |
| 4 | + |
| 5 | +**IMPORTANT:** This image can be used to set up a DNS server for Oracle RAC. You can skip this step if you already have a DNS server configured that you can use for Oracle RAC. You should ensure that the DNS server container is up before you start the Oracle RAC database. |
| 6 | + |
| 7 | +## How to build and run |
| 8 | +You need to ensure that you have at least 350 MB of space available for the container to create the files for the Oracle RAC DNS server. |
| 9 | + |
| 10 | +**IMPORTANT:** If you are behind a proxy, then you must set the `http_proxy or https_proxy` env variable based on your environment before building the image. |
| 11 | + |
| 12 | +The `buildContainerImage.sh` script can assist with building the images. See examples below for instructions and usage. |
| 13 | + |
| 14 | +The `buildContainerImage.sh` script is a utility shell script that performs MD5 checks. It provides an easy way to get started. Users can also use the podman build command to build an image with custom configuration parameters. |
| 15 | +To run the script, go into the `containerfiles` folder and run the `buildContainerImage.sh` script as given below. Set the https_proxy and http_proxy as appropriate for your environment. |
| 16 | + |
| 17 | +```bash |
| 18 | +export https_proxy=<https://PROXY_HOST:PROXY_PORT> |
| 19 | +export http_proxy=<http://PROXY_HOST:PROXY_PORT> |
| 20 | + |
| 21 | +./buildContainerImage.sh-v <Software Version> |
| 22 | +./buildContainerImage.sh -v latest |
| 23 | +``` |
| 24 | +NOTE: To build the DNS server image, pass the latest version to `buildContainerImage.sh`. The Oracle RAC DNS server image is not tied to any Oracle RAC release, so you can use `latest` version to build the image. |
| 25 | + |
| 26 | +For detailed usage instructions, please run the following command: |
| 27 | + |
| 28 | +```bash |
| 29 | +./buildContainerImage.sh -h |
| 30 | +``` |
| 31 | + |
| 32 | +## Create container networks |
| 33 | +Before you create the DNS server container, ensure that you have created the required networks, so you can attach the DNS server to the correct network addresses. The following are examples of creating `bridge`, `macvlan` or `ipvlan` [networks](https://docs.podman.io/en/latest/markdown/podman-network-create.1.html). |
| 34 | + |
| 35 | +Example of creating bridge networks- |
| 36 | +```bash |
| 37 | +podman network create --driver=bridge --subnet=10.0.20.0/24 rac_pub1_nw |
| 38 | +``` |
| 39 | +Example of creating macvlan networks- |
| 40 | +```bash |
| 41 | +podman network create -d macvlan --subnet=10.0.20.0/24 -o parent=ens5 rac_pub1_nw |
| 42 | +``` |
| 43 | + |
| 44 | +Example of creating ipvlan networks- |
| 45 | +```bash |
| 46 | +podman network create -d ipvlan --subnet=10.0.20.0/24 -o parent=ens5 rac_pub1_nw |
| 47 | +``` |
| 48 | + |
| 49 | +**Note:** You can change the subnet and parent network interfaces according to your environment. In this case, we have chosen `10.0.20` as prefix to subnet. |
| 50 | + |
| 51 | +### Running RAC DNS server container |
| 52 | +Run the following commands in sequence to create the container: |
| 53 | + |
| 54 | +```bash |
| 55 | +podman run -d -t \ |
| 56 | + --hostname racdns \ |
| 57 | + --dns-search=example.info \ |
| 58 | + --cap-add=AUDIT_WRITE \ |
| 59 | + -e DOMAIN_NAME="example.info" \ |
| 60 | + -e WEBMIN_ENABLED=false \ |
| 61 | + -e RAC_NODE_NAME_PREFIXP="racnodep" \ |
| 62 | + -e SETUP_DNS_CONFIG_FILES="setup_true" \ |
| 63 | + --network=rac_pub1_nw --ip=10.0.20.25 \ |
| 64 | + --privileged=false \ |
| 65 | + --name rac-dnsserver \ |
| 66 | + localhost/oracle/rac-dnsserver:latest |
| 67 | +``` |
| 68 | + |
| 69 | +To check the DNS server container and services creation logs, you can run a tail command on the podman logs. It can take up to two minutes for the racdns container to start completely. |
| 70 | + |
| 71 | +```bash |
| 72 | +podman logs rac-dnsserver |
| 73 | +``` |
| 74 | + |
| 75 | +you should see the following in podman logs output: |
| 76 | + |
| 77 | +```bash |
| 78 | +################################################# |
| 79 | + DNS Server IS READY TO USE! |
| 80 | +################################################# |
| 81 | +``` |
| 82 | +**Note:** You also have the option to add a private domain name (if required) using an environment variable. For example, you can add `-e PRIVATE_DOMAIN_NAME="example-priv.info"` and also add `RAC_NODE_NAME_PREFIXD="racnoded"` for the Docker domain prefix. |
| 83 | + |
| 84 | +## Environment Variables Explained |
| 85 | +| Environment Variable | Description | |
| 86 | +|-------------------------|---------------------------------------------------------------------------------------------------------------------| |
| 87 | +| DOMAIN_NAME | The domain name associated with the container environment. | |
| 88 | +| WEBMIN_ENABLED | Indicates whether Webmin is enabled or not. | |
| 89 | +| RAC_NODE_NAME_PREFIXP | Prefix used for the RAC container node names. | |
| 90 | +| SETUP_DNS_CONFIG_FILES | Indicates whether DNS configuration files are set up (e.g `setup_true`). | |
| 91 | + |
| 92 | +## DNS Entries Explained |
| 93 | + |
| 94 | +| Entity | Description | |
| 95 | +|-----------------------------|------------------------------------------------------------------------------| |
| 96 | +| App Servers (appmc1-5) | These are application servers mapped to IP addresses ranging from 10.0.20.125 to 10.0.20.129. | |
| 97 | +| Database Servers (dbmc1-5) | These are database servers mapped to IP addresses ranging from 10.0.20.195 to 10.0.20.199. | |
| 98 | +| RAC Nodes (racnodep1-25) | These are clustered database nodes mapped to IP addresses ranging from 10.0.20.170 to 10.0.20.194. | |
| 99 | +| RAC Node VIPs (racnodep1-25-vip) | These are virtual IP addresses for RAC nodes, each mapped to respective IPs. | |
| 100 | +| Clients (client1-5) | These are client machines mapped to IP addresses ranging from 10.0.20.225 to 10.0.20.229. | |
| 101 | +| RAC Node SCAN IPs (racnodepc1-5-scan) | These are SCAN IPs for RAC nodes. | |
| 102 | +| RAC Node Cluster Manager IPs (racnodepc1-2-cman) | These are cluster manager IPs for RAC nodes. | |
| 103 | + |
| 104 | +For example, appmc1 resolves to 10.0.20.125, dbmc1 resolves to 10.0.20.195, and so on. |
| 105 | + |
| 106 | +**Note:** You can change the subnet and parent network interfaces according to your environment. In this case, we have chosen `10.0.20` as prefix to subnet. |
| 107 | + |
| 108 | +## License |
| 109 | + |
| 110 | +Unless otherwise noted, all scripts and files hosted in this repository that are required to build the container images are released under the UPL 1.0 license. |
| 111 | + |
| 112 | +## Copyright |
| 113 | + |
| 114 | +Copyright (c) 2014-2025 Oracle and/or its affiliates. |
0 commit comments