cloud services
By
Khai Tran
A Thesis or Dissertation Submitted in Partial Fulfillment of the
Requirements for the Degree of
Master of Science
In
Information Technology
Minnesota State University, Mankato
Mankato, Minnesota
November 2011
i | P a g e
Abstract
In several database administration or software project classes that are currently offered in
MNSU, each student must setup database server and web server for lab projects. However due
to the resource‐demanding nature of those servers, the limitation of lab‐usage time and the
necessity to work in groups outside classrooms, having on‐campus computer lab is a not‐so‐
desired options for most students. Furthermore students have confusion of purchasing laptop
which meet certain requirements and have certain software installed. The setup process may
inhibit student’s engagement in the subject.
Running a virtual lab inside school is a viable option. The hardware cost would be significantly
reduced for the school but due to limited human resource available, it would be difficult to find
people dedicated to run the lab throughout the year. There will be potential issues if the school
replaces its existing hardware each year thus it is needed to migrate the lab to another
platform.
Amazon Web Services provide another way to do it without worrying too much about hardware
and operating platform. There virtual instances can be accessed anywhere with Internet
connection. Furthermore, students need not to worry about demanding services would eat up
their resources, or would the client computing power will meet the requirement. In addition to
that, Amazon offered free usage during the first year so it would not cost students much to use
the service.
2 | P a g e
The purpose of this paper is to analyze the structure of Amazon Web Services and determine
potential applications for education environment, to help create a fun learning experience for
students and help them engaged in the subject
3 | P a g e
Table of Contents
Abstract ......................................................................................................................................................... 2
Chapter 1: Cloud computing – a look from the cloud ................................................................................... 9
1.1 What is cloud computing? ............................................................................................................ 9
Definition .............................................................................................................................................. 9
1.2 Six attributes of cloud computing ............................................................................................... 11
1.3 Three types of cloud computing ................................................................................................. 12
1.4 Why moving to the cloud? .......................................................................................................... 12
1.5 The state of cloud computing in education ................................................................................ 15
Amazon Web Services versus Windows Azure Platform ........................................................................ 18
Chapter 2: Amazon Cloud Services Offerings ............................................................................................. 21
2.1 Overview about Amazon Web Services products ............................................................................. 21
2.2 Pricing structure ................................................................................................................................ 23
2.2.1 Amazon payment options at a glance ........................................................................................ 23
2.2.2 Renting options (Amazon, 2011b) ............................................................................................. 24
2.3 Instance types ................................................................................................................................... 25
2.4 Monitoring traffic and I/O charge ..................................................................................................... 27
2.5 Security Credentials (Amazon, 2011e) .............................................................................................. 27
2.5.1 Access Credentials ..................................................................................................................... 27
2.5.2 Sign‐In Credentials ..................................................................................................................... 27
2.5.3 AWS Identity and Access Management (IAM) (Amazon, 2011d) .............................................. 28
2.6 AWS Management Interface ......................................................................................................... 28
2.7 AWS in education .............................................................................................................................. 29
Chapter 3: Building virtual lab with Amazon Cloud Service ........................................................................ 32
3.1 Problem statement ..................................................................................................................... 32
3.2 Building AWS virtual lab .............................................................................................................. 34
3.2.1 Setting up the Amazon Web Services account ................................................................... 34
3.2.2 Estimate usage and budget ................................................................................................. 34
4 | P a g e
3.2.3 General Architecture design ............................................................................................... 37
3.2.4 Virtual lab setup process at a glance .................................................................................. 38
3.2.5 Identify users and use cases ............................................................................................... 38
3.2.6 Create and grant permission to users ................................................................................. 39
3.2.7 Choosing a region ................................................................................................................ 39
3.2.8 Choosing an architecture .................................................................................................... 39
3.2.9 Find a suitable AMI/create custom image .......................................................................... 40
3.2.10 Enabling firewall .................................................................................................................. 40
3.2.11 Creating backups ................................................................................................................. 41
3.2.12 Monitor instance health and other usage .......................................................................... 41
3.3 Building Oracle Database Administration lab ............................................................................. 42
3.3.1 Installation procedures at a glance (refer to Appendix B for more details) ....................... 42
3.3.2 Additional considerations: .................................................................................................. 42
3.4 Agile software development lab architecture ............................................................................ 43
3.4.1 Installation procedures at a glance (refer to Appendix B for more details) ....................... 43
3.4.2 Additional considerations: .................................................................................................. 43
Chapter 4: Analysis of student usage .......................................................................................................... 44
4.1 Practical considerations .............................................................................................................. 44
4.2 Student response ........................................................................................................................ 45
4.2.1 Virtual versus personal computer in handling course assignment ............................................ 45
4.2.2 Virtual lab usage......................................................................................................................... 47
4.3 Frequent problems and solutions ............................................................................................... 49
4.3.1 Oracle lab ............................................................................................................................ 49
4.3.1.1 Problem: cannot access APEX web interface at http://[public DNS:8080/apex ................. 49
4.3.1.2 Problem: ORA‐04031: unable to allocate XXX bytes of shared memory ("shared
pool","select /*+ rule */ bucket_cn...","SQLA^ .................................................................................. 53
4.3.1.3 Problem: invalid administrator password ........................................................................... 55
4.3.2 Advanced Software Engineering projects lab ..................................................................... 56
4.3.2.1 Problem: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:
YES) 56
4.3.2.2 SVN conflicts ....................................................................................................................... 57
Chapter 5: Conclusion and future research ................................................................................................ 58
5 | P a g e
5.1 Concluding remarks .......................................................................................................................... 58
5.2 Limitations ......................................................................................................................................... 58
5.3 Future research ................................................................................................................................. 59
Appendix A: Amazon EC2 basics ................................................................................................................. 61
A.1 Amazon Identity Access Management (IAM) basics ......................................................................... 61
Appendix B: how to setup Oracle 11g Express edition virtual server ......................................................... 66
Appendix C: how to setup LAMP virtual server .......................................................................................... 83
References .................................................................................................................................................. 86
6 | P a g e
List of Figures
FIGURE 1: VIRTUALIZATION: FABRICATED INFRASTRUCTURE AND OPERATIONS. .............................................. 10
FIGURE 2: CPU COMPARISON CHART ..................................................................................................... 19
FIGURE 3: MEMORY COMPARISON CHART ............................................................................................... 19
FIGURE 4: STORAGE COMPARISON CHART ............................................................................................... 20
FIGURE 5: PRICE COMPARISON CHART .................................................................................................... 20
FIGURE 6: AWS PRODUCTS ................................................................................................................. 22
FIGURE 7: AMAZON PRICING STRUCTURE ................................................................................................ 23
FIGURE 8: INSTANCE PRICE OPTIONS ...................................................................................................... 24
FIGURE 9: MICRO INSTANCE USAGES ...................................................................................................... 25
FIGURE 10: INSTANCE TYPES ................................................................................................................ 26
FIGURE 11: VIRTUAL LAB ARCHITECTURAL DESIGN .................................................................................... 37
FIGURE 12: VIRTUAL LAB INSTALLATION STEPS ......................................................................................... 38
FIGURE 13: USERS AND FUNCTIONS ....................................................................................................... 39
FIGURE 14: AMAZON MONITORING METRICS ........................................................................................... 42
FIGURE 15: ORACLE LAB INSTALLATION PROCEDURES ................................................................................ 42
FIGURE 16: SOFTWARE ENGINEER INSTALLATION PROCEDURES .................................................................... 43
FIGURE 17: COURSES TAKEN ................................................................................................................. 45
FIGURE 18: PC REQUIREMENTS ............................................................................................................ 45
FIGURE 19: VIRTUAL LAB REQUIREMENTS ................................................................................................ 46
FIGURE 20: PC SLOWNESS ................................................................................................................... 46
FIGURE 21: STUDENT WANTS DEDICATED PC ........................................................................................... 46
FIGURE 22: STUDENT WANTS VIRTUAL LAB .............................................................................................. 47
FIGURE 23: VIRTUAL LAB AVAILABILITY ................................................................................................... 47
FIGURE 24: FLEXIBLE STUDY TIME .......................................................................................................... 48
FIGURE 25: WISHED SPECIFICATIONS ..................................................................................................... 48
FIGURE 26: COST OPTIONS .................................................................................................................. 48
FIGURE 27: APPLICABLE COURSES ......................................................................................................... 49
FIGURE 28: IAM CREATE NEW GROUP ................................................................................................... 61
FIGURE 29: IAM SELECT SECURITY POLICY ............................................................................................... 62
FIGURE 30: IAM ADD NEW USER .......................................................................................................... 63
FIGURE 31: IAM CONFIRMATION SCREEN ............................................................................................... 64
FIGURE 32: IAM DASHBOARD .............................................................................................................. 64
FIGURE 33: IAM CREATE PASSWORD ..................................................................................................... 65
FIGURE 34: AMAZON MANAGEMENT CONSOLE ....................................................................................... 66
FIGURE 35: AVAILABLE AMAZON MACHINE IMAGES (AMIS) ...................................................................... 67
FIGURE 36: INSTANCE ARCHITECTURE OPTIONS ........................................................................................ 68
7 | P a g e
FIGURE 37: KERNEL AND RAM DISK OPTIONS ......................................................................................... 69
FIGURE 38: EDIT INSTANCE TAGS ........................................................................................................... 70
FIGURE 39: GENERATE INSTANCE KEY PAIR .............................................................................................. 71
FIGURE 40: INSTANCE FIREWALL CONFIGURATION .................................................................................... 72
FIGURE 41: CHECK INSTANCE RUNNING STATUS ....................................................................................... 72
FIGURE 42: PUTTYGEN INTERFACE ........................................................................................................ 73
FIGURE 43: INSTRUCTION DIALOG ......................................................................................................... 74
FIGURE 44: CONFIGURE PUTTY AUTHENTICATION METHOD ........................................................................ 74
FIGURE 45: CONNECT TO VIRTUAL INSTANCE ........................................................................................... 75
FIGURE 46: CREATE INSTANCE IMAGE FROM A RUNNING INSTANCE .............................................................. 79
FIGURE 47: CREATE IMAGE CONFIRMATION ............................................................................................. 80
FIGURE 48: APPEX STARTUP PAGE ....................................................................................................... 81
FIGURE 49: PERSONALIZED AMIS ......................................................................................................... 82
FIGURE 50: ZEND SERVER STARTUP PAGE ................................................................................................ 84
List of tables
TABLE 1: AMAZON WEB SERVICES VS WINDOWS AZURE PLATFORM ............................................................ 19
8 | P a g e
Chaptter 1: Cloud co
omputin
ng – a lo
ook from
m the cloud
This chap
pter presentts the following topics:
What is cloud
W d computingg?
The reason fo
or moving to
o the cloud
The state of ccloud compu
uting
Why Amazon
W n?
1.1 Wha
at is cloud computin
ng?
Definitio
on
experts, each of them
m provide th
heir own definitions of ccloud compu
uting (Geelaan, 2009). Go
oogle
the term “cloud com
mputing defin
nition” and o
one will fee l inundated with 13 million results. Even
nitions from major encycclopedias and dictionariees differ from
the defin m each otheer.
It is wortthwhile to m
mention that virtualization is the fooundation o
of cloud com
mputing, but they
are not tthe same. V
Virtualization
n enables connectivity bbetween diffferent fabriccs to create ccloud
computin
ng.
9 | P a g e
Figurre 1: Virtualizatiion: Fabricated IInfrastructure aand Operations.((Dawson, 2010))
Amazon Web Servicces’ evangelist, Jeff Barrr came up with a perffect analogyy between ccloud
computin
ng and electtricity utility (Barr, 2011)). Everyone needs electrricity and yeet one choosses to
“lease” instead of purchasing equipment to do it hhimself. By specializingg on perforrming
activitiess one’s good at (like a no
ormal day jo
ob) and traddes it with th
he service th
hat the electtricity
capital fo
or spending on other th
hings. In fact, are goverrning the wo
orld of econ
nomics for aa long
(Ricardo,, 1821).
As define
ed by Gartne
er: “cloud co
omputing is aa style of computing in w
which scalab
ble and elasttic IT‐
(Bittman, 2010).
10 | P a g e
1.2 Six attributes of cloud computing
1. Service‐Based: consumer needs not to know about complexity of underlying
infrastructure. This can be accomplished by using management interface to facilitate
consumer’s need for each service. Interfaces hide the implementation details and focus
more on how technology solve consumer’s problem rather its capabilities.
2. Scalable: the service’s capacity can scale up or down as the consumer demands.
3. Elastic: ability of the service to add or remove resources to any instance with minimum
effort.
4. Shared: the underlying infrastructure, software or platforms are shared among the
consumers of the service (usually unknown to the consumers). This enables unused
resources to serve multiple needs for multiple consumers, all working at the same time.
5. Metered by Use: services are tracked with usage metrics to offer multiple payment
models. These may vary from on‐demand plans, subscriptions, fixed plans and even free
plans. These plans are charged base on usage measured by hours, data transfers,
storage capacity or availability.
6. Delivered through Internet Technologies: service can be delivered using Internet
formats and protocols such as URLs, HTTP, TCP/IP and Web technologies.
11 | P a g e
1.3 Three types of cloud computing
Cloud‐computing services can be delivered by an internal IT organization (insourced) or by an
external service provider (outsourced). The underlying infrastructure can be hosted within an
organization's data center or in an external data center(Bittman, 2010).
Private cloud:
The underlying cloud infrastructure (regardless insourced or outsourced) is dedicated to a
single customer
Public cloud:
Vendor provides a pool of computing resources which is sharable between customers. However
the allocation of these resources is often made random and anonymous event to the vendor to
avoid potential conflicts between competing customers. For example, a rendering instance of
Disney can co‐exist in the same physical machine as of Pixar’s. If this information is known by
any of the parties could cause serious conflicts of interest.
Hybrid cloud:
Customer manages essential operations in‐house and has others provide some less‐important
resources.
In the example comparing electricity and cloud computing above, the main reason for moving
the existing infrastructure to the cloud is the economic gain. In IT industry, the economic gain
can be further detailed in saving these costs (Amazon, 2011c):
12 | P a g e
Asset Utilization
Each year traditional data centers utilize 5%‐20% on average of their capacity. While
investments in virtualization and related technologies can improve server utilization, the post‐
virtualization utilization rates of 20%‐25% are still the highest that one can achieve
Hardware Costs
In typical data center installation, large initial investment is usually the case. Not only it requires
a strong commitment in the technology that will utilize the resources but also it makes future
upgrades (servers, routers, or load balancers) expensive.
Power Efficiency
Dedicating IT and Engineering resources are needed to improve power efficiency by using the
most efficient equipment, researching and always keeping their practices up‐to‐date with
industry best’s which often are not feasible expenses for small and medium enterprises
Enabling Redundancy
Enterprises running their own data centers need to have plan for availability and redundancy.
They need not only maintain reliable storage and backup devices, but also operate a reliable
network with redundant networking devices, transit connections, and physical connections
between data centers. This includes developing plans for disaster recovery. This includes
deploying data and applications across multiple domains. To achieve realistic disaster recovery,
all of the data centers and servers involved have to be constantly utilized; if they sit idle, there
is a high probability that they won’t function as desired when activated from a cold start.
13 | P a g e
Security
Running their own data center requires enterprises to ensure the confidentiality, integrity, and
availability of business critical data by themselves. Security costs for enterprises include
expenditures for physical security perimeter defense, network security devices, security
software licenses, staffing, costs associated with security regulatory compliances, physical
security requirements, smart cards for access control, and so on.
Supply Chain Management
In traditional enterprise data centers, the time from which the equipments are ordered to the
time they are put into use may be months. This idle duration is another direct cost to the
company.
Personnel
Enterprises need to nurture their own IT infrastructure teams that are required to manage
heterogeneous hardware and software, involve and stay current with data center design,
negotiate contracts, deal with legacy software, operate and maintain data centers, scale and
prepare for physical growth, etc. These teams may include, but not limited to:
installation, etc.
Data center team is needed to create, deploy and maintain reliable, efficient and cost‐
cutting facilities.
Operations staff is needed 24/7/365 in each facility.
14 | P a g e
Networking team is needed for running a highly available network. Expertise is needed
to design, debug, scale, and operate the network and deal with the external
relationships necessary to have cost‐effective internet transit.
Security personnel are needed at all phases of the design, build, and operations
process.
VMWare
VMware provides a wide range of virtualization solutions. Its virtualization platform products
include VMware Player that enables individuals to run virtual machines on their desktops;
Workstation for software developers and enterprise IT professionals; Server, which enables
virtual partitioning of a server; ESX Server, an enterprise‐class virtualization platform that runs
directly on the hardware; Virtual SMP that enables a virtual machine to use four physical
processors simultaneously; and VMFS, which allows multiple ESX Servers to share block‐based
storage. The company also offers VirtualCenter that provides a central point of control to
manage a virtualized IT environment; VMotion, which allows users to move virtual machines;
DRS that creates resource pools from physical servers; HA, which provides automated recovery
from hardware failure; Consolidated Backup that enables LAN‐free automated backup of virtual
machines; Lab Manager to automate the setup, capture, storage, and sharing of multi‐machine
software configurations; ACE that allows desktop administrators to protect company resources
against the risks presented by unmanaged desktops; Virtual Desktop Infrastructure to host
individual desktops inside virtual machines running on centralized servers; Virtual Desktop
15 | P a g e
Manager, a desktop management server that connects users to virtual desktops in the data
center; and VMware Lifecycle Manager that provides control over the virtual environment
(CrunchBase, 2011e).
VMware Academic Program enables access to cutting edge virtualization technology by giving
free licenses to faculty and student.(VMware, 2011). Participating universities include Harvard,
MIT, CMU, Georgia Tech, etc.
networking, cloud computing and Software as a Service offerings are designed to simplify
computing for millions of users, delivering applications as an on‐demand service to any user, in
any location on any device.
Citrix Education Licensing program offers 40% discount for individual purchases or a flat rate for
campus‐wide purchases(Citrix, 2011) (CrunchBase, 2011b)
Microsoft Azure
The Windows Azure platform offers a flexible, familiar environment for developers to create
cloud applications and services. With Windows Azure, they can shorten your time to market
and adapt as demand for your service grows(CrunchBase, 2011a, 2011d).
Windows Azure offers a platform that is easily implemented alongside your current
environment.
16 | P a g e
Windows Azure: operating system as a service
Microsoft SQL Azure: fully relational database in the cloud
Windows Azure platform AppFabric: makes it simpler to connect cloud and on‐
premises applications
Microsoft and National Science Foundation teamed up in a collaborative project where
Microsoft will offer NSF researchers free access to their cloud computing infrastructure
powered by Azure platform.(Microsoft, 2010)
Google App Engine offers a full‐stack, hosted, automatically scalable web application platform.
The service allows developers to build applications in Python, Java and use Google services such
as the Datastore (built on BigTable) and XMPP. The service allows developers to create
complete web application that run entirely on Google’s computing infrastructure and scale
automatically as the application’s load changes over time. Google also provides an SDK for local
development and site monitoring tools for measuring traffic and machine usage (CrunchBase,
2011c).
Amazon Web Services allow users to build businesses, not just applications. Strictly following
Service Oriented Architecture (SOA), Amazon took advantage of its experience in building
scalable ecommerce infrastructure and offers them to others. It offers Amazon Associates Web
Service that exposes Amazon’s product data and e‐commerce functionality; Amazon Elastic
17 | P a g e
Compute Cloud (EC2), a Web service that provides elastic scalable compute capacity in the
cloud; Amazon Flexible Payments Service, which allows the movement of money between any
two entities, humans, or computers; Amazon Mechanical Turk that provides a Web services API
for computers to integrate crowdsourcing (or “artificial” artificial intelligence) directly into their
processing; and Amazon Simple Storage Service, which provides a Web services interface to
store and retrieve data. It also provides Amazon Simple Queue Service that offers a hosted
queue for storing messages as they travel between computers and Amazon Relational
Database Service, a Web service that allows user to set up, operate, and scale relational
databases in the cloud (CrunchBase, 2011a).
For new user, Amazon provided one year free of charge to use Amazon Elastic Compute Cloud
(EC2) and Amazon Relational Database Service. Furthermore, Amazon Education Grant gives
out free credits to qualified instructors and researchers all over the world. More on that will be
discussed in the next chapter.
18 | P a g e
Table 1: A
Amazon Web Se
ervices vs Windoows Azure Platfform
CP
PU (GHz))
14
12
10
8
CPU(GHz) A
AMZ
6
CPU(GHz) M
MSFT
4
0
1 2 3 4 5
Figure 2: C
CPU comparison chart
Mem
mory (GB
B)
16
14
12
10
8 M
Memory (GB) A
AMZ
6 M
Memory (GB) MSFT
4
2
0
1 2 3 4 5
Figure 3: Memory comparisoon chart
19 | P a g e
I
Instance
e Storagee (GB)
2500
2000
1500 Insttance Storage (GB)
AMMZ
1000 Insttance Storage (GB)
MSSFT
500
0
1 2 3 4 5
orage comparisoon chart
Figure 4: Sto
Price
e (USD/h
hr)
$1.20
$1.00
$0.80
AMZ Linuxx
$0.60
AMZ Wind
dows
$0.40 MSFT
$0.20
$0.00
1 2 3 4 5
Figure 5: Prrice comparisonn chart
20 | P a g e
Chaptter 2: A
Amazon Cloud S
Service
es Offeriings
This chap
pter presentts the following topics:
Amazon Elast
A tic Cloud Co
omputing
Price and stru
ucture
Management
M t Interface
Amazon Educ
A cation Grantt
Amazon Web
A b Services in
n Education
2.1 Ove
erview abo
out Amazo
on Web Serrvices pro
oducts
Amazon Web Service
es offers a b
broad range of products.. They debutt their first p
product, Am
mazon
Simple Storage
S Serrvices (S3) in
i 2006 wh
hich introdu ced the co
oncept of “infinite storrage”.
Indeed, w oring objectss up to 5TB aand there iss no limit on
with the platform that ssupports sto n how
many ob
bjects can be
b stored, th
he service was
w a big h it, if not reevolutionary. Companiess like
Netflix be portunity to move their vvideo rentin
egan to realize that opp ng service to
o the Interneet. An
importan
nt term thatt Amazon inccludes in their Service LLevel Agreem
ment is the Monthly Up
ptime
han 99.9% orr they will giive back the credit used.
Percentaage higher th
21 | P a g e
Introduced as limited beta in in 2006, Amazon Elastic Compute (EC2) turned computing upside
down. AWS used XEN virtualization to create a whole new cloud category, Infrastructure as a
Service, long before people started searching for Infrastructure as a Service (IaaS). Though
server virtualization already existed for quite a while, buying one hour of computing power in
the form of a Linux (and later Windows) server did not exist yet.
The innovation didn’t stop there. They now have over 20 products related to their cloud
services ranging from cloud storage, computation to deployment, management, billing and
support.
Figure 6: AWS products
22 | P a g e
2.2 Priccing structture
2.2.1 Am
mazon paym
ment options at a glan
nce
On‐
Reserve
ed Spot In Out
demannd
Load
Block Cloud‐
Instancce Dataa Transfer Elastic IP
P balancin
storage Watch
g
Monthly chaargee
mazon pricing strructure
Figure 7: Am
on provides the first yeaar free of proovisioning o
For new user, Amazo one micro instance and o
other
services like cloud storage, load balancing, e
etc.
23 | P a g e
2.2.2 Re
enting optio
ons (Amazo
on, 2011b)
On‐D
Demand d Reserved
Spot In
nstances
Insttances Insttances
• Users payy for computte • Users makke a one‐timee •Users bid on unused Amazzon
capacity hhour‐by‐hou ur payment fo or each EEC2 capacity in an open
with no loong‐term instance wwith a aauction againnst other EC2
commitm ment. This meeans commitmeent for a uusers. They caan run those
iinstances for as long as the
eir
cutting th
he costs and specific peeriod of timee
bbid exceeds the current Sp pot
burdens o of planning, and receivve a significant PPrice. The Spoot Price chang
ges
purchasinng, and discount oon the hourlyy pperiodically b
based on supp ply
maintaining equipmeents. usage charrge for that aand demand, and custome ers
On‐Demaand Instancees instance. wwhose bids mmeet or exceed it
also remoove the need d to ggain access to
o the available
purchase additional SSpot Instancees.
equipmen nts to handlee
periodic ttraffic spikess.
Figure 8: In
nstance price opptions
for 2 academic seme
esters (totallyy 9 months) then the prrice we woulld have to paay:
24 | P a g e
Micro instance uusages
Figure 9: M
demand option is eco
onomical on
nly when the
e usage is beelow 6 months of continuously use.
2.3 Insta
ance types
Amazon EC2 instances are group
ped into six families: Staandard, Micro, High‐Meemory, High‐‐CPU,
Compute, and Cluster GP
Cluster C PU (Amazon,, 2011a).
computaation resourcces. The virtu
ual lab comp
puters are off micro instaances
Standard
d Instances h
have memory to CPU raatios suitablee for most ggeneral purp
pose applicattions;
High‐Memory instan
nces offer laarger memo
ory sizes for high througghput appliccations, inclu
uding
25 | P a g e
database
e and memo
ory caching aapplications;; and High‐CCPU instances have pro
oportionally more
CPU reso
ources than m
memory (RA
AM) and are well suited ffor computee‐intensive aapplications..
Cluster C
Compute insstances provvide a very laarge amountt of CPU cou
upled with in
ncreased nettwork
other demanding network‐bound applications.
nces provid
Cluster GPU instan de general‐purpose grraphics pro
ocessing units (GPUs) with
proportio
onally high CPU and in
ncreased ne
etwork perfformance m
making them
m well suited for
applicatio
ons benefittting from higghly paralleliized processsing, includin
ng HPC, rend
dering and m
media
processin
ng applicatio
ons.
When ch
hoosing instaance types, yyou should cconsider thee characterisstics of yourr application
n with
regards to
t resource utilization and
a select the
t optimal instance family and sizze. With Am
mazon
applicatio
on on different instancce families and types. The best w
way to deteermine the most
appropriate instance
e family and instance type is to l aunch test instances aand run vaarious
benchmaarks on those instances.
Small Extra Large
E Medium Quad druple
Large Double
D Extra Largge Extraa Large
Extra Large Extra Large
E GPU
Quadruple
Q Quad druple
Extra Large
E Extraa Large
Figure 1
10: Instance typpes
26 | P a g e
2.4 Monitoring traffic and I/O charge
Amazon counts each operation on disk as one I/O operations. Suppose you’re running a
database scripts with 1000 lines than 1000 I/O operations will be charged to your account.
Similarly, the traffic to/from your virtual instance is also charged. Suppose you’re using Putty to
connect to your instance that traffic is counted, though very little because they’re text‐based. If
one uses remote desktop or other remote viewer software it would be much more expensive in
terms of network traffic.
Access to applications and services within AWS cloud is secure and protected in multiple ways.
There are three types of credentials currently offered by AWS
There are three types of access credentials used to authenticate your requests to AWS services:
1. Access Key: make secure REST or Query protocol requests to any AWS service API. It is
tied to every created account
2. X.509 certificates: make secure SOAP protocol requests to AWS service APIs.
3. Amazon EC2 Key Pairs: are used to launch and then securely access Amazon EC2
instances.
27 | P a g e
To sign in to AWS web sites and applications, AWS requires Amazon e‐mail address and
password. Additionally, it supports the AWS Multi‐Factor Authentication option.
AWS Identity and Access Management (IAM) enable administrators to securely control access
to AWS services and resources. With IAM, admin can create up AWS resources and grant it to
appropriate users. IAM functionalities include
Manage IAM users and their access ‐ create users, assign users individual security credentials
or request temporary security credentials to provide users access to AWS services and
resources. Admin can also grant operations that users can perform with limited to assigned
resources.
Manage access for federated users: enable identity federation to allow existing AWS identities
to access AWS APIs and resources using IAM's fine‐grained access controls, without the need to
create an IAM user for each identity.
There are three way to administer your instances
1. Command line tools: Openssh(Linux) or Putty(Windows). In this scheme you have to
possess one of the three access credentials: Access Key, X.509 certificate or EC2 keypair.
Management tasks are done via command line interface.
28 | P a g e
2. Amazon AWS Management Console: the access credential is already tied with your
account once entering AWS email and password. Management tasks are done via web
interface provided by Amazon.
3. Cloud brokerages: some cloud vendors provide capabilities to monitor different cloud
services including Amazon such as RightScale, CloudSwitch, CloudKick etc. In additional
to management tasks, they also provide comprehensive payment and monitoring
management. Most of these vendors offer web‐based interfaces.
4. Third party libraries: offered by independent developers and researchers, open‐source
libraries enhance cloud management via pre‐written scripts and interface which help
automate a lot of tasks. Some notable libraries include ElasticFox (a Firefox extension),
Boto (Python library interfacing with Amazon API) or Amazon SDK Eclipse plugin
AWS in Education provides a set of programs that enable the academic community to easily
leverage the benefits of Amazon Web Services for teaching and research. Amazon provides
$100 credit per student for educators and researchers around the world. The purpose is to
encourage them to take advantage of on‐demand infrastructure of Amazon Web Services to
teach advanced courses in computer science, tackle research problems and explore new
projects which previously would have required expensive up‐front investment and ongoing cost
of maintenance in infrastructure.
29 | P a g e
Several universities have already incorporated AWS in their teaching programs, or take
advantage of its massive computing capabilities to solve difficult problems.
Project Olympus is a startup incubator for faculty and students at CMU. It bridges the gap
between academic researches and commercialized products and nurtures the next innovation
in Computer Science. Amazon cloud services help them scale their computing resources and
spin off projects as fast as possible (CMU, 2011).
Stanford University:
Stanford has been heavily used Amazon EC2 and S3 since 2008 for faculty researches. In 2011
the Stanford Engineer Department initializes ambitious project to offer thirteen online courses
completely free with the help of Amazon Cloud Services. These courses have the same content,
review sections and assignments as the traditional ones offered on‐campus. Artificial
Intelligence and Machine Learning classes now have over 70000 students registered each. The
lectures are delivered using video streaming technology. Reviews and assignments are made
interactive and autonomously. Traditionally it would cost the school enormous amount of
money to capacitate such a huge number of students so that students have to cover partial or
full cost of the course but thanks to cloud computing it is possible now to have completely free
and quality online courses for everybody (Stanford, 2011a, 2011b).
Havard (Havard, 2011) has been using Amazon cloud services since 2008 to host multiple
projects to promote individualized healthcare. The success of the project depends on the
30 | P a g e
capability to implement cost‐effective healthcare software, ensure data integrity confidentiality
and availability (Havard, 2011).
31 | P a g e
er 3: Build
Chapte ding virtu
ual lab witth Amazo
on Cloud SService
This chap
pter presentts the following topics:
‐ Why virtual l
W ab?
‐ Analyze lab r
A requirementts
‐ How to build
H AWS virtuaal lab
3.1 Problem st
P tatement
IT 544 – A
Advanced D
Database Maanagement SSystem II annd IT 680 – SSoftware Enggineering Prroject
are two o
of the advan
nced‐level classes curren
ntly offered by Informattion Technology Departm
ment,
Minnesota State Un
niversity. These classes are team‐bbased, project‐based an
nd programm
ming‐
driven which
w give sttudents expe
erience on how
h to proggram and co
ollaborate ju
ust as real w
world
developm
ment experie
ence. Due to
o the structu
ure of the claass, three to
o five studen
nts work in tteam,
develop software an
nd demonstrrate new prototypes evvery two weeks. For thee past years each
team me
ember has to setup sp
pecific softw
ware on theeir machiness, develop aand merge code
manuallyy. The demonstration is usually on o
one of the teeam membeer, usually teeam lead and
d it is
32 | P a g e
development environment. However students usually have different schedules and lab
reservation is often limited. Hence it is almost impossible to acquire a computer lab for a
specific time that can accommodate every member schedule. Therefore in reality there are only
one or two students do the programming work, while others write documentation or other
trivial tasks. They do not necessarily knows the work of each other and often lead to poor
quality work and not a good learning experience. The identified problems here are:
1. Lack of dedicated computers for development work
2. Lack of reserved workspace for team
3. Lack of collaboration tools to facilitate communication and development
(1), (2) require the school to provide extra computing capacity or students have to purchase
powerful computers at their own expenses
(3) can be solved by using open‐source collaboration tools and techniques
Either of the above solutions is not only costly in terms of initial investment, but also bears the
burden of configuring, managing, maintaining in the shoulders of school and students.
Another alternative method is to consider computing as a utility, thus offsetting this big burden
to the providers. So the school can cut cost and students can focus on studying. In this paper
Amazon Web Services is chosen to implement the virtual for students in Minnesota State
University because of the benefits mentioned in previous chapters.
33 | P a g e
3.2 Building AWS virtual lab
The following items are needed when creating an AWS account:
1. A computer with Internet access
2. A credit card
3. A phone number
For education purpose, one should use a credit card with $0 allowance to avoid surcharge if
anything happens.
Go to AWS website to register for an account. Follow through the instructions. Upon
completion Amazon will provide you a PIN number, then place a call on your registered number
and required you to enter the provided number.
For each student, Amazon gives away $100 in form of credits to use any of the cloud
computing web services, except for the ability to purchase reserved instances and premium
support. Depends on the nature of individual classes, administrator of the account can grant
a micro instance for each in a low‐demanding resource lab, such as web programming or
database administration. Alternatively, multiple users working in a team can share a more
powerful instance in higher‐demand lab such as data warehouse and mining or distributed
34 | P a g e
databaase systemss. The usage
e and charge
es must be monitored carefully on
n a daily bassis to
ensure
e that the prrojected usaage will not e
exceed the aactual grant amount.
Admin
n can plot several opttions as in this figure to determiine which o
one is the most
econo
omical option
n. Let’s recall about the figure in chaapter 1:
Let assume that e
each instancce will be grranted to onne student. So with $10
00 credit stu
udent
can on
nly use a miicro instance
e non‐stop ffor 6 monthhs with on‐demand option. The durration
will ge
et shorter iff admin cho
ooses higherr configurati on or use W
Windows plaatform. How
wever
with reserved
r op
ption studen
nt can go up to 9 monnths continu
uously. The reserved option
comess with follow
wing disadvantages:
‐ Admin must
A commit certtain amountt of money upfront to p
purchase resserved instances.
The duration of the purch
hases must llast for at leaast one yearr
35 | P a g e
‐ Once purchasing, admin cannot change configuration or platform. For example, if admin
purchased 20 Linux micro‐instances, if he wants a small instance or Windows instance,
he has to pay for on‐demand price for that instance.
Oracle database lab requires high throughput of I/O requests and moderate amount of
memory to operate smoothly. Amazon micro instance has reasonable I/O performance but run
a little less memory than Oracle 11g Express version required (after installing Oracle the Linux
instance only has approximately 40MB left). That could cause some trouble developing Oracle
web application through APEX. However the administrator can tune it up and optimize the
memory allocated to Oracle to make it perform better (see chapter 4 in the troubleshooting
part for details).
If individual student has to be given an instance than having them ability to start/stop instance
is a must to save money. Unfortunately Amazon Identity and Access Management hasn’t have
capabilities to create resource bucket based on instance IDs yet.
The alternative solution is to grant a larger instance to a group of students (three or four) and
let them use it continuously. Consider to step up from micro instance to small Linux instance:
with four times increased in price you would have:
‐ Three times more memory
‐ Higher I/O performance (moderate compared to low)
‐ Sixteen times more storage
36 | P a g e
Figure 11: Virtual lab architectural design
37 | P a g e
3.2.4 Virttual lab settup processs at a glance
Launch
Enaable
Create in
nstances
servvices Set u
up
Verifyy virtual with
thro
ough instan
nce
image same
firewwall
image
Figure 12: Virttual lab installattion steps
3.2.5 Iden
ntify users and use ca
ases
ecturer: perrson who will be using the cloud i nfrastructurre for educaational purp
1. Le poses.
He/she
H doess not necessarily know
w about adm
ministering virtual instaances. The ideal
caandidate sh
hould have knowledge about Ama zon Web SServices in tterms of prricing,
architecture aand identity management
2. Assistant:
A he ovision, and backup virrtual instancces. They sh
elp lecturerss setup, pro hould
have extensivve knowledgge about diffferent Operrating System
ms, Networkking and Seccurity
knowledge
eir perspective, a virtuaal instance is like a remote deskttop box that are
cllient. In the
granted for th
heir use onlyy
38 | P a g e
3.2.6 Crea
ate and gra
ant permisssion to use
ers
Admin
•Purchase instance
•Monitor payment
Assistant
•Create virtual image
•Lauch/terminate/sta
nstance
rt/stop in
•Backup
•Monitor iinstance
health
Stud
dent
•Devvelop
applications
•Do admministrative
functions
Figure 13: Users and funcctions
3.2.7 Cho
oosing a reg
gion
Amazon limits 20 virrtual instancces per regio
ons. This is eextensible through speccific requestt. The
regions that are located in the U.S are the ch
heapest and at the samee price.
3.2.8 Cho
oosing an arrchitecture
e
purposess. For the virrtual lab a m
micro instancce running Liinux would be economical and suffiicient
to a varie
ety of tasks, including hosting a webserver andd running daatabase instaance at the same
time.
39 | P a g e
Most of the software needed in order to set up database and programming lab could run on
either Linux or Windows environment. Comparing with Windows, Linux has following
advantages:
Consume less resources (CPU, RAM, hard drive) to run operating system
Can run in headless mode (without Graphical User Interface), which further reduces
traffic when connecting remotely and resources as well
Cheaper to rent (due to licensing)
There are as many as 20000 Amazon machine images (AMI) that are pre‐configurable out there
and ready to use. When planning to use a pre‐configure images one must take following things
into account:
Architecture of the image
Security (i.e. which ports are open and which services are let running by default)
Default configuration of running services (change default passwords if needed)
Software license (some images are free to deploy but you have to purchase the
software used inside virtual machine)
Amazon is approaching security matters using white‐listing. Only the services that are
configured to access remotely are allowed to run. Amazon made it clear for customer to enable
specific ports instead of opening all by defaults.
40 | P a g e
3.2.11 Creating backups
Users can generate snapshots of the disk. Instead of storing each snapshot distinctly, Amazon is
using version control for this approach. This means backing up a virtual disks 100 times will not
cost 100 times more storage.
By default, backup volumes are automatically counted towards S3 storage and will be charged
accordingly.
Running statuses of virtual instances are accessible through Amazon Management Console,
including:
1. Started: instance is up and running
2. Stopped: instance is down, equivalent to a shutdown of real machine
3. Terminated: instance can no longer be used. It has grace period where user can
extract or backup information from the instance before being completely removed
from the instance list
Furthermore, for each instance Amazon provides monitoring services for:
Average CPU utilization
Average Disk Reads
Average Disk Writes
Max incoming traffic
Max outgoing traffic
41 | P a g e
These ind
dividual mon
nitoring servvices are acccessible in grraph formatt when user clicks on a ssingle
instance..
Figure 14: Amazon monitorin g metrics
3.3 Building
g Oracle D
Database A
Administra
ation lab
Install required
Create
e swap Configu
ure
librariess and
partition networkking
softw
ware
Figure 1
15: Oracle lab innstallation proceedures
3.3.2 al considera
Additiona ations:
‐ So
oftware lice
ense: the purrpose of the
e lab is to gett students faamiliar with administrative
taasks of Oracle server. Th ull‐featured iinstallation iis required, but scalability
herefore a fu
and high perfformance is not necessary feature. O
Oracle Application Expreess license are
frree and perffect for this kkind of learn
ning experiennce
‐ Virtual instan
V nce capacityy: as common among da tabase serveer technologgies, Oracle
database required low CP
PU footprintt but high I/O
O performan
nce and mem
mory capacitty.
The default b
block storage
e provided b
by Amazon: 88GB is adequ
uate for mosst of the taskk.
The average aamount of id
dle memory after install ing Oracle aand Apex is 7
70MB
42 | P a g e
3.4 Agile so
oftware developmen
nt lab arch
hitecture
Install & Insstall &
Insstall &
configuure connfigure
MySQL
M
SVN Zennd PHP
Figure
e 16: Software e
engineer installaation procedurees
3.4.2 al considera
Additiona ations:
‐ So
ource code control verssion softwarre: for Agile project it is important to
o have a verrsion
co m where teaammates can share and rapidly com
ontrol system mmit to codeebase. This allow
fo
or rapid deployment and
d demonstraation in the eend of each sprint. Amo
ong various kkinds
of code versio
on control su
uch as Git, V
Visual SourceeSafe, etc. Subversion iss stable, crosss‐
platform and has powerfful GUI clientts. In additioon to that it has many free public
epositories o
re over the Inte
ernet where students caan easily setu
up their own
n workspacees in
a matter of m
minutes, all vvia web interrface.
‐ So
oftware lice
enses: MySQ
QL, Subversio
on and Zend PHP are all o
open‐sourcee project and
d
frree to use
‐ nce capacityy: compared with other D
Virtual instan
V QL has loweer memory and
DBMS, MySQ
CPU requirem
ments. The average amo
ount of idle m
memory afteer installing SSVN, MySQLL,
PHP, ZendSerrver is 140M
MB.
43 | P a g e
Chapte
er 4: Analy
ysis of stu
udent usa
age
This chap
pter presentts the following topics:
‐ Practiical considerrations
‐ Stude
ent response
e
‐ Frequ
uently encou
untered prob
blems and s olutions
4.1 Practica
al considerrations
control over
o the maaximum amo
ount he/she
e wants to uuse the servvice compariing to debit card
option. The
T on‐dem
mand structu eticulously ppricing baseed on different metricss also
ure and me
causing ttraffic chargge or I/O chaarge. Assistaants also ha ve to be traained well fo
or not accid
dently
surcharges.
By defau
ult, Amazon
n reserved instances
i arre not creddited to amazon’s gran
nt for educaation.
Educatorrs who wish to purchase
e reserved in
nstances havve to contacct Amazon directly to reesolve
that issue
e.
44 | P a g e
4.2 Student response
Two months after granting students access to virtual lab, we began a survey to evaluate their
response with the purpose of improving user experience for the next semester. In total we got
ten responses, nine of which came from Database Management System II class, as depicted in
sections below:
Figure 17: courses taken
80% agreed that their current computer meets the course expectations, while only 40% of them
thought that virtual computer’s specifications is not powerful enough
Figure 18: PC requirements
45 | P a g e
Figure 19: virtual lab requirements
70% indicated that installing required the software will slow their computer down significantly
Figure 20: PC slowness
70% liked to have a dedicated computer to handle course assignments. The same percentage of
students wants to have a dedicated virtual machine for that special purpose.
Figure 21: Student wants dedicated PC
46 | P a g e
Figure 22: Student wants virtual lab
70% liked to virtual lab to be available more than nine hours daily
Figure 23: Virtual lab availability
90% agreed that they could study at their own pace with virtual lab
47 | P a g e
Figure 24: Flexible study time
All students survey wished virtual computers would be equipped with more RAM, 80% wished
more CPU power and network bandwidth.
Figure 25: Wished specifications
70% indicated that they would be willing to pay for the virtual lab themselves.
Figure 26: Cost options
48 | P a g e
50% indicated that they want the virtual lab to be implemented in every IT courses, while 30%
think it would be suitable to any database courses
Figure 27: Applicable courses
From the survey indicated in the previous section, we were also able to identify common errors
encountered by students while using the virtual servers and provided solutions accordingly
4.3.1.1 Problem: cannot access APEX web interface at http://[public DNS:8080/apex
• Diagnostic: This error only happens when the instance is rebooted. By default Amazon
instance are assigned dynamic dns names IP addresses. This means that if an instance is
restarted, it may have different dns name and IP address than the previous one. When
49 | P a g e
Oracle instance starts, it doesn't have the knowledge to which IP it should be bounded,
thus causing the error above.
• Solution: to address this issue, we need to update Oracle listener files to the latest
hostname value
50 | P a g e
1. Login to the instance console via ssh (See Appendix B for details)
2. In the ssh console, type
hostname
3. The result looks like: ip‐10‐122‐170‐57
4. Edit & save listener.ora
sudo nano /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Look for this line and change HOST to the value from (3)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = ip‐10‐122‐170‐57)(PORT = 1521))
)
)
5. Edit & save tnsnames.ora
sudo nano /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora
XE =
51 | P a g e
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip‐10‐122‐170‐57)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
6. Restart Oracle services
sudo ‐s
su ‐ oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
sqlplus "/ as sysdba"
shutdown immediate
startup
52 | P a g e
4.3.1.2 Problem: ORA‐04031: unable to allocate XXX bytes of shared memory ("shared
pool","select /*+ rule */ bucket_cn...","SQLA^
Diagnostic: This error happens because APEX consumes all memory allocated to
Oracle’s shared pool size.
• Solution: to address this issue, we need to increase memory assigned to Oracle and let
it dynamically allocate memory needed for applications via sga parameters
1. Login to the instance console via ssh (See Appendix B for details)
2. Login to Oracle console
sudo ‐s
su ‐ oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
sqlplus "/ as sysdba"
3. View the SGA parameters:
show sga
4. The output will look like the following:
53 | P a g e
Total System Global Area 158662656 bytes
Fixed Size 2224592 bytes
Variable Size 125832752 bytes
Database Buffers 25165824 bytes
Redo Buffers 5439488 bytes
Note that only 158MB has been assigned for Oracle automatic memory allocation. The micro
instance has 614MB of RAM so we can adjust these values to improve APEX’s performance
5. While still in Oracle console, type the followings:
ALTER SYSTEM SET SGA_MAX_SIZE = 550M scope =spfile;
ALTER SYSTEM SET SGA_TARGET = 450M scope=spfile;
shutdown immediate
startup
6. Confirm the memory has been increased by looking at the output:
ORACLE instance started.
54 | P a g e
Total System Global Area 576221184 bytes
Fixed Size 2228608 bytes
Variable Size 230690432 bytes
Database Buffers 339738624 bytes
Redo Buffers 3563520 bytes
Database mounted.
Database opened.
4.3.1.3 Problem: invalid administrator password
• Diagnostic: This error happens because APEX and Oracle requires a lot of passwords for
internal admin, workspace and schema. On top of that, the initial password must be
changed after the first login. This may cause confusion among students and they tend to
forget the passwords after a while
• Solution: students should note down and save it to a safe location all the passwords
when interacting with APEX server. If they forget workspace/schema password, recreate
a new one with a new password. If they forget admin password than go through these
steps to reset it:
1. Login to the instance console via ssh (See Appendix B for details)
2. Switch to Oracle user
55 | P a g e
sudo ‐s
su ‐ oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
3. Change directory to APEX folder
cd /u01/app/oracle/product/11.2.0/xe/apex/
4. Run change password script
sqlplus "/ as sysdba"
@apxchpwd.sql
4.3.2.1 Problem: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)
56 | P a g e
• Diagnostic: This error happens because MySQL uses different password for local access
and remote access. For local access the default password is ‘mysql’ ( or whatever
specified during installation). For remote password the default password is blank.
• Solution: students can either use root username with blank password (not
recommended because of potential security issue) or add a new MySQL user and grant
table privileges to that user.
1. Login to the instance console via ssh (See Appendix B for details)
2 Login to MySQL console
mysql –u root –pmysql
create user [user] identified by ‘[password]’
grant all on [database_name].* to test;
4.3.2.2 SVN conflicts
• Diagnostic: This error happens when students update/merge their files from the server
and Subversion client software cannot properly merge the local changes with the
remote updates.
• Solution: students can resolve the conflicts manually or remove the parent directory
where conflict happens then perform svn update again.
57 | P a g e
Chapte
er 5: Concclusion an
nd future research
This chap
pter presentts the following topics:
Concluding remarrks
ations
Limita
Future
e research
5.1 Con
ncluding re
emarks
In this re
esearch we e
evaluated different cloud vendors bbased on arcchitecture, specificationss and
Web Servvices techno
ology, speciffically Elasticc Compute (EEC2) as our main platforrm for the virtual
lab. With
h the genero
ous academic grant from
m Amazon w
we were ab
ble to set up
p virtual labss and
Engineerring classes. Next, we gaathered stud
dent’s input on how theyy use it, whaat problemss they
response
e collected we identiffied problems and prroposed acccording solutions for next
implementation of virtual lab.
5.2 Lim
mitations
We had limited time to investigaate and implemented ouur first virtuaal lab (rough
hly three
months).. Human resources are aalso limited ((only one asssistant for the whole tim
me). The
58 | P a g e
problem that most students identified were not having enough instructions and tutorials on
how to develop projects using virtual servers. For the next iteration, the number of human
resources will be increased. Thus more direct help will be provided to students. Moreover,
problems identified during first iteration have been solved and documented in Chapter 4 and
detailed tutorials in the appendixes of this paper will hopefully provide a better understanding
and guidance for future assistants and students for the next iteration.
Besides the two courses that we chose to implement virtual lab, as indicated by students, most
IT courses can benefit from having virtual lab as well. With the power of having nearly unlimited
computing resources, IT 641 ‐ Distributed Database Systems lab can be organized in a way that
student will be granted multiple virtual instances running different DBMS. For administrative
classes such as IT 542 – Database Security, Auditing, and Disaster Recovery and IT 562 –
Network Administration and Programming , each student could be given a virtual Linux box to
practice database administrative skills. For software‐based classes such as IT 583 – Web
Application and Human Interface Design, IT 584 – Software Engineering virtual lab can served
as development server where students can deploy their code onto the server.
In other to expand the use of cloud‐based labs to other subjects the following things must be
taken into consideration
‐ Platform and architecture of the lab: are they Windows‐based or Linux‐based,
32 bit or 64 bit, etc.
59 | P a g e
‐ Required software, compatibility and licenses: are they open‐sourced, could
they run on 64‐bit platform). How much CPU/RAM/HDD needed to run those
software?
‐ Instructions and tutorials: must be provided to help future instructor/assistant
troubleshoot issues encountered during usage. Also installation process needs to
be properly documented.
‐ Cost control: do we need to grant each student a virtual instance, or a virtual
instance can be granted to multiple students? In the first students can have
freedom controlling their own instances. However the resources given to them
maybe limited and thus may reduce overall learning experience. In the latter
case, an instance with much higher specification could be granted and share
among students. Also the number of instances needed to be maintained will be
significantly lower.
instructors and students can communicate about issues and resolve them
effectively. They can be email, Google docs or any web‐based solutions.
help students collaborate more on their project. For example, install SVN or Git
for software development classes would get students familiar with working
collaborating environment.
60 | P a g e
Appendix A: Amazon EC2 basics
Figure 28: IAM create new group
61 | P a g e
Figure 29: IAM select security policy
62 | P a g e
Figure 30: IAM add new user
63 | P a g e
Figure 31: IAM confirmation screen
Figure 32: IAM Dashboard
64 | P a g e
Figure 33: IAM create password
65 | P a g e
Appendix B: how to setup Oracle 11g Express edition virtual server
Note: the tutorial is for Oracle Database 11.2 Express Edition release 2
1. Pre-installation: get file name Oracle Database Express Edition 11g Release 2 for Linux x64
from Oracle website:
http://www.oracle.com/technetwork/database/express‐edition/downloads/index.html
Go to AWS Management Console. Click on button Launch instance
Figure 34: Amazon Management Console
Select Basic 64‐bit Amazon Linux AMI 2011.09
66 | P a g e
Figure 35: Available Amazon Machine Images (AMIs)
67 | P a g e
Figure 36: Instance architecture options
On the next screen you will be choosing RAM disk ID and kernel ID. Leave it to default options.
68 | P a g e
Figure 37: Kernel and RAM Disk options
On the next screen identify instance name
69 | P a g e
Figure 38: Edit instance tags
In this step you would need to:
1. Generate keypair
2. Name your keypair and download it to your computer. You will need it later to
connect with Putty
70 | P a g e
Figure 39: generate instance key pair
3. Configure firewall:
By default, Amazon blocks all the outcoming ports from their servers. This means that to be
able to connect and use the services installed in Amazon virtual sever, one must enable the
TCP/UDP ports associated with those services. The admin/assistant could enable them when
launching new instances or modify them later inside the management console interface. These
are the steps to add ports to the firewall:
1. Choose group name and description
2. Choose a predefined rule OR specify a custom port. In this step you can also specify a
port range and allowed incoming IP addresses
3. Click on ‘Add Rule’ button
71 | P a g e
Figure 40: Instance firewall configuration
Upon completion, wait until the Status change to “running”(with little green icon). Note down the public
DNS of the instance to connect later. You can also use dnslookup to find the IP address of that one.
Note that the IP address is not guaranteed to be the same if the instance is rebooted. The public DNS
however is reliable.
Figure 41: Check instance running status
72 | P a g e
4. Get Putty:
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
5. (Optional) Convert .pem key to .ppk key
Get PuttyGen: http://tartarus.org/~simon/putty‐snapshots/x86/puttygen.exe
Load the pem key and save it as private ppk key
Figure 42: PuttyGen interface
73 | P a g e
Figure 43: Instruction Dialog
Figure 44: Configure Putty Authentication method
74 | P a g e
3. Connect to Amazon EC2 instance
Figure 45: Connect to virtual instance
Your host should be: ec2‐user@[your public DNS name]
You can also save it for faster connect next time.
75 | P a g e
7. Upload the installation
There are two ways to do this
1. Install FTP on the virtual server
a. Run command yum install vsftpd
b. Create user and setup ftp
c. Open FTP port in the firewall (default: 21)
d. Connect and upload using a FTP client (Total Commander or Firezilla)
2. Upload to a public sharing service. Example: Dropbox
a. Copy to the public folder
b. Open Dropbox web interface, get the URL
c. In the console, type: wget [file url]
8. Installation
Create a swap space. It will serve as a temporary storage for RAM when it nearly exceed
its capacity (same concept as paging file for Windows). I will set it to 2GB
sudo ‐s
dd if=/dev/zero of=/swapfile bs=1024 count=2048000
mkswap /swapfile
swapon /swapfile
Add the following line to /etc/fstab to enable swap at boot time
nano /etc/fstab
76 | P a g e
/swapfile swap swap defaults 0 0
Install required library:
yum install glibc make binutils gcc libaio
Extract installation file
unzip linux.x64_11gR2_OracleXE.zip
rpm ‐ivh oracle‐xe‐11.2.0‐0.5.x86_64.rpm
Upon completion it will ask you to run /etc/init.d/oracle‐xe configure
9. Post‐installation
For every Oracle installation, running /etc/init.d/oracle‐xe configure is required to setup
networking components. The script is run in interactive mode by default, which means it would
require user input. In order to clone the instance, I need to modify it to run in “silent” mode –
which means no human input is required.
To modify /etc/init.d/oracle‐xe, type nano /etc/init.d/oracle‐xe
1. Remove the body of configure_ask() method
2. Add following lines:
HTTP_PORT=8080
#get the listener port value
LISTENER_PORT=1521
77 | P a g e
ORACLE_PASSWORD=[your password]
ORACLE_DBENABLED=true
Make following changes to ~/.bashrc: nano ~/.bashrc
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
ORACLE_OWNER=oracle
ORACLE_SID=XE
LSNR=$ORACLE_HOME/bin/lsnrctl
SQLPLUS=$ORACLE_HOME/bin/sqlplus
export ORACLE_HOME
export ORACLE_SID
export ORACLE_BASE=/u01/app/oracle
export PATH=$ORACLE_HOME/bin:$PATH
Make following changes to /etc/rc.local: nano /etc/rc.local
#!/bin/sh
LOG=/var/log/rclocal.log
echo `date`>>$LOG
78 | P a g e
echo ‐‐‐‐‐‐‐‐‐‐‐‐‐‐ >>$LOG
/etc/init.d/oracle‐xe configure &>>$LOG
10. Create image from instance
1. Select instance.
2. From the drop down menu, click on create image. Note that the server is shutdown at
this staged and automatically started up right after its completion
Figure 46: Create instance image from a running instance
79 | P a g e
Figure 47: Create image confirmation
11. Verify installation
Open up a browser and access Apex home page:
http://[public DNS]:8080/apex
80 | P a g e
Figure 48: APPEX startup page
12. Launch instances with your own image
Go back to launch instance again. Choose number of servers you want to clone.
Now go to My AMI tab instead of Quick start. Your newly created images will be there.
81 | P a g e
Figure 49: Personalized AMIs
82 | P a g e
Appendix C: how to setup LAMP virtual server
1. Enable following ports on the firewall:
Follow instructions on Appendix B: enable following ports on the firewall
Port Software
21 FTP
22 ssh
80 PHP Web server
3306 MySQL
10081 ZendServer management interface
Table 2: Software lab enabled ports
2. Install MySQL
yum install mysql
Location of MySQL
Change default password
3. Install ZendServer: an opensouce PHP community server
wget http://downloads.zend.com/zendserver/5.5.0/ZendServer‐CE‐php‐5.3.8‐5.5.0‐linux‐
glibc23‐x86_64.tar.gz
tar –xvzf ZendServer‐CE‐php‐5.3.8‐5.5.0‐linux‐glibc23‐x86_64.tar.gz
83 | P a g e
Change directory to newly extracted folder
./install.sh
Location of webroot: /usr/local/zend/apache2/htdocs/
Figure 50: Zend Server startup page
4. Install SVN
yum install svn
5. Add following lines to /etc/rc.local
84 | P a g e
log=/var/log/rclocal.log
echo `date` >$log
echo ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ >> $log
/usr/local/zend/bin/zendctl.sh start >> $log
/etc/init.d/vsftpd start >> $log
85 | P a g e
References
types/
Amazon. (2011b). Amazon EC2 Pricing, from http://aws.amazon.com/ec2/pricing/
Amazon. (2011c). AWS Economics Center, from http://aws.amazon.com/economics/
http://docs.amazonwebservices.com/IAM/latest/GettingStartedGuide/
portal.amazon.com/gp/aws/developer/account/index.html?action=access‐key
Barr, J. (2011). Introduction to Amazon Web Services. Retrieved from
http://www.slideshare.net/AmazonWebServices/introduction‐to‐amazon‐web‐services‐
7708257
Bittman, T. J. (2010). Private Cloud Computing: An Essential Overview. [Research].
Citrix. (2011). Citrix Launches New Education Licensing to Jumpstart Campus‐wide Adoption of
http://www.citrix.com/English/ne/news/news.asp?newsID=1860966
CMU. (2011). Project Olympus, from http://olympus.cs.cmu.edu/about/
http://www.crunchbase.com/product/amazon‐web‐services
systems
86 | P a g e
CrunchBase. (2011c). Google App Engine from http://www.crunchbase.com/product/google‐
app‐engine
azure
CrunchBase. (2011e). VMware, from http://www.crunchbase.com/company/vmware
Dawson, P. (2010). Virtualization Reality. Retrieved from
http://cloudcomputing.sys‐con.com/node/612375
Havard. (2011). The Laboratory for Personalized Medicine, from http://lpm.hms.harvard.edu/
Microsoft. (2010). Microsoft and NSF Announce Client + Cloud Computing Project to Accelerate
http://blogs.msdn.com/b/windowsazure/archive/2010/02/04/microsoft‐and‐nsf‐
announce‐client‐cloud‐computing‐project‐to‐accelerate‐scientific‐discovery‐and‐foster‐
collaborative‐research.aspx
Ricardo, D. (1821). On The Principles of Political Economy and Taxation. Library of Economics
and Liberty.
Stanford. (2011a). Introduction to Artificial Intelligence, from https://www.ai‐class.com/
Stanford. (2011b). Machine Learning, from http://www.ml‐class.org
http://www.vmware.com/partners/academic/program‐overview.html
87 | P a g e