Saturday 9 May 2015

Git & Vagrant for Dummies

Refers to github project train.oracle12.migration

The Shortest Introduction Possible for Oracle IT Crowd

Some friends in the Oracle IT Crowd have problems to understand and setup my project. Here are the basic steps.


1. Enable Virtualisation in your BIOS.

2.  Start first of all with downloading Virtualbox
Go to http://virtualbox.org and choose a package for your operating system. This requires setting up a kernel driver. On Windows and Mac OS X, the installation of the driver happens automatically. On Linux, you may need to install extra packages and run an extra command in order to set it up. Extra packages generally include kernel headers, DKMS (Dynamic Kernel Module System), and perhaps others. The VirtualBox installation process should tell you if you’re missing anything. To set up the kernel drivers on Linux, run /etc/init.d/vboxdrv setup as root.
On all platforms, it is highly recommended that you restart your computer after installing VirtualBox, just to make sure the kernel driver starts up cleanly.


3. What is Git ?
 This concerns people who want to work on Github
A free distributed Version Control System developed by Linus Torvalds for the Linux kernel development, i.e. developers work simultaneously everywhere in the world and commit there code into a central server, e.g. github which maintaines their projects e.g. train.oracle12.migration

For further info look for one of the excellent tutorials on git in the net.

Download one of the many apps in the net, e.g. SmartGit, GitClient, etc. Create a new working directory, in there create an empty git-repository by typing "git init", which will create a hidden subdirectory ".git". Then pull the actual complete code of your project by typing e.g. "git pull https://github.com/wkoertgen/train.oracle12.migration".

In less than a minute the code is there. This project is quite simply organized:

drwxr-xr-x 2 oracle oinstall 4096 Mai 9 13:33 12c_installer

drwxr-xr-x 2 oracle oinstall 4096 Mai 9 13:55 11g_installer

drwxr-xr-x 3 oracle oinstall 4096 Mai 12 10:34 env

drwxr-xr-x 2 oracle oinstall 4096 Mai 12 12:11 logs

-rw-r--r-- 1 oracle oinstall 2738 Mai 12 13:55 README.md

drwxr-xr-x 2 oracle oinstall 4096 Mai 12 14:07 scripts

-rw-r--r-- 1 oracle oinstall 22123 Mai 12 17:46 FAQ.md

-rw-r--r-- 1 oracle oinstall 802 Mai 15 08:54 Vagrantfile

drwxr-xr-x 4 oracle oinstall 4096 Mai 15 11:05 develop

The meaning of this is explained in the README and the FAQ.


4. What is Vagrant ?
Vagrant - developed by Mitchell Hashimoto - is a tool for building complete development environments, sandboxed in a virtual machine. Vagrant lowers development environment setup time, increases development/production parity, and brings the idea of disposable compute resources down to the desktop.

- How to download Vagrant ?
Got to http://downloads.vagrantup.com and choose a package for your operating system.

5. Download the Source code of the project ?

This concerns people who just want to run the VirtualBox.
Every Github-Project has a Download Zip button. You certainly know what to do. Unzip the Source code and you find the structure like above.  

CAVEAT: download a stable release.  Click on the release button and download the source code.

6. What do you need more ?
The zip-files with the Oracle SW indicated in the README. Copy them into the directories 12c_installer resp. 11g_installer and type "vagrant up". The initialisation of the VirtualBox with boxcutter/oel71 is done by Vagrant automatically and may take some minutes. Setting up Oracle SW and databases is done automatically and may take 40-45 minutes.
This process is called "Provisioning" and is explained in details in the FAQ,

No comments: