0% found this document useful (0 votes)
69 views3 pages

CS439 CC F19 Assignment1

1. The document provides instructions for Assignment 1 which involves setting up a CentOS 7 VM using VirtualBox and Vagrant, installing software like Python, MySQL, and Docker, and launching a web server. 2. Students are instructed to download and install VirtualBox and Vagrant, select the CentOS 7 VM box, use Vagrant commands to initialize and provision the VM. 3. The steps also include logging into the VM, installing additional software, enabling port forwarding, and launching a Python web server to access from the host browser.

Uploaded by

HUMNA RAFIQUE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

CS439 CC F19 Assignment1

1. The document provides instructions for Assignment 1 which involves setting up a CentOS 7 VM using VirtualBox and Vagrant, installing software like Python, MySQL, and Docker, and launching a web server. 2. Students are instructed to download and install VirtualBox and Vagrant, select the CentOS 7 VM box, use Vagrant commands to initialize and provision the VM. 3. The steps also include logging into the VM, installing additional software, enabling port forwarding, and launching a Python web server to access from the host browser.

Uploaded by

HUMNA RAFIQUE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS439 - Cloud Computing

Assignment 1
Marks: 20 Deadline: 22-10-2019

Deliverables
1. Hard and soft copy of the assignment report. The report will be a
summary of you experiences while doing the assignment.
2. Demo and viva.
-------------------------------------------------------------

List of Tasks

1. Setup CentOS 7 VM through VirtualBox on local desktop/laptop


2. Use vagrant to bring up VM, setup networking, and install python, mysql
(mariadb), and gnu development tools group as well as docker
3. Launch a web server in VM Access it from a browser in host

Steps to follow

Note that:

1. Open command prompt as administrator to enter the blow mentioned commands.


2. On Windows, install latest version of power shell (if required).
3. You might need to update URLs (if necessary).

1. Download and install virtual box from virtualbox.org

2. Download and install vagrant from


https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.msi

3. Create a vagrant project directory.

4. Select a suitable virtual machine (VM) box from vagrant cloud:


https://app.vagrantup.com/boxes/search

In our case it is CentOS 7 on VirtualBox https://app.vagrantup.com/centos/boxes/7.

5. To get the CentOS 7 VM box, do the following in the vagrant project directory:
a. In case of fresh vagrant project setup, issue following commands (as
root/administrator):

$ vagrant init centos/7


$ vagrant up

b. For an existing Vagrantfile, edit Vagrantfile as following & save it:

Vagrant.configure("2") do |config|
config.vm.box = "centos/7"

Then issue command


$ vagrant up

Login to VM Box

Method 1

1. Vagrant up command downloads the box when issued first time and boot the VM box.
2. Login to the virtual machine using the command
$ vagrant ssh

Method 2

3. VM could also be accessed remotely by using an SSH client (e.g. Putty on Windows).
Download Putty (https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-0.70-
installer.msi) and install it.
4. Default private key does not work with putty. To generate a putty specific key file, use the
Puttygen tool.
a. Double click on Puttygen tool in the installation directory.
b. Load file “<path to vagrant project>\.vagrant\machines\default\virtualbox\
private_key”. See a “successfully imported…” message.
c. Enter a Key passphrase and confirm it.
d. Press Save private key button.
e. Save .ppk file with a suitable name.
f. Go to the directory and double click the generated .ppk file. Enter the passphase
if required.
g. Open Putty and login to the VM using
Host / IP 127.0.0.1
Port 2222
User vagrant

Installing necessary softwares in the VM Box [optional]

1. Login to CentOS VM by using login method 1.


2. Update VM using the command “yum update” as root user.
3. Python is already installed. Install mysql (mariadb), gnu development tools group and
docker by issuing the following command (as root user):
$ yum install gcc mariadb docker

Launch python web server

1. Enable port forwarding by uncommenting following line in Vagrantfile:


config.vm.network "forwarded_port", guest: 80, host: 8080
2. Launch a python web server in VM as:
$ python -m SimpleHTTPServer 80
3. Access web server from a browser in host OS by using the URL
http://127.0.0.1:8080

You will see directories of the VM in your browser. Interact with some files and you will see the
log of http requests handled by the web server running on the VM.

**~*~*~*~*~*~*~*~*~*~*~**

You might also like