Vagrant? Again? …Really?

(Yes. And Ansible. And Oracle…)

TL;DR. This is the repo I’ll be talking about. It can use Ansible to provision Oracle (SI/RAC), or it can just provision your infrastructure.

Like I’ve said before, I use Vagrant quite a lot and I basically have 2 configs that I use every time. One that uses an external ‘hosts.yml’ to define the hosts (ip, ram etc) and works really well for single instance type VM’s (be it for Oracle or something else).
Then I also had the config that was prepared for running RAC (based on the same configuration as we used for this)
It has a statically defined dns-setup (using bind), created shared disks and whatnot, and it’s been working fine for a long time.
What bugged me a little about the RAC config was:
1. All IP’s & the dns-setup were already defined, so if I wanted to set up 2 clusters I had to create another Vagrant config and hack the DNS config to use different IP’s and hostnames. Not a huge problem, but it bugged me a little.
2. All shared disks were created with the same size. If you wanted different sized disks there were ways around it though: you could set the size, run ‘vagrant up’, then shutdown the VM, change the config and alter the size of the disks, run ‘vagrant up’ again and repeat until you had the config you wanted.
Again, not a huge problem but I felt like it could be done differently.

Continue reading

Vagrant + Ansible + Oracle

So, I finally got my act together and created the repositories I’ve been meaning to create for ages, to automatically spin up a VM running Oracle.

They are:

and uses Vagrant to provision the machine, and then Ansible to automatically provision Oracle.

The readme’s for each repository should (hopefully) be enough to get going, but in short these are the steps required:

  • Clone the repositories
  • Download the 12.2 binaries and place them in the <reponame>/swrepo directory
  • vagrant up

This will (by default) give you a VM with:

  • Oracle Linux 7.3
  • Single instance 12.2.0.1 (cdb + 1 pdb)
  • Storage on either FS or ASM

If you want to test a different combination of OS version and Oracle version, just follow the instructions in the readme.

The Vagrant boxes are the same ones I talked about in this post.

If you decide to try this and have problems or just have questions, just ask here or open an issue for the corresponding repository.