In a previous article I have explained in quite a bit of detail how to create the Vagrant and Puppet scripts for stamping out a Virtual Box VM with Oracle Database XE 11gR2 and JDeveloper 12.1.3 (with ADF 12.1.3) on top of Ubuntu (64bit Linux): https://technology.amis.nl/2014/07/29/creating-automated-jdeveloper-12-1-3-oracle-xe-11gr2-environment-provisioning-using-vagrant-and-puppet/. If you want to learn a little more about Vagrant and Puppet, that might be an interesting read. However, if you do not need to go into the mechanics, and just want to get going as quickly as possible with a VM with said contents, the article you are reading now is what you need. Following the shortest route to a running VM – that is all we care about. Not about what has gone into the scripts and tools we indirectly make use of.
The process can be visualized like this:
The steps are (described for Windows 7 – but basically the same on any platform):
1. Download Vagrant
Download the installer for Vagrant from https://www.vagrantup.com/downloads.html (the latest version at the time of writing is 1.6.3)
For Windows this is a simple Windows installer (154 MB):
2. Install Vagrant on your local file system
Run the msi file downloaded in the previous step:
And click your way through the simple, straightforward and well known steps:
After clicking finish – the installation is complete.
A little unfortunate: you have to restart your system for the installation to be really done:
After the restart, you can verify the success of installing Vagrant by opening a command line and typing: vagrant -v:
3. Download Oracle Virtual Box
Download the VirtualBox installer from http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html – the latest version at the time of writing is 188.8.131.52. Note: you need to download for the host platform (in this article that is Windows) not the guest OS.
4. Install Oracle VirtualBox
Run the exe file downloaded in the previous steps:
Click your way through the installer – the steps are self guided:
Acknowledge the following question that pops up several times:
5. Download the Oracle Database XE installer
Download the Oracle Database XE installer from Oracle Database 11gR2 XE – note: in this case we need the version for Linux 64 because the database will be installed into the Guest aka the VM, running 64 bit Linux:
6. Download JDeveloper installer for Linux from Oracle Technology Network
Download the JDeveloper installer from Oracle JDeveloper 12.1.3 for Linux 64 bit
Again, because this software is installed into the Guest VM, we need to download the Linux installer – not the installer for the [Windows] host.
7. Download the Vagrant and Puppet configuration files from GitHub
You can download the requires files from GitHub in a ZIP-archive using: https://github.com/lucasjellema/adf-12-1-3-vm/archive/master.zip or you can use Git (related tools) and clone the repository at https://github.com/lucasjellema/adf-12-1-3-vm.git.
We’ll assume a simple download as ZIP file:
Extract the content from the zip file to any directory you fancy, for example c:\temp:
8. Move the installation resources for JDeveloper and Oracle Database XE to staging directory
Copy the installation resources for JDeveloper and Oracle Database XE – that were downloaded in steps 5 and 6 to the files directory under the adf-12-1-3-vm-master directory
9. Create the VM using Vagrant
Open a command line window and navigate to the adf-12-1-3-vm-master directory that was extracted from the GIT zip archive.
this will fire off Vagrant, based on the Vagrantfile you extracted from the GIT zip archive
The first time, the base box precise64 is not yet locally available, so it will be downloaded. This file is around 300 MB, so this action will take a while – depending on your internet connection.
Note that this step will run completely automatically – no manual intervention is required. Just sit back and relax for the next 15-20 minutes and your VM will be baked for you.
In VirtualBox, the new VM will be listed:
10. Run the VM with VirtualBox
Log in to the VM as vagrant/vagrant.
Note: you will be able to access APEX in a browser – either running inside the VM (at http://localhost:8080/apex) or in the host, thanks to port forwarding: http://127.0.0.1:8888/apex. To login to the (internal) administration page for APEX, use admin/oracle as the credentials.
Run JDeveloper: to run JDeveloper, click on the top icon on the desktop and type jdev as search string. The JDeveloper icon appears. (note: you can drag the icon to the launcher bar on the left)
Click it and JDeveloper is started.
The launch image is shown:
You have to reply to familiar dialogs:
and finally JDeveloper’s IDE appears.
Perhaps create database connection
Show the Resources window (using the menu entry under Windows) and add a new IDE Connection of type Database:
Configure the database connection – easy enough with username and password equal to wc and the default values for Driver, Hostname and SID equal to the ones we need. Press Test Connection to enjoy the success message. Then press OK to close the dialog.
In the Connections Navigator, you can verify which database objects have been created in the final stages of the provisioning actions (a few tables and one user defined type):
Run Integrated WebLogic Server
Configure the WebLogic Server details:
And press OK to create the domain:
In this case, the domain configuration took very long (over 30 minutes) – I hope that does not prove typical. Note: a second attempt required about 13 minutes – more reasonable.
After creating the domain, the Integrated WLS is started:
And in the local Firefox browser, the Administration Console can be opened.
Note: The WebLogic Console can also be accessed in a browser running on the host: using http://127.0.0.1:7501/console, you will be able to access the console – and of course other applications running on the Integrated WebLogic Server.
The Virtual Machine is not ready in a flash. First you have to perform five downloads and two installations. This takes time – but very little manual intervention. Note that two downloads and the two installations are one time only: Oracle VirtualBox and Vagrant can be reused many times, for different VMs. The downloads of the Oracle Database installer and the JDeveloper installer are unavoidable. Once all files are downloaded and a simple archive is expanded, you only have to type a simple command line instruction and the actual installation is done for you.
I have not exactly timed the whole process – as I was writing the article while going through the motions. Of course the exact timing depends on your network speed. My guess would be:
- Download time: 40-60 minutes (no manual intervention required once started)
- Vagrant VM creation time: 15 minutes ( no manual intervention required once started)
- Manual actions (installations, explode archive, move files, run Vagrant): 5-10 minutes
Your personal investment is about 15 minutes. Once Vagrant and Oracle VirtualBox are installed, the effort is reduced to less than 10 [and close to 5]minutes.