Automatically installing Oracle 12cR2 with your Vagrant/VirtualBox deployment
This procedure will spin up a new fresh VM Spinning up a local 12cR2 Instance with Vagrant and Virtualbox.
After Vagrant, VirtualBox, and the plugin that allows them to interact are installed, we will invoke Vagrant commands to get this work done. Vagrant can also do things like mount drives and kick of shell scripts, that's where the heavy lifting will be done to kick off the installed with a silent response file.
The code we will be using is contained in a project on GitHub. Check out the Readme at https://github.com/totalamateurhour/oracle-12.2-vagrant
1) Get the files that will control this deployment:
cd \work git clone https://github.com/totalamateurhour/oracle-12.2-vagrant
- or -
Download and unzip https://github.com/totalamateurhour/oracle-12.2-vagrant/archive/master.zip to c:\work .
Now files will be available in the c:\work\oracle-12.2-vagrant project directory. The Vagrant specific files and scripts are in the 12.2.0.1 subdirectory.
2) Get the Oracle Binaries Install File
As per the project ReadMe, download the Oracle Database 12c Release 2 binaries linuxx64_12201_database.zip from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html .
Place this zip file in the c:\work\oracle-12.2-vagrant\12.2.0.1 directory. It will be mounted by the VM that starts up and accessed by the shell script that performs the install. Once you are in the VM you can access the c:\work\oracle-12.20-vagrant\12.2.0.1 files via the /vagrant subdirectory.
3) Customize Vagrantfile If Needed
Review the c:\work\oracle-12.2-vagrant\12.2.0.1\Vagrantfile text file. If you will only have 1 environment configured or this is your 1st install you can skip customization.
If you are managing more than one deployment, see the page in this notebook covering multiple environments.
4) Initiate Deployment
cd \work\oracle-12.2-vagrant\12.2.0.1 vagrant up
Vagrant will start and read the default .vagrantfile in the current directory to determine what needs to be done.
If no local cached copy of the desired VM is available (in this case Oracle's ol7-latest.box VM) it will be downloaded. After that the VM is started and any machine specific configs from the Vagrantfile are applied.
scripts/install.sh is run and passed the arguments supplied in the call.
Since we are starting up a fresh vm and customizing it with Oracle software it may take a while for the first startup.