Creating Oracle Real Application Clusters with Vagrant
Tags: oracle, vagrant, devops
Published: 2021-11-17 13:18:30

I tested some of the Vagrant projects made by [Tim Hall](https://oracle-base.com/misc/site-info) a while ago (it was this [blog very first post](https://project42.site/create-your-own-rac-cluster-with-virtualbox-vagrant/)), but I never got to use it too much since they were created to be used with VirtualBox.

Since I decided to get rid of my old lab and create a new one, I started looking for some options and found and [Oracle git repository for Vagrant deployments](https://github.com/oracle/vagrant-projects).
The repository is very complete and the "OracleRAC" deployment was almost perfect of what I wanted to start with, specially the option to use VirtualBox or KVM/libVirt

After some tests, I decided to fork the Oracle repository and add some changes so I could also learn a bit more about Vagrant and the scripts they added to it (they are very good way to understand how Oracle clusters are deployed or Databases are created)

If you are looking for a good and simple deployment, please do use the Oracle repository, I'm sharing my fork since they could be people thinking about doing the same and maybe this could help them in the process, but I don't really think I added anything very useful to most people.
Anyway, please have a look to the fork if you think it could be good for you :)

[https://github.com/Project-42/vagrant-projects/tree/main/OracleRAC](https://github.com/Project-42/vagrant-projects/tree/main/OracleRAC)



This is the list of modifications made to the amazing [original project](https://github.com/Project-42/vagrant-projects/tree/main/OracleRAC)
> 
- Second rac cluster added to be deployed independently
- Extra 19c Database created in cluster "rac1" *(See "db2_name:/db2_home/pdb2_name" etc.. under "config/vagrant.yml")*
- No databases are created in "rac2" *(The intention is to create more scripts to create Standby Databases there)*
- Extra packages installed *(nano highlight git mlocate bash-completion bash-it)*
- Extra packages to be able to install 11g databases *(elfutils-libelf-devel-0* gcc-4*x86_64* gcc-c++-4*x86_64* numactl-devel-2*x86_64*)*
- Changed Diskgroups to have External Redundancy and RDBMS compatibility to 11.2 in RECO case *(Seems like you still need to change "_asm_allow_older_clients" to TRUE to be able to install 11g)*
- Bash profile modified (Current SID configured and pmon processes running)
- oracle user added to sudoers with no password *(I know, not very secure, but this is for a test after all)*
- DNS 8.8.8.8 added to resolv.conf
- ORCL_software moved to have a central place for both Clusters
- Added extra script to modify oratab file *(Not working for second node of the cluster though)*
- Fred Denis [oracle-scripts](https://github.com/freddenis/oracle-scripts/) downloaded into */home/$USER/bin*
- sqlcl installed using [Connor Mcdonald "getsqlcl" script](https://connor-mcdonald.com/2021/10/29/keeping-my-sqlcl-toasty-fresh/)

![P42_Vagrant_RACs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gkwef2rpk2683m69oop.png)

The way is deployed is the same way than the original one, just need some extra configuration added into "config/vagrant.yml" and allocate Oracle Database 19c Software into "ORCL_software".

For more info, check the [Readme file](https://github.com/Project-42/vagrant-projects/blob/main/OracleRAC/README.md)

Hope you enjoy or at least makes you have a look of how useful Vagrant can be :)