Skip to content

Commit ee62285

Browse files
Merge pull request #470 from rcitton/rac@ol8
RAC on OL8
2 parents 98f6aac + 091ef9d commit ee62285

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3331
-260
lines changed

OracleRAC/OL7/README.md

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
# Oracle Real Application Cluster (RAC) Vagrant project on VirtualBox or KVM/libVirt provider
2+
3+
###### Author: Ruggero Citton (<[email protected]>) - Orale RAC Pack, Cloud Innovation and Solution Engineering Team
4+
5+
This directory contains Vagrant build files to provision automatically
6+
two Oracle RAC nodes (12.2, 18c, 19c, 21c), using Vagrant, Oracle Linux 7 and shell scripts.
7+
8+
![](images/OracleRAC.png)
9+
10+
## Prerequisites
11+
12+
1. Read the [prerequisites in the top level README](../README.md#prerequisites) to set up Vagrant with either VirtualBox or KVM
13+
1. You need to download Database binary separately
14+
15+
## Free disk space requirement
16+
17+
- Grid Infrastructure and Database binary zip under "./ORCL_software": ~9.3 Gb
18+
- Grid Infrastructure and Database binary on u01 vdisk (node1/node2): ~20 Gb
19+
- OS guest vdisk (node1/node2): ~2 Gb
20+
- In case of KVM/libVirt provider, the disk is created under `storage pool = "storage_pool_name"`
21+
- In case of VirtualBox
22+
- Use `VBoxManage list systemproperties |grep folder` to find out the current VM default location
23+
- Use `VBoxManage setproperty machinefolder <your path>` to set VM default location
24+
- ASM shared virtual disks (fixed size): ~80 Gb
25+
26+
## Memory requirement
27+
28+
Running two nodes RAC at least 6Gb per node are required
29+
Using Oracle Restart, only one node it's active
30+
31+
## VirtualBox host-Only
32+
33+
The guest VMs are using an "host-Only" network defined as 'vboxnet0'
34+
35+
## Getting started
36+
37+
1. Clone this repository `git clone https://github.com/oracle/vagrant-projects.git`
38+
2. Change into OracleRAC folder (`/repo clone path/vagrant-projects/RACPack/OracleRAC`)
39+
3. Download Grid Infrastructure and Database binary from OTN into `./ORCL_software` folder (*)
40+
4. Run `vagrant up`
41+
5. Connect to the database.
42+
6. You can shut down the VM via the usual `vagrant halt` and the start it up again via `vagrant up`.
43+
44+
(*) Download Grid Infrastructure and Database binary from OTN into `ORCL_software` folder
45+
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
46+
47+
Accept License Agreement
48+
go to version (12.2, 18c, 19c, 21c) for Linux x86-64 you need -> "See All", example
49+
50+
* Oracle Database 21c Grid Infrastructure (21.3) for Linux x86-64
51+
LINUX.X64_213000_grid_home.zip (2,422,217,613 bytes)
52+
(sha256sum - 070d4471bc067b1290bdcee6b1c1fff2f21329d2839301e334bcb2a3d12353a3)
53+
54+
* Oracle Database 21c (21.3) for Linux x86-64
55+
LINUX.X64_213000_db_home.zip (3,109,225,519 bytes)
56+
(sha256sum - c05d5c32a72b9bf84ab6babb49aee99cbb403930406aabe3cf2f94f1d35e0916)
57+
58+
## Customization
59+
60+
You can customize your Oracle environment by amending the parameters in the configuration file: `./config/vagrant.yml`
61+
The following can be customized:
62+
63+
#### node1/node2
64+
65+
- `vm_name`: VM Guest partial name. The full name will be <prefix_name>-<vm_name>
66+
- `mem_size`: VM Guest memory size Mb (minimum 6Gb --> 6144)
67+
- `cpus`: VM Guest virtual cores
68+
- `public_ip`: VM public ip. VirtualBox `vboxnet0` hostonly is in use
69+
- `vip_ip`: Oracle RAC VirtualIP (VIP). VirtualBox 'vboxnet0' hostonly is in use
70+
- `private_ip`: VM private ip.
71+
- `storage_pool_name`: KVM/libVirt storage pool name
72+
- `u01_disk`: VirtualBox Oracle binary virtual disk (u01) file path
73+
74+
#### shared network
75+
76+
- `prefix_name`: VM Guest prefix name (the GI cluster name will be: <prefix_name>-c')
77+
- `domain` : VM Guest domain name
78+
- `scan_ip1`: Oracle RAC SCAN IP1
79+
- `scan_ip2`: Oracle RAC SCAN IP2
80+
- `scan_ip3`: Oracle RAC SCAN IP3
81+
82+
#### shared storage
83+
84+
- `storage_pool_name`: KVM/libVirt Oradata dbf KVM storage pool name
85+
- `oradata_disk_path`: VirtualBox Oradata dbf path
86+
- `asm_disk_num`: Oracle RAC Automatic Storage Manager virtual disk number (min 4)
87+
- `asm_disk_size`: Oracle RAC Automatic Storage Manager virtual disk size in Gb (at least 10)
88+
- `asm_lib_type`: Oracle ASM filter driver (asmfd) or Oracle ASMlib (asmlib)
89+
- `p1_ratio`: ASM disks partiton ration (%). Min 10%, Max 80%
90+
91+
#### environment
92+
93+
- `provider`: It's defining the provider to be used: 'libvirt' or 'virtualbox'
94+
- `grid_software`: Oracle Database XXc Grid Infrastructure for Linux x86-64 zip file
95+
- `db_software`: Oracle Database XXc for Linux x86-64 zip file
96+
- `root_password`: VM Guest root password
97+
- `grid_password`: VM Guest grid password
98+
- `oracle_password`: VM Guest oracle password
99+
- `sys_password`: Oracled RDBMS SYS password
100+
- `pdb_password`: Oracled PDB SYS password
101+
- `ora_languages`: Oracle products languages
102+
- `nomgmtdb`: Oracle GI Management database creation (true/false)
103+
- `orestart`: Oracle GI configured as Oracle Restart (true/false)
104+
- `db_name`: Oracle RDBMS database name
105+
- `pdb_name`: Oracle RDBMS pluggable database name
106+
- `db_type`: Oracle RDBMS type: RAC, RACONE, SI (single Instance)
107+
- `cdb`: Oracle RDBMS database created as container (true/false)
108+
109+
#### Virtualbox provider Example:
110+
111+
node1:
112+
vm_name: node1
113+
mem_size: 8192
114+
cpus: 2
115+
public_ip: 192.168.56.111
116+
vip_ip: 192.168.56.112
117+
private_ip: 192.168.200.111
118+
u01_disk: ./node1_u01.vdi
119+
120+
node2:
121+
vm_name: node2
122+
mem_size: 8192
123+
cpus: 2
124+
public_ip: 192.168.56.121
125+
vip_ip: 192.168.56.122
126+
private_ip: 192.168.200.122
127+
u01_disk: ./node2_u01.vdi
128+
129+
shared:
130+
prefix_name: vgt-ol7-rac
131+
# ---------------------------------------------
132+
domain: localdomain
133+
scan_ip1: 192.168.56.115
134+
scan_ip2: 192.168.56.116
135+
scan_ip3: 192.168.56.117
136+
# ---------------------------------------------
137+
non_rotational: 'on'
138+
# ---------------------------------------------
139+
asm_disk_path:
140+
asm_disk_num: 4
141+
asm_disk_size: 20
142+
asm_lib_type: asmlib
143+
p1_ratio: 80
144+
# ---------------------------------------------
145+
146+
env:
147+
provider: virtualbox
148+
# ---------------------------------------------
149+
gi_software: LINUX.X64_213000_grid_home.zip
150+
db_software: LINUX.X64_213000_db_home.zip
151+
# ---------------------------------------------
152+
root_password: welcome1
153+
grid_password: welcome1
154+
oracle_password: welcome1
155+
sys_password: welcome1
156+
pdb_password: welcome1
157+
# ---------------------------------------------
158+
ora_languages: en,en_GB
159+
# ---------------------------------------------
160+
nomgmtdb: true
161+
orestart: false
162+
# ---------------------------------------------
163+
db_name: DB213H1
164+
pdb_name: PDB1
165+
db_type: RAC
166+
cdb: false
167+
# ---------------------------------------------
168+
169+
#### KVM/libVirt provider Example:
170+
171+
node1:
172+
vm_name: node1
173+
mem_size: 8192
174+
cpus: 2
175+
public_ip: 192.168.125.111
176+
vip_ip: 192.168.125.112
177+
private_ip: 192.168.200.111
178+
storage_pool_name: Vagrant_KVM_Storage
179+
180+
node2:
181+
vm_name: node2
182+
mem_size: 8192
183+
cpus: 2
184+
public_ip: 192.168.125.121
185+
vip_ip: 192.168.125.122
186+
private_ip: 192.168.200.122
187+
storage_pool_name: Vagrant_KVM_Storage
188+
189+
shared:
190+
prefix_name: vgt-ol7-rac
191+
# ---------------------------------------------
192+
domain: localdomain
193+
scan_ip1: 192.168.125.115
194+
scan_ip2: 192.168.125.116
195+
scan_ip3: 192.168.125.117
196+
# ---------------------------------------------
197+
asm_disk_num: 4
198+
asm_disk_size: 20
199+
asm_lib_type: asmlib
200+
p1_ratio: 80
201+
storage_pool_name: Vagrant_KVM_Storage
202+
# ---------------------------------------------
203+
204+
env:
205+
provider: libvirt
206+
# ---------------------------------------------
207+
gi_software: LINUX.X64_213000_grid_home.zip
208+
db_software: LINUX.X64_213000_db_home.zip
209+
# ---------------------------------------------
210+
root_password: welcome1
211+
grid_password: welcome1
212+
oracle_password: welcome1
213+
sys_password: welcome1
214+
pdb_password: welcome1
215+
# ---------------------------------------------
216+
ora_languages: en,en_GB
217+
# ---------------------------------------------
218+
nomgmtdb: true
219+
orestart: false
220+
# ---------------------------------------------
221+
db_name: DB213H1
222+
pdb_name: PDB1
223+
db_type: RAC
224+
cdb: false
225+
# ---------------------------------------------
226+
227+
## Running scripts after setup
228+
229+
You can have the installer run scripts after setup by putting them in the `userscripts` directory below the directory where you have this file checked out. Any shell (`.sh`) or SQL (`.sql`) scripts you put in the `userscripts` directory will be executed by the installer after the database is set up and started. Only shell and SQL scripts will be executed; all other files will be ignored. These scripts are completely optional.
230+
Shell scripts will be executed as the root user, which has sudo privileges. SQL scripts will be executed as SYS.
231+
To run scripts in a specific order, prefix the file names with a number, e.g., `01_shellscript.sh`, `02_tablespaces.sql`, `03_shellscript2.sh`, etc.
232+
233+
## Note
234+
235+
- `SYSTEM_TIMEZONE`: `automatically set (see below)`
236+
The system time zone is used by the database for SYSDATE/SYSTIMESTAMP.
237+
The guest time zone will be set to the host time zone when the host time zone is a full hour offset from GMT.
238+
When the host time zone isn't a full hour offset from GMT (e.g., in India and parts of Australia), the guest time zone will be set to UTC.
239+
You can specify a different time zone using a time zone name (e.g., "America/Los_Angeles") or an offset from GMT (e.g., "Etc/GMT-2"). For more information on specifying time zones, see [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
240+
- Wallet Zip file location `/tmp/wallet_<pdb name>.zip`.
241+
Copy the file on client machine, unzip and set TNS_ADMIN to Wallet loc. Connect to DB using Oracle Sql Client or using your App
242+
- Using KVM/libVirt provider you may need add a firewall rule to permit NFS shared folder mounted on the guest
243+
244+
example: using 'uwf' : `sudo ufw allow to 192.168.121.1` where 192.168.121.1 is the IP for the `vagrant-libvirt` network (created by vagrant automatically)
245+
246+
virsh net-dumpxml vagrant-libvirt
247+
<network connections='1' ipv6='yes'>
248+
<name>vagrant-libvirt</name>
249+
<uuid>d2579032-4e5e-4c3f-9d42-19b6c64ac609</uuid>
250+
<forward mode='nat'>
251+
<nat>
252+
<port start='1024' end='65535'/>
253+
</nat>
254+
</forward>
255+
<bridge name='virbr1' stp='on' delay='0'/>
256+
<mac address='52:54:00:05:12:14'/>
257+
<ip address='192.168.121.1' netmask='255.255.255.0'>
258+
<dhcp>
259+
<range start='192.168.121.1' end='192.168.121.254'/>
260+
</dhcp>
261+
</ip>
262+
</network>
263+
- If you are behind a proxy, set the following env variables
264+
- (Linux/MacOSX)
265+
- export http_proxy=http://proxy:port
266+
- export https_proxy=https://proxy:port
267+
-(Windows)
268+
- set http_proxy=http://proxy:port
269+
- set https_proxy=https://proxy:port
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)