1 Setup Instructions
1_setup_instructions
User Manual:
Open the PDF directly: View PDF .
Page Count: 10
DevOps Prerequisite Setup
Table of Contents
Setup ............................................................................................................................................................. 2
1. Overview ............................................................................................................................................... 2
2. Virtual Box ............................................................................................................................................. 2
2.1 Install virtual box ........................................................................................................................... 2
3. Vagrant .................................................................................................................................................. 2
3.1 Install vagrant................................................................................................................................ 2
3.2 Vagrant checkpoint ....................................................................................................................... 2
4. Bringing my “vagrant up” ...................................................................................................................... 3
5. Shutting down my vagrant/VM ............................................................................................................. 6
6. Starting my vagrant ............................................................................................................................... 7
7. Sanity Check .......................................................................................................................................... 8
7.1 Java ................................................................................................................................................ 8
7.2 Maven ........................................................................................................................................... 8
7.3 Git .................................................................................................................................................. 8
7.4 Tomcat .......................................................................................................................................... 9
7.5 Jenkins ........................................................................................................................................... 9
7.6 Access tomcat ............................................................................................................................... 9
7.7 Access Jenkins ............................................................................................................................. 10
Setup
1. Overview
In our DevOps session we would be dealing with a lot of tools. “Vagrant” is a very easy way to export
and use a VM. This setup comes with a pre-created vagrant which has a host of tools already installed.
So this VM will be our sandbox to try out tools which can assist us in our DevOps session.
Even before we can bring up our vagrant we need to install a couple of softwares and follow a few steps
to bring up the vagrant. Both the softwares required, come along with this material and you will not
have to download any of them. The softwares required to bring up a vagrant are as below:
a. Oracle VM Virtual Box – Freely available virtualization product.
(https://www.virtualbox.org/)
b. Vagrant – Freely available software to create portable environments. This integrates very
well with Virtual Box. (https://www.vagrantup.com/)
It is a prerequisite for the DevOps session to have this vagrant up and running. Below are the setup
instructions to get your vagrant up.
Duration: ~1 hour
2. Virtual Box
2.1 Install virtual box
Step 1: Install virtual box by clicking on devops/setup/virtualbox/VirtualBox-5.1.6-110634-Win.exe
3. Vagrant
3.1 Install vagrant
Step 1: Install vagrant by clicking on devops/setup/vagrant/vagrant_1.8.6.exe
3.2 Vagrant checkpoint
Step 1: Open command prompt and type in “vagrant --version”
4. Bringing my “vagrant up”
Step 1: Copy the file devops/setup/system/devopsgold to a folder of your choice. In the example below
its “C:\devops\gold\work\”
Step 2: Open command prompt and navigate to the folder where you have stored your “devopsgold”
file in “Step 1”
Step 3: Execute the command “vagrant init devopsgold”
Step 3: Step 2 creates a file called VagrantFile . Open this VagrantFile in a text editor of your choice.
Make the below change/s
Uncomment the below line by removing the “#” in the beginning of the line. Change
to
Step 4: Save and exit out of the text editor
Step 5: Start your virtual box by clicking on the icon “Oracle VM VirtualBox” or by selecting “Oracle VM
VirtualBox” through windows start button
# config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network "private_network", ip: "192.168.33.10"
Step 6 : Return back to your command prompt and execute the command “vagrant up”. This may take
couple of minutes to complete. Your ouput may slightly vary from what is pasted below.
Step 7: Check your Oracle VM VirtualBox . Step 6 creats a VM entry as shown below. Note: The unique
id numbers at the end of the VM name will vary.
Step 8 : Select the entry and click on “Show” icon (marked below). A VM should come up waiting for
you to enter your username password.( If the screen has gone blank, then click on the screen and press
enter.)
Step 9: enter username and password.
username : vagrant
password : password
At this point you are inside of the virtual machine running on your host windows machine
5. Shutting down my vagrant/VM
On your VM window Click on file-> close. The below pop-up shows up. Choose power off the machine.
6. Starting my vagrant
Step 1: Bring up Oracle VM VirtualBox.
Step 2: Start command prompt and navigate to the folder where your vagrant box is and execute
“vagrant up”
Always start your VM from the command prompt by navigating to the folder where your vagrant box is
and executing a “vagrant up” command. This is necessary to set some network configurations
Step 3: on Oracle VM VirtualBox select the virtual machine and click on Show icon.
7. Sanity Check
7.1 Java
After logging in into your Vagrant execute the below command
7.2 Maven
Execute the below command in the command prompt of your vagrant VM
7.3 Git
Execute the below command in the command prompt of your vagrant VM
java -version
mvn -version
git --version
7.4 Tomcat
Execute the below command in the command prompt of your vagrant VM
7.5 Jenkins
Execute the below command in the command prompt of your vagrant VM
7.6 Access tomcat
Tomcat is running on the vagrant VM on port 8080. The vagrant VM itself is running on IP
192.168.33.10. This IP is private to the host machine i.e. your windows box and not visible outside of
your windows box.
On your windows box bring up chrome and visit http://192.168.33.10:8080 . You should see a page like
this
ps –ef | grep tomcat
ps –ef | grep jenkins
7.7 Access Jenkins
Jenkins is running on the vagrant VM on port 8085. The vagrant VM itself is running on IP 192.168.33.10.
This IP is private to the host machine i.e. your windows box and not visible outside of your windows box.
On your windows box bring up chrome and visit http://192.168.33.10:8085 . You should see a page like
this