Professional Documents
Culture Documents
YEAR :
BRANCH :
REGISTER NUMBER :
OBJECTIVES:
LIST OF EXPERIMENTS:
Course Objective:
• To develop web applications in cloud
• To learn the design and development process involved in creating a cloud based application
• To learn to implement and use parallel programming using Hadoop
Exercises:
1. Install Virtualbox/VMware Workstation with different flavours of linux or windows OS on top
of windows7 or 8.
2. Install a C compiler in the virtual machine created using virtual box and execute Simple
Programs
3. Install Google App Engine. Create hello world app and other simple web applications using
python/java.
4. Use GAE launcher to launch the web applications.
5. Simulate a cloud scenario using CloudSim and run a scheduling algorithm that is not present in
CloudSim.
6. Find a procedure to transfer the files from one virtual machine to another virtual machine.
7. Install Hadoop single node cluster and run simple applications like wordcount.
8. Find a procedure to launch virtual machine using trystack (Online Openstack Demo Version)
Course Outcome:
TOTAL: 45 PERIODS
Ex No.1A CLOUD COMPUTING
Aim:
Find procedure to Install Virtualbox/VMware Workstation with different flavours of linux or
windows OS on top of windows7 or 8.
PROCEDURE TO INSTALL
Step 1- Download Link
Link for downloading the software is https://www.vmware.com/products/workstation-pro/workstation-
pro-evaluation.html. Download the software for windows. Good thing is that there is no signup process.
Click and download begins. Software is around 541 MB.
04 2
VMware Workstation 15 Installation Splash Screen
Step 5- VMware Workstation Setup wizard
Now you will see VMware Workstation setup wizard dialog box. Click next to continue.
VMware Workstation 15 Installation – Setup Wizard
Step 6- End User Licence Agreement
This time you should see End User Licence Agreement dialog box. Check “I accept the terms in the
Licence Agreement” box and press next to continue.
06 4
VMware Workstation 15 Installation – End User Licence Agreement
Step 7- Custom Setup options
Select the folder in which you would like to install the application. There is no harm in leaving the
defaults as it is. Also select Enhanced Keyboard Driver check box.
VMware Workstation 15 Pro installation – select installation folder
Step 8- User Experience Settings
Next you are asked to select “Check for Updates” and “Help improve VMware Workstation Pro”. Do as
you wish. I normally leave it to defaults that is unchecked.
VMware Workstation 15 Installation – User Experience Settings
Step 9- Application Shortcuts preference
Next step is to select the place you want the shortcut icons to be placed on your system to launch the
application. Please select both the options, desktop and start menu and click next.
VMware workstation 15 pro installation shortcut selection checkbox screenshot.
Step 10- Installation begins
Now you see the begin installation dialog box. Click install to start the installation process.
Screenshot for VMware Workstation 15 pro installation begin confirmation dialog box on windows 10.
Below screenshot shows Installation in progress. Wait for this to complete.
Screenshot for VMware Workstation 15 pro installation process.
At the end you will see installation complete dialog box. Click finish and you are done with the
installation process. You may be asked to restart your computer. Click on Yes to restart.
VMware Workstation 15 Installation – Installation Complete
Step 11- Launch VMware Workstation
After the installation completes, you should see VMware Workstation icon on the desktop. Double click
on it to launch the application.
Screenshot for VMware Workstation 15 Pro icon on windows 10 desktop.
Step 12- Licence Key
If you see the dialog box asking for licence key, click on trial or enter the licence key. Then what you
have is the VMware Workstation 15 Pro running on your windows 10 desktop. If don’t have the licence
key, you will have 30 days trial.
Introduction
❖ Virtualization:
• Virtualization is the creation of virtual servers, infrastructures, devices and
computing resources.
• Virtualization changes the hardware-software relations and is one of the
foundational elements of cloud computing technology that helps utilize the
capabilities of cloud computing to the full.
• Virtualization techniques allow companies to turn virtual their networks,
storage, servers, data, desktops and applications.
❖ Types of Virtualization
• Operating-system-level virtualization - is a server-virtualization method
where the kernel of an operating system allows for multiple isolated user-
space instances, instead of just one. Such instances (sometimes called
containers, software containers,[1] virtualization engines (VE), virtual
private servers (VPS), or jails) may look and feel like a real server from the
point of view of its owners and users
• Platform / Hardware virtualization -Hardware virtualization or platform
virtualization refers to the creation of a virtual machine that acts like a real
computer with an operating system. Software executed on these virtual
machines is separated from the underlying hardware resources. For example,
a computer that is running Microsoft Windows may host a virtual machine
that looks like a computer with the Ubuntu Linux operating system; Ubuntu-
based software can be run on the virtual machine.
• In hardware virtualization, the host machine is the actual machine on which
the virtualization takes place, and the guest machine is the virtual machine.
The words host and guest are used to distinguish the software that runs on the
physical machine from the software that runs on the virtual machine. Different
types of hardware virtualization include:
IT8711 FOSS and Cloud Computing Lab
❖ Oracle Virtualbox
o Ubuntu is an operating system like any other and it is free & open source. It
means that we can download it freely and install on as many computers as we
like. By the term open source it means that we can actually see its code. To
provide a more secure environment, the ―SUDO‖ tool is used to assign
temporary privileges for performing administrative tasks. Ubuntu comes
installed with a wide range of Software that includes Libre Office ,Firefox,
Thunderbird
Step 1:
• Download and Install Oracle Virtual Box latest version & Extension
package
o https://virtualbox.org/wiki/downloads
Step 2:
Oracle VM VirtualBox 6.0.8 Setup Wizard is open and follows the steps to install
Oracle VM VirtualBox 6.0.8 installation is completed
Step 4: Import the Oracle VM Virtual Extension pack into the Oracle Virtual Box
Oracle VMVirtual Extension pack is imported into the Oracle Virtual Box
successfully.
Step 5: Click import Appliance and select CentOS-7.8.2003.com OVA (Open Virtual
Appliance) file from download directory
Installation process started
Step 6: CentOS-7.8.2003.com is installed successfully and click start button to launch the
virtual machine
• Login Details
o User name : centos
o Password : centos
Install a C compiler in the virtual machine created using virtual box
Ex No.2 and execute Simple Programs
$ sudogedit add.c
Source Code:
Expected Output:
Enter two nos : 2 3
Sum of two nos is: 5
Output:
Ex No.3 Install Google App Engine. Create hello world app and other simple web
applications using python/java. Use GAE launcher to launch the web
applications
Introduction
o Google App Engine was first released as a beta version in April 2008.
o It is a is a Platform as a Service (PaaS) cloud computing platform for
developing and hosting web applications in Google-managed data centers.
o Google‘s App Engine opens Google‘s production to any person in the world at
no charge.
o Google App Engine is software that facilitates the user to run his web
applications on Google infrastructure.
o It is more reliable because failure of any server will not affect either the
performance of the end user or the service of the Google.
o It virtualizes applications across multiple servers and data centers.
▪ Other cloud-based platforms include offerings such as Amazon Web
Services and Microsoft's Azure Services Platform.
➢ Introduction of Google App Engine
• Google App Engine lets you run your web applications on Google's
infrastructure. App Engine applications are easy to build, easy to maintain, and
easy to scale as your traffic and data storage needs grow. With App Engine,
there are no servers to maintain: You just upload your application, and it's ready
to serve your users.
• You can serve your app from your own domain name (such as
https://www.example.com/) using Google Apps. Or, you can serve your app
using a free name on the appspot.com domain. You can share your application
with the world, or limit access to members of your organization.
• Google App Engine supports apps written in several programming languages.
With App Engine's Java runtime environment, you can build your app using
standard Java technologies, including the JVM, Java servlets, and the Java
programming language—or any other language using a JVM-based interpreter
or compiler, such as JavaScript or Ruby. App Engine also features a dedicated
Python runtime environment, which includes a fast Python interpreter and the
Python standard library. The Java and Python runtime environments are built to
ensure that your application runs quickly, securely, and without interference
from other apps on the system.
• With App Engine, you only pay for what you use. There are no set-up costs and
no recurring fees. The resources your application uses, such as storage and
bandwidth, are measured by the gigabyte, and billed at competitive rates. You
control the maximum amounts of resources your app can consume, so it always
stays within your budget. App Engine costs nothing to get started. All
applications can use up to 500 MB of storage and enough CPU and bandwidth
to support an efficient app serving around 5 million page views a month,
absolutely free. When you enable billing for your application, your free limits
are raised, and you only pay for resources you use above the free levels.
➢ Architecture of Google App Engine
• Google App Engine makes it easy to build an application that runs reliably, even
under heavy load and with large amounts of data. App Engine includes the
following features:
• Persistent storage with queries, sorting and transactions
• Automatic scaling and load balancing
• APIs for authenticating users and sending email using Google Accounts
• Task queues for performing work outside of the scope of a web request
• Scheduled tasks for triggering events at specified times and regular intervals
• Dynamic web serving, with full support for common web technologies
• You can develop your application for the Java runtime environment using
common Java web development tools and API standards. Your app interacts
with the environment using the Java Servlets standard, and can use common
web application technologies such as Java Server Pages
• The Java runtime environment uses Java 6. The App Engine Java SDK supports
developing apps using either Java 5 or 6. The environment includes the Java SE
Runtime Environment (JRE) 6 platform and libraries. The restrictions of the
sandbox environment are implemented in the JVM. An app can use any JVM
byte code or library feature, as long as it does not exceed the sandbox
restrictions. For instance, byte code that attempts to open a socket or write to a
file will throw a runtime exception.
• Your app accesses most App Engine services using Java standard APIs. For the
App Engine data store, the Java SDK includes implementations of the Java Data
Objects (JDO) and Java Persistence API (JPA) interfaces. Your app can use the
JavaMail API to send email messages with the App Engine Mail service. The
java.net HTTP APIs accesses the App Engine URL fetch service.
• App Engine also includes low-level APIs for its services to implement
additional adapters, or to use directly from the application. See the
documentation for the data store, memcache, URL fetch, mail, images and
Google Accounts APIs. Typically, Java developers use the Java programming
language and APIs to implement web applications for the JVM. With the use
of JVM-compatible compilers or interpreters, you can also use other languages
to develop web applications, such as JavaScript, Ruby.
Example : kcet-cloud-project
Step 7 : Google App Engine is initated
import  logging
@app.route('/')
def hello():
return 'Hello World'
app.yaml
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 3
Step 18 : Create requirements.txt file
requirements.txt
Flask==0.11.1
gunicorn==19.6.0
It started building the object and fetching the storage object for the created application
It is updating the service
https://expanded-curve-289413.uc.r.appspot.com
Step 21 : Run your program in the broswer
2. install google cloud sdk tools(installing time will depend on internet speed of ur computer)
3. create 1 folder and create 2 files inside the folder( like folder name exp3(files 1.app.yaml
2.index.py)
File1
app.yaml code
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /
script: index.py
file2
index.py(python file)
print "welcome to python gae";
http://localhost:8080/
1.Email sign in
2. install google cloud sdk tools(installing time will depend on internet speed of ur computer)
3. create 1 folder for images and create 5 files for web application execution( like folder name
exp3(app.yaml,index.html,main.css,todo.py)
Create one folder -under that folder create 4files and 1 images folder (img
add
Step 5. Output
Vm vm = new Vm(vmid, brokerId, mips, pesNumber, ram, bw, size, vmm, new
CloudletSchedulerTimeShared())
9. Submit the VM list to the broker:
broker.submitVmList(vmlist)
10. Create a cloudlet with length, file size, output size, and utilisation model:
Cloudlet cloudlet = new Cloudlet(id, length, pesNumber, fileSize, outputSize, utilizationModel, utilizationMode
11. Submit the cloudlet list to the broker:
broker.submitCloudletList(cloudletList)
12. Start the simulation:
CloudSim.startSimulation()
Sample Output from the Existing Example:
Starting CloudSimExample1...
Initialising...
Starting CloudSim version 3.0
Datacenter_0 is starting...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>null
Broker is starting...
Entities started.
0.0: Broker: Cloud Resource List received with 1 resource(s)
0.0: Broker: Trying to Create VM #0 in Datacenter_0
0.1: Broker: VM #0 has been created in Datacenter #2, Host #0
0.1: Broker: Sending cloudlet 0 to VM #0
400.1: Broker: Cloudlet 0 received
400.1: Broker: All Cloudlets executed. Finishing...
400.1: Broker: Destroying VM #0
Broker is shutting down...
Simulation: No more future events
CloudInformationService: Notify all CloudSim entities for shutting down.
Datacenter_0 is shutting down...
Broker is shutting down...
Simulation completed.
Simulation completed.
========== OUTPUT ==========
Cloudlet ID STATUS Data center ID VM ID Time Start Time Finish Time
0 SUCCESS 2 0 400 0.1 400.1
*****Datacenter: Datacenter_0*****
User id Debt
3 35.6
CloudSimExample1 finished!
1. You can copy few (or more) lines with copy & paste mechanism.
For this you need to share clipboard between host OS and guest OS, installing Guest
Addition on both the virtual machines (probably setting bidirectional and restarting them).
You copy from guest OS in the clipboard that is shared with the host OS.
Then you paste from the host OS to the second guest OS.
2. You can enable drag and drop too with the same method (Click on the machine, settings,
general, advanced, drag and drop: set to bidirectional )
3. You can have common Shared Folders on both virtual machines and use one of the
directory shared as buffer to copy.
Installing Guest Additions you have the possibility to set Shared Folders too. As you put a
file in a shared folder from host OS or from guest OS, is immediately visible to the other.
(Keep in mind that can arise some problems for date/time of the files when there are
different clock settings on the different virtual machines).
If you use the same folder shared on more machines you can exchange files directly copying
them in this folder.
4. You can use usual method to copy files between 2 different computer with client-server
application. (e.g. scp with sshd active for linux, winscp... you can get some info about SSH
servers e.g. here)
You need an active server (sshd) on the receiving machine and a client on the sending
machine. Of course you need to have the authorization setted (via password or, better, via
an automatic authentication method).
Note: many Linux/Ubuntu distribution install sshd by default: you can see if it is running
with pgrep sshd from a shell. You can install with sudo apt-get install openssh-server.
5. You can mount part of the file system of a virtual machine via NFS or SSHFS on the
other, or you can share file and directory with Samba.
You may find interesting the article Sharing files between guest and host without
VirtualBox shared folders with detailed step by step instructions.
You should remember that you are dialling with a little network of machines with different
operative systems, and in particular:
• Each virtual machine has its own operative system running on and acts as a physical
machine.
• Each virtual machine is an instance of a program owned by an user in the hosting operative
system and should undergo the restrictions of the user in the hosting OS.
E.g Let we say that Hastur and Meow are users of the hosting machine, but they did not
allow each other to see their directories (no read/write/execute authorization). When each of
them run a virtual machine, for the hosting OS those virtual machine are two normal
programs owned by Hastur and Meow and cannot see the private directory of the other user.
This is a restriction due to the hosting OS. It's easy to overcame it: it's enough to give
authorization to read/write/execute to a directory or to chose a different directory in which
both users can read/write/execute.
• Windows likes mouse and Linux fingers. :-)
I mean I suggest you to enable Drag & drop to be cosy with the Windows machines and
the Shared folders or to be cosy with Linux.
When you will need to be fast with Linux you will feel the need of ssh-keygen and
to Generate once SSH Keys to copy files on/from a remote machine without writing
password anymore. In this way it functions bash auto-completion remotely too!
Ex No. Simulate a cloud scenario using CloudSim and running a scheduling
algorithm
Step 1: Link to download Eclipse and download Eclipse for Windows 64bit into your Local
machine
https://www.eclipse.org/downloads/packages/release/kepler/sr1/eclipse-ide-
java-developers
Windows x86_64
Step 2: Download scheduling source code cloudsim-code-master from git hub repository in
your local machine
https://github.com/shiro873/Cloudsim-Code
Src-scheduling source
files
Step 3: Download commons-maths3-3.6.1 from git hub repository in your local machine
https://commons.apache.org/proper/commons-math/download_math.cgi
Commons-maths3-
3.6.1-bin.zip
Step 4: Downloaded Eclipse, cloudsim-3.0.3 and Apache Commons Math 3.6.1 in your local
machine and extract cloudsim-3.0.3 and Apache Commons Math 3.6.1
Downloaded Files
Step 5: First of all, navigate to the folder where you have unzipped the eclipse folder and
open Eclipse.exe
Step 6: Now within Eclipse window navigate the menu: File -> New -> Project, to open the
new project wizard
Step 7: A ‗New Project‗ wizard should open. There are a number of options displayed and
you have to find & select the ‗Java Project‗ option, once done click ‘Next‗
Step 8: Now a detailed new project window will open, here you will provide the project name
and the path of CloudSim-master-code project source code, which will be done as follows:
Step 10: Make sure you navigate the path till you can see the bin, docs, examplesetc folder in
the navigation plane.
Step 11: Once done finally, click ‗Next‘ to go to the next step i.e. setting up of project
settings
Step 12: Once the project is configured you can open the ‗Project Explorer‗ and start
exploring the Cloudsim project. Also for the first time eclipse automatically start building the
workspace for newly configured Cloudsim project, which may take some time depending on
the configuration of the computer system.
Following is the final screen which you will see after Cloudsim is configured.
Step 13: Now just to check you within the ‗Project Explorer‗, you should navigate to the
‗src‗ folder, then expand the package ‗default package‗ and double click to open the
‗RoundRobin.java‗.
Step 14: Now navigate to the Eclipse menu ‗Run ->Run‗ or directly use a keyboard shortcut
‘Ctrl + F11’ to execute the ‘RoundRobin.java‘. If it is successfully executed it should be
displaying the following type to output in the console window of the Eclipse IDE.
Execution of Scheduling Algorithms Using Cloud Simulator
Step1. Extract cloud sim software and eclipse ide for java developers. (all software will be
Example
After created the above file right click sfj_scheduler.java file and choose run as java
application.
Output
Ex.No 6 Transfer the files from one virtual machine to another
Virtual machine/host operating System
Step 2:
Ex.no 7a Install Hadoop single node cluster and execute Word
Count Program using Map reduce Concept
File Creation
Found 1 items
-rw-r--r-- 1 cloudera cloudera 31 2015-01-15 18:04
/user/cloudera/input/wordcount.txt
To run the WordCount example using the input file that we just moved to
HDFS, use the following command:
Found 2 items
-rw-r--r-- 1 cloudera cloudera 0 2015-11-15 18:15
/user/cloudera/output/_SUCCESS
-rw-r--r-- 1 cloudera cloudera 43 2015-11-15 18:15
/user/cloudera/output/part-r-00000
Bytes Written=39
fsck
HDFS Command to check the health of the Hadoop file system.
Found 8 items
drwxrwxrwx - hdfs supergroup 0 2017-10-23 10:29 /benchmarks
drwxr-xr-x - hbase supergroup 0 2019-10-03 21:44 /hbase
drwxr-xr-x - solr solr 0 2017-10-23 10:32 /solr
drwxr-xr-x - cloudera supergroup 0 2019-10-03 22:55 /tamilfolder
drwxr-xr-x - cloudera supergroup 0 2019-10-03 22:53 /testfolder1
drwxrwxrwt - hdfs supergroup 0 2019-10-03 21:44 /tmp
drwxr-xr-x - hdfs supergroup 0 2017-10-23 10:31 /user
drwxr-xr-x - hdfs supergroup 0 2017-10-23 10:31 /var
Install Hadoop
Step 1: Click here to download the Java 8 Package. Save this file in your
home directory.
Step 5: Add the Hadoop and Java paths in the bash file (.bashrc).
Open. bashrc file. Now, add Hadoop and Java Path as shown below.
Command: vi .bashrc
Fig: Hadoop Installation – Setting Environment Variable
For applying all these changes to the current Terminal, execute the source command.
To make sure that Java and Hadoop have been properly installed on your system
and can be accessed through the Terminal, execute the java -version and hadoop
version commands.
Command: cd hadoop-2.7.3/etc/hadoop/
Command: ls
Step 7: Open core-site.xml and edit the property mentioned below inside
configuration tag:
core-site.xml informs Hadoop daemon where NameNode runs in the cluster. It contains
configuration settings of Hadoop core such as I/O settings that are common to HDFS &
MapReduce.
Command: vi core-site.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
3 <configuration>
4 <property>
5 <name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
6
</property>
7 </configuration>
8
Step 8: Edit hdfs-site.xml and edit the property mentioned below inside
configuration tag:
hdfs-site.xml contains configuration settings of HDFS daemons (i.e. NameNode,
DataNode, Secondary NameNode). It also includes the replication factor and block size
of HDFS.
Command: vi hdfs-site.xml
1
2 <?xml version="1.0" encoding="UTF-8"?>
3 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
4 <property>
5 <name>dfs.replication</name>
6 <value>1</value>
7 </property>
<property>
8 <name>dfs.permission</name>
9 <value>false</value>
10 </property>
11 </configuration>
12
Step 9: Edit the mapred-site.xml file and edit the property mentioned below
inside configuration tag:
In some cases, mapred-site.xml file is not available. So, we have to create the mapred-
site.xml file using mapred-site.xml template.
1
<?xml version="1.0" encoding="UTF-8"?>
2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
3 <configuration>
4 <property>
5 <name>mapreduce.framework.name</name>
<value>yarn</value>
6
</property>
7 </configuration>
8
Step 10: Edit yarn-site.xml and edit the property mentioned below inside
configuration tag:
Command: vi yarn-site.xml
Fig: Hadoop Installation – Configuring yarn-site.xml
1
2 <?xml version="1.0">
3 <configuration>
4 <property>
5 <name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
6
</property>
7 <property>
8 <name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</
9 name>
1 <value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
0 </configuration>
1
1
Step 11: Edit hadoop-env.sh and add the Java Path as mentioned below:
hadoop-env.sh contains the environment variables that are used in the script to run
Hadoop like Java home path, etc.
Command: vi hadoop–env.sh
Command: cd
Command: cd hadoop-2.7.3
This formats the HDFS via NameNode. This command is only executed for the first
time. Formatting the file system means initializing the directory specified by the
dfs.name.dir variable.
Never format, up and running Hadoop filesystem. You will lose all your data stored in
the HDFS.
Command: cd hadoop-2.7.3/sbin
Either you can start all daemons with a single command or do it individually.
Command: ./start-all.sh
Start NameNode:
The NameNode is the centerpiece of an HDFS file system. It keeps the directory tree of
all files stored in the HDFS and tracks all the file stored across the cluster.
Start DataNode:
Start ResourceManager:
ResourceManager is the master that arbitrates all the available cluster resources and
thus helps in managing the distributed applications running on the YARN system.
Its work is to manage each NodeManagers and the each application’s
ApplicationMaster.
import java.util.*;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
public void map(LongWritable key, Text value, Context context) throws IOException,
InterruptedException {
while (tokenizer.hasMoreTokens()) {
word.set(tokenizer.nextToken());
context.write(word, one);
} } }
int sum = 0;
//@SuppressWarnings(“deprecation”)
job.setJarByClass(WordCount.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
job.setMapperClass(Map.class);
job.setReducerClass(Reduce.class);
job.setInputFormatClass(TextInputFormat.class);
job.setOutputFormatClass(TextOutputFormat.class);
job.waitForCompletion(true);
}
}
Ex No.8 Find a procedure to launch virtual machine using Openstack
Introduction:
❖ OpenStack was introduced by Rackspace and NASA in July 2010.
❖ OpenStack is an Infrastructure as a Service known as Cloud Operating System, that
take resources such as Compute, Storage, Network and Virtualization Technologies and
control those resources at a data center level
❖ The project is building an open source community - to share resources and technologies
with the goal of creating a massively scalable and secure cloud infrastructure.
❖ The software is open source and limited to just open source APIs such as Amazon.
OpenStack architecture
• It is modular architecture
• Designed to easily scale out
• Based on (growing) set of core services
The major components are
1. Keystone
2. Nova
3. Glance
4. Swift
5. Quantum
6. Cinder
I
• KEYSTONE :
o Identity service
o Common authorization framework
o Manage users, tenants and roles
o Pluggable backends (SQL,PAM,LDAP, IDM etc)
• NOVA
o Core compute service comprised of
▪ Compute Nodes – hypervisors that run virtual machines
• Supports multiple hypervisors KVM,Xen,LXC,Hyper-V
and ESX
▪ Distributed controllers that handle scheduling, API calls, etc
• Native OpenStack API and Amazon EC2 compatible
API
• GLANCE
o Image service
o Stores and retrieves disk images (Virtual machine templates)
o Supports RAW,QCOW,VHD,ISO,OVF & AMI/AKI
o Backend Storage : File System, Swift, Gluster, Amazon S3
• SWIFT
o Object Storage service
o Modeled after Amazon‘s Service
o Provides simple service for storing and retrieving arbitrary data
o Native API and S3 compatible API
• NEUTRON
o Network service
o Provides framework for Software Defined Network
o Plugin architecture
▪ Allows intergration of hardware and software based network
solutions
• Open vSwitch, Cisco UCS,Standard Linux
Bridge,NiCira NVP
• CINDER
o Block Storage (Volume) service
o Provides block storage for Virtual machines(persistent disks)
o Similar to Amazon EBS service
o Plugin architecture for vendor extensions
▪ NetApp driver for cinder
• HORIZON
o Dashboard
o Provides simple self service UI for end-users
o Basic cloud administrator functions
▪ Define users, tenants and quotas
▪ No infrastructure management
• HEAT OpenStack Orchestration
o Provides template driven cloud application orchestration
o Modeled after AWS Cloud Formation
o Targeted to provide advanced functionality such as high availability
and auto scaling
o Introduced by Redhat
• CEILOMETER – OpenStack Monitoring and Metering
o Goal: To Provide a single infrastructure to collect measurements from
an entire OpenStack Infrastructure; Eliminate need for multiple agents
attaching to multiple OpenStack Projects
o Primary targets metering and monitoring: Provided extensibility
Step 2:
TryStack.org Homepage
I assume that you already join to the Facebook Group and login to the dashboard. After you log
in to the TryStack, you will see the Compute Dashboard like:
OpenStack Compute Dashboard
In this post, I will show you how to run an OpenStack instance. The instance will be accessible
through the internet (have a public IP address). The final topology will like:
Network topology
As you see from the image above, the instance will be connected to a local network and the local
network will be connected to internet.
Network? Yes, the network in here is our own local network. So, your instances will be not
mixed up with the others. You can imagine this as your own LAN (Local Area Network) in the
cloud.
I guess you already know what router is. In the step 1, we created our network, but it is isolated.
It doesn’t connect to the internet. To make our network has an internet connection, we need a
router that running as the gateway to the internet.
OpenStack has a feature like a firewall. It can whitelist/blacklist your in/out connection. It is
called Security Group.
1. Go to Compute > Access & Security and then open Security Groups tab.
2. In default row, click Manage Rules.
3. Click Add Rule, choose ALL ICMP rule to enable ping into your instance, and then click Add.
4. Click Add Rule, choose HTTP rule to open HTTP port (port 80), and then click Add.
5. Click Add Rule, choose SSH rule to open SSH port (port 22), and then click Add.
6. You can open other ports by creating new rules.
Now, you can SSH your instances to the floating IP address that you got in the step 4. If you are
using Ubuntu image, the SSH user will be ubuntu.
Ex.No 6 Transfer Files From Virtual Machine1 To Another Virtual Machine2
Step1: Create two virtual machine using virtual box .
Step3: change network settings inot bridged adapter for both virtual machines (vm1,vm2)
Type the following command to transfer a file from one virtual machine1 to virtual machine
Step1 : login into any gmail account and continue further steps for authentication purpose
Type ls command
Output