Graduation Project Report

68

Transcript of Graduation Project Report

Page 1: Graduation Project Report

Ref :2014/II/199 Sustained on July 2014

Ministry of Higher Education and Scienti�c Research

National School for Computer Studies

Graduation Project Report

Subject

Cloud Services Management Tools

Carried Out By :

Dhia Abbassi

At

Organism : Rosa� HoldingCompany Supervisor : Mr. Ayoub AliPedagogic Supervisor : Ms. Chiraz Ben Abdelkader

Address : 5 Street Ibn Assaker, El Manzeh 1, Tunis, TunisiaPhone : +216 71 235 352Website : http ://rosa�.com

Academic Year 2013-2014

Page 2: Graduation Project Report

DEDICATION

I dedicate this report

To my dear parents Ahmed and Hamidawho have always been here for me throughout my studies

and who gave me a wonderful model of labor and perseveranceI hope that they �nd in this modest work all my gratitude and all my love

To the soul of my grand father Abdelhamidwho would have been the happiest grand father today

may god preserve him the merits of paradise

To all my uncles and aunts

To all my cousins

To all my friendswho have always believed in me and cared for me

To all those I love and all those who love me

1

Page 3: Graduation Project Report

ACKNOWLEDGMENTS

An internship is not only a step added to the student's curriculum. It also re�ects ona person's choices in his professional life due to the constant interaction with his coworkers.

I take this opportunity to express my gratitude to the people who have beeninstrumental in the successful completion of this project. I would like to show mygreatest appreciation to Mr.Ayoub Ali, Mr.Ghassen Telmoudi and Ms.Ons Mribah. Ifeel motivated and encouraged every time I attend my internship. The guidance andsupport received from them was vital for the success of my work. I am grateful for theirconstant support and help. I would like also to thank Ms. Chiraz Ben Abdelkader andMr.Sabri Mtibaa for their valuable guidance and advice.

I would also like to express my gratitude to the jury members for the honor they'vegranted me to examine and evaluate this modest contribution, and all of my professors atthe National School of Computer Sciences for the schooling and training they have givenme and hopefully that this work will meet up to their standards.

I

Page 4: Graduation Project Report

Abstract

The main goal of this project is to provide a user interface tools to the Rosa� IaaSplatform, that would allow both end users and cloud providers to control various cloudresources, such as virtual machines, storage repositories, VLANs, etc. To this end, wedeveloped two types of applications: a command line interface and a web-based interface,in order to satisfy the needs of users with di�erent levels of IT expertise. Both applicationsare implemented based on the Rosa� Cloud API.

Keywords: Cloud, IaaS, CLI, Webapps, API, Virtualisation

Résumé

L'objectif de notre projet est de concevoir et de développer des outils qui vont êtreservi comme une interface utilisateur pour la plateforme IaaS de la société Rosa� Holding.Ces interfaces permettront aux di�érents utilisateurs, à savoir simple utilisateur ou unfournisseur de service Cloud, de gérer l'ensemble de ressources fournit par la plateformetel que les machines virtuels, les espaces de stockage virtuels, les réseaux locaux virtuels,etc. A cette �n, nous avons implémenté deux types d'interfaces : une interface de lignede commande et une application web, pour satisfaire les besoins des utilisateurs avec desniveaux di�érents en connaissance du domaine informatique. Les deux applications sontimplémentées à la base de l'API du Rosa� Cloud.

Mots-clés : Nuage informatique, Cloud, IaaS, CLI, Application web, API, Virtualisa-tion

II

Page 5: Graduation Project Report

CONTENTS

Dedication 1

Acknowledgments I

Introduction 1

1 General Context 31.1 Presentation of the host company . . . . . . . . . . . . . . . . . . . . . . . 31.2 Context of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.3 Expected Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Prelimenary Study 52.1 Cloud Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 Assessment of existing IaaS services management tools . . . . . . . . . . . 102.2.1 Amazon Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 OnApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.3 Rackspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.4 Solutions criticism . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Requirements analysis and speci�cation 163.1 Identifying actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2 Informal requirements speci�cation . . . . . . . . . . . . . . . . . . . . . . 16

3.2.1 Functional requirements . . . . . . . . . . . . . . . . . . . . . . . . 173.2.2 Non Functional requirements . . . . . . . . . . . . . . . . . . . . . 19

3.3 Semi-formal requirements speci�cation . . . . . . . . . . . . . . . . . . . . 203.3.1 Uses Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3.2 Detailed Cloud Admin Provider Use Case Diagrams . . . . . . . . . 23

III

Page 6: Graduation Project Report

3.4 General Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.4.1 Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . 263.4.2 Web User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 Design 294.1 Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.1.1 General architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 294.1.2 Package Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.1.3 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.1.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.2 Web user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.2.1 General architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2.2 Deployement Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 354.2.3 Class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.2.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5 Achievement 41

Achievement 415.1 Workspace Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.1.1 Hardware Environment . . . . . . . . . . . . . . . . . . . . . . . . . 415.1.2 Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.2 Overview of the achieved work . . . . . . . . . . . . . . . . . . . . . . . . . 445.2.1 Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . 445.2.2 Web User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.3 Project Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

General Conclusion 55

Glossary 56

Bibliography 58

Netography 59

IV

Page 7: Graduation Project Report

LIST OF TABLES

2.1 CLI comparison table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

V

Page 8: Graduation Project Report

LIST OF FIGURES

2.1 Storage Virtulization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Network Virtulization [N16] . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Cloud Service models [N15] . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4 AWS web user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5 OnApp web user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.6 Rackspace web user interface . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.1 General use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2 Manage virtual machine detailed use case . . . . . . . . . . . . . . . . . . . 223.3 Physical resource use case diagram . . . . . . . . . . . . . . . . . . . . . . 233.4 Resource Type use case diagram . . . . . . . . . . . . . . . . . . . . . . . . 243.5 Manage PDU use case diagram . . . . . . . . . . . . . . . . . . . . . . . . 253.6 Manage server use case diagram . . . . . . . . . . . . . . . . . . . . . . . . 263.7 General sequence diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.8 Web user sequence diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1 Command Line Interface architecture . . . . . . . . . . . . . . . . . . . . . 304.2 CLI package diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.3 Class diagram of the API Service package . . . . . . . . . . . . . . . . . . 314.4 Class diagram of the API Exception package . . . . . . . . . . . . . . . . . 324.5 Class diagram of the Data Factory package . . . . . . . . . . . . . . . . . . 334.6 Sequence diagram of list virtual machines scenario . . . . . . . . . . . . . . 344.7 Web User Interface architecture . . . . . . . . . . . . . . . . . . . . . . . . 354.8 Deployement diagram of the web user interface . . . . . . . . . . . . . . . . 364.9 The MVC architecture of the application's front-end . . . . . . . . . . . . . 374.10 Class diagram of the application's front-end . . . . . . . . . . . . . . . . . 384.11 Class diagram of the application's front-end . . . . . . . . . . . . . . . . . 394.12 Sequence diagram of check datacenter page scenario . . . . . . . . . . . . . 40

5.1 Display text output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445.2 Display tabular output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.3 Search for a cluster with kvm hypervisor . . . . . . . . . . . . . . . . . . . 45

VI

Page 9: Graduation Project Report

5.4 Update of datacenter info . . . . . . . . . . . . . . . . . . . . . . . . . . . 465.5 Display CLI help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465.6 CLI displays internal server error . . . . . . . . . . . . . . . . . . . . . . . 475.7 Auto-complete the list of available resource . . . . . . . . . . . . . . . . . . 475.8 Auto-complete the list of owned zones . . . . . . . . . . . . . . . . . . . . 475.9 Virtual resource page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.10 Cluster dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.11 Edit cluster name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.12 Delete datacenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.13 Add new datacenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.14 Virtual machines table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515.15 Manage virtual machines state . . . . . . . . . . . . . . . . . . . . . . . . . 515.16 Add new virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . . 525.17 Manage the cloud provider customers . . . . . . . . . . . . . . . . . . . . . 525.18 Manage the cloud provider customers . . . . . . . . . . . . . . . . . . . . . 535.19 Project time-line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

VII

Page 10: Graduation Project Report

INTRODUCTION

Cloud computing is one of the most trendy concept. It entails the convergence of Gridand cluster computing, virtualization, Web services and Service Oriented Architecture(SOA). It o�ers the potential to set IT free from the costs and complexity of itstypical physical infrastructure, allowing concepts such as Utility Computing to becomemeaningful. The term covers an entire stack from infrastructure through storage,platforms, and applications such as Dropbox, Google Appengine, Gmail, etc.

The importance of having a cloud computing strategy is becoming more obvious on adaily basis, as it moves from an interesting IT concept to a must have technology for a lotof companies. Using Cloud Computing in business has achieved a big success in savingcost, complexity and time in the IT world.

The architecture of cloud services is based on a dynamic approach that is scalableand request-driven. It allows ICT to be delivered over the internet and be consumed asa service, on demand, across a wide range of devices. Consumers and businesses can usethe cloud to store data and applications, and can interact with the cloud using mobiles,desktop computers, laptops. . . from anywhere and at any time through a variety of toolssuch as Gmail Android application, Google Drive Desktop application, etc.

It is within this context that our graduation project has been conducted at Rosa�Holding, a Dutch company specialized in cloud computing solutions.

The project consists in the implementation of a User Interface tools to be served asan abstraction layer to Rosa� cloud API. Our workload is composed of three main parts.First, we will need to provide a detailed description about possible features after studyingthe existing cloud service management tools provided by other cloud provider. Then, wewill deal with the implementation of the solution following the design proposed by Rosa�User Experience Designer. Finally, we will have to test the tools to check that it meetsthe initially �xed requirements.

1

Page 11: Graduation Project Report

In the �rst chapter, we will introduce the host company and go through its mainhighlights, then we will present the project overview. Throughout the second chapter,we will explain some important concepts in the cloud computing in order to be able tounderstand the following chapters, then we will assess the current existing tools providedby other cloud provider. At the end we will specify the main features that will beimplemented. The third and the fourth chapters will explain respectively the architectureand the implementation of the cloud service management tools. Finally we will concludewith the future prospects of the project and some possible improvements which could bemade in the future.

Graduation Project Report 2 2013 - 2014

Page 12: Graduation Project Report

CHAPTER 1

GENERAL CONTEXT

This chapter will introduce the general context of our work. We will present the hostcompany and then we will describe the goal of our work, and the expected results.

1.1 Presentation of the host company

Rosa� Holding is a Dutch software development company established in Tunisia sincethe beginning of 2012. Originally a hosting provider which became specialized in Cloudhosting, it develops software solutions for worldwide clients based on the latest opensource solutions. Currently, it is involved in developing a Cloud IaaS-solution.

The �rm considers its software engineers a key factor in o�ering high-quality servicesto its customers and adding real value to their businesses. Its experienced team deliverscost e�ective software solutions based on advanced technical skills, IT expertise and astrong commitment to quality.

Rosa� has acquired software development expertise in di�erent �elds such Cloudcomputing, licensing systems, billing integration and project management systems.

1.2 Context of the project

In this section, we will, �rst, present the context of our internship, then we will describebrie�y our problem and �nally we will conclude with the expected results.

1.2.1 Scope

This project is a graduation requirement for obtaining the engineering diploma at theNational School of Computer Science. It involves doing an internship at a company withinthe last four to six months prior to graduation. Our internship was conducted at Rosa�from February 3, 2014 to May 31, 2014.

3

Page 13: Graduation Project Report

Chapter 1. General Context

1.2.2 Problem description

As a company specialized in cloud computing solution, Rosa� is currently involvedin developing an IaaS (Infrastructure as a Service). To this end, the company needs toprovide a set of management tools that allow its customers to bene�ts from the IaaSPlatform services consistently.

These tools have to meet the di�erent needs of its customers. On the one side, clientswith IT background, particularly system administrator, prefer more command line toolsand character-based environment. Console based applications allow them to accomplishtasks more quickly and easily than the GUI, it saves them a lot of time avoiding mousemoving and buttons clicking. Also, one of the most important bene�ts of a commandline tool, for system administrator, is scriptability. Users can automate tasks throughscripts to remove some of the administrative overhead burden. On the other hand, clientswithout IT background are more comfortable with graphical user interfaces, because it'seasier to understand and it abstracts the complexity of the performed tasks.

1.2.3 Expected Result

Our goal is to implement a user interface that will allow Rosa�'s customers,particularly users of its IaaS platform, to manage a various cloud resources. This interfacewill consist of two applications: a command line interface and a web-based graphicalinterface.

Conclusion

In this chapter we tried to present the hosting company and the context of the project.The next chapter will be devoted for the theoretical study and a comparison between thecurrent solutions.

Graduation Project Report 4 2013 - 2014

Page 14: Graduation Project Report

CHAPTER 2

PRELIMENARY STUDY

In this chapter, we will cover the history of cloud computing, providing somebackground on how it came to be and the problems it aims to solve. Then we will presentsome existing tools provided by major IaaS vendors. Finally we will list the features thatwe will implement in CLI and the WUI.

2.1 Cloud Computing

2.1.1 Background

2.1.1.1 History

Cloud computing found its origin in the success of server virtualization and thepotential to run IT more e�ciently through server consolidation. Visionaries came upwith idea to bring virtualization to a next level by implementing early storage and networkvirtualization techniques that could be applied systematically across all the machines ina single data center.

Add to this self-provisioning, service oriented architecture, and auto scaling is at theforefront of how cloud computing becomes a reality.

In fact, Cloud computing is the newest name for what has been around since the mid-nineties as �on-demand infrastructure.� In 1995, cloud's concept starts with �Shared WebHosting� and had limited features such as multi-tenancy, friendly interface and automatedprovisioning. Both managed and unmanaged Dedicated Hosting had been brought in1997. This type of automated computing had dedicated servers with promises of fulladministrative access. In 1998 VPS Hosting became available, this web hosting improvedby having partial infrastructure demand and resource size �exibility. In the 2000s, itappears in the form of Grid/Utility Computing and had full infrastructure demand, multi-tenancy, automated provisioning and partial resource size �exibility. From 2012 till today,

5

Page 15: Graduation Project Report

Chapter 2. Prelimenary Study

at the convergence of all the technologies mentioned previously, the Cloud computing iso�ering services that are truer to the de�nition of cloud and its requirement.

2.1.1.2 Virtualization

One of the fundamental technologies on which Cloud Computing is based, isvirtualization. Based on RedHat de�nition[N6], �Virtualization allows multiple operatingsystem instances to run concurrently on a single computer; it is a means of separatinghardware from a single operating system. Each guest OS is managed by a Virtual MachineMonitor (VMM), also known as a hypervisor. Because the virtualization system sitsbetween the guest and the hardware, it can control the guests' use of CPU, memory,and storage, even allowing a guest OS to migrate from one machine to another.� Thistechnique allows users to create a `virtual computer', with speci�ed applications, softwareand operating machines. We can distinguish many kind of virtualization citing exampleof:

� Storage virtualization which is the amalgamation of multiple network storagedevices into what appears to be a single storage unit. The �gure 2.1 presents anillustration of storage vitulization.

Figure 2.1: Storage Virtulization

� Server virtualization which is a software based virtualization allows for commod-ity hardware and systems. It consists on the partitioning of a physical server intosmaller virtual servers.

� Network virtualization consists on using network resources through a logicalsegmentation of a single physical network. It allows segmentation and isolation ofnetwork entities as shown is the �gure 2.2.

Graduation Project Report 6 2013 - 2014

Page 16: Graduation Project Report

Chapter 2. Prelimenary Study

Figure 2.2: Network Virtulization [N16]

Virtualization means that users don't need to worry about what software is beingrun where. This is especially important with clouds, as they won't often know on whichmachines their data or work will be running.

Virtualization has many bene�ts. It runs multiple operating systems and applicationson a single physical resource and consolidate hardware to get vastly higher productivityfrom fewer servers. It allows greater utilization of every server and reduces in the hardwarerequirements. Virtulization a�ords high availability and saves for companies more than50 percent on overall IT costs.

2.1.1.3 Service Oriented Architecture (SOA)

Based on the Organization for the Advancement of Structured Information Standards(OASIS) the SOA architecture is "A paradigm for organizing and utilizing distributedcapabilities that may be under the control of di�erent ownership domains. It providesa uniform means to o�er, discover, interact with and use capabilities to produce desirede�ects consistent with measurable preconditions and expectations." [N14]

In simpler way, Service Oriented Architecture is an architectural methodology. It is amanner of specifying separation of responsibility from a business oriented point of viewinto independent services, which communicate by a common API. This architecture canoperate independently of speci�c technologies and can be implemented using a wide rangeof technologies, including REST, SOAP, CORBA, etc.

2.1.2 Overview

2.1.2.1 De�nition

The National Institute of Standards and Technology (NIST) de�nes the cloudcomputing �a model for enabling convenient, on-demand network access to a shared pool

Graduation Project Report 7 2013 - 2014

Page 17: Graduation Project Report

Chapter 2. Prelimenary Study

of con�gurable computing resources (e.g., networks, servers, storage, applications, andservices) that can be rapidly provisioned and released with minimal management e�ortor service provider interaction. This cloud model promotes availability and is composedof �ve essential characteristics (On-demand self-service, Broad network access, Resourcepooling, Rapid elasticity, Measured Service); three service models (Cloud Software as aService (SaaS), Cloud Platform as a Service (PaaS), Cloud Infrastructure as a Service(IaaS)); and, four deployment models (Private cloud, Community cloud, Public cloud,Hybrid cloud).�[N4]

Basically, as explained in the background section, Cloud Computing is a collection ofVirtualization Technique, SOA, Autonomic and Utility Computing. Its main concept is todeliver virtual servers with a speci�c con�guration details with speci�c operating system,applications and services. The physical location of cores (Processors or computationpower), software, data access and storage space is immaterial to the users.

2.1.2.2 Types of cloud computing

The cloud isn't a technology. It's an approach to building IT services and there areseveral di�erent deployment models for implementing cloud computing services. The fourprimary types of cloud models are:

� Public Cloud : Public clouds are made available to the general public by a serviceprovider who hosts the cloud infrastructure. Generally, public cloud providers likeAmazon AWS and Google own and operate the infrastructure and o�er access overthe Internet. With this model, customers have no visibility or control over where theinfrastructure is located. It is important to note that all customers on public cloudsshare the same infrastructure pool with limited con�guration, security protectionsand availability variances.

Public cloud infrastructures are typically larger in scale than an in-house enterprisecloud, which provides clients with seamless, on-demand scalability. These cloudso�er the greatest level of e�ciency in shared resources; however, they are also morevulnerable than private clouds.

� Private Cloud : Private cloud is cloud infrastructure dedicated to a particularorganization. Private clouds allow businesses to host applications in the cloud,while addressing concerns regarding data security and control, which is often lackingin a public cloud environment. It is not shared with other organizations, whethermanaged internally or by a third-party, and it can be hosted internally or externally.Private clouds are more expensive but also o�er the greatest level of security andcontrol when compared to public clouds.

� Community Cloud : A community cloud is a is a multi-tenant cloud service modelthat is shared among several or organizations and that is governed, managed andsecured commonly by all the participating organizations or a third party managedservice provider. Its a hybrid form of private clouds built and operated speci�cally

Graduation Project Report 8 2013 - 2014

Page 18: Graduation Project Report

Chapter 2. Prelimenary Study

for a targeted group. These communities have similar cloud requirements and theirultimate goal is to work together to achieve their business objectives.

� Hybrid Cloud : Hybrid Clouds are a composition of two or more clouds (private,community or public) that remain unique entities but are bound together o�eringthe advantages of multiple deployment models. In a hybrid cloud, you can leveragethird party cloud providers in either a full or partial manner; increasing the �exibilityof computing. Augmenting a traditional private cloud with the resources of a publiccloud can be used to manage any unexpected surges in workload.

2.1.2.3 Cloud Service models

Cloud Computing as general term sits over a variety of services from Infrastructure asa Service at the base, through Platform as a Service as a development tool and throughto Software as a Service replacing on-premise applications. The picture below shows thedistinct levels of cloud service.

Figure 2.3: Cloud Service models [N15]

� Software as a Service (SaaS) : SaaS is the highest level as shown in the �gure2.3. At this level, the capability provided to the consumer is to use the provider'sapplications running on a cloud infrastructure. This applications cloud be accessiblefrom various client devices through either a lightweight client interface, such as aweb browser (e.g., Gmail), or a program interface. The consumer does not manageor control the underlying cloud infrastructure including operating systems, servers,network and storage, with the possible exception of limited user-speci�c applicationcon�guration settings.

� Infrastructure as a Service (IaaS) : On the opposite end of the spectrum inthe �gure 2.3, we have the IaaS. At this service level, the resources provided to

Graduation Project Report 9 2013 - 2014

Page 19: Graduation Project Report

Chapter 2. Prelimenary Study

the consumer are networks, storage, provision processing and other fundamentalcomputing resources where the consumer could be able to deploy and run itssoftware. It can include operating systems and applications. The consumer doesn'tmanage the cloud infrastructure but he has the control over storages, operatingsystems, deployed software and possibly a limited control in selecting networkingcomponents (e.g., host �rewalls).

� Platform as a Service (PaaS) : In the middle of the spectrum, we have thePaaS. At this service level, the capability provided to the consumer is to deployonto the cloud infrastructure consumer-created or acquired applications createdusing services, programming languages, libraries and a set of tools supported bythe provider. The consumer has no control on the cloud infrastructure includingoperating systems, servers, network and storage, but he has control over thedeployed applications and possible con�guration settings for the application-hostingenvironment.

2.2 Assessment of existing IaaS services management

tools

Now, we will go through existing CLI and web user interface provided by Amazon,OnApp and Rackspace three of the most well-known Cloud IaaS provider. This willgive us a good overview on the existing solutions and thus we can de�ne later our tools'requirements.

2.2.1 Amazon Web Service

Currently, the most popular cloud computing platform is Amazon Web Services(AWS). It was the �rst major player in cloud computing, and it has maintained its clearleadership position through years.

2.2.1.1 Command Line Interface

The AWS Command Line Interface (CLI) is a uni�ed tool to manage the AWS services.It's just one tool to download and con�gure, then you can control multiple AWS servicesfrom the command line and automate them through scripts.

AWS CLI provides many features such as:� Command Completion: it supports command completion feature via <tab> but it'snot automatically installed it have to be manually con�gured.

� Accessing Services with global endpoints: If user doesn't explicitly supply a regionthe aws-cli will automatically use the global endpoint.

� Command Help Feature

Graduation Project Report 10 2013 - 2014

Page 20: Graduation Project Report

Chapter 2. Prelimenary Study

� Support JSON as parameter values: JSON is used to specify a complex commandline parameter.

� Di�erent Output Formats: the user can choose between 3 di�erent output formatsTab-delimited text (text), ASCII-formatted table (table) and json.

� Filters for the output results� Management actions for all the available resources� Manage Rules and Security Group

2.2.1.2 Web User Interface

The amazon web user interface, shown in the �gure 2.4, uni�es all AWS services inone web page, so users can navigate through the di�erent services easily. The picturebelow shows the Amazon Elastic Compute Cloud (EC2) dashboard. EC2 is a web servicethat o�ers resizable cloud hosting services. Through this dashboard users can create,delete, and update virtual machines. When user selects an existing virtual machine,its information appears in the bottom of the page under the list of the created virtualmachines.

Figure 2.4: AWS web user interface

2.2.2 OnApp

2.2.2.1 Command Line Interface

As the majority of the IaaS providers OnApp providers its customers with a commandline interface that perform the following action:

� Command Completion: it supports command completion feature.� Command Help Feature: Help text for all commands and sub-commands.

Graduation Project Report 11 2013 - 2014

Page 21: Graduation Project Report

Chapter 2. Prelimenary Study

� Management of Virtual machines� Result caching: The CLI will make copy of the VM list in �le.

2.2.2.2 Web User Interface

OnApp Web User Interface is a web-based application that o�ers customers access toservices provided by OnApp Cloud Platform. The �gure 2.5 shows a creation of virtualmachine via OnApp WUI. In order to create a virtual machine, the user has to click on�Virtual Servers� menu, in the left navigation panel, to list the existing virtual machines.Then he click an �Add� button on the top right of virtual machines table, to navigate toanother web page where he will �ll a form with the suitable information to create newvirtual machine. Once the instance is created, user have to click on �Virtual Servers�menu to list again all the virtual machines.

Figure 2.5: OnApp web user interface

2.2.3 Rackspace

Rackspace is one of the global leaders in hybrid cloud and founder of OpenStack, theopen-source operating system for the cloud.

2.2.3.1 Command Line Interface

Like OnApp, Rackspace command line interfaces provided the basic needed function-alities which are the management actions for all the resources provided by its cloud inaddition to command completion features and command help.

Graduation Project Report 12 2013 - 2014

Page 22: Graduation Project Report

Chapter 2. Prelimenary Study

2.2.3.2 Web User Interface

The Rackspace Web User Interface is almost used in the same way as OnApp WUI.The main di�erence is on the graphics design.

Figure 2.6: Rackspace web user interface

2.2.4 Solutions criticism

2.2.4.1 Command Line interface

After enumerating the di�erent features of the existing Command Line Interfaces, wewill de�ne our command line interface features based on the comparison made in table 2.1.

In order to have an e�ective and competitor product we have to implement most ofexisting feature such as:

� Auto-completion� Di�erent output formats� Instantly displayed response� Search �ltering� Colored output� Command help� Result Caching

Features not implemented may be considered for future releases.

Graduation Project Report 13 2013 - 2014

Page 23: Graduation Project Report

Chapter 2. Prelimenary Study

Table 2.1: CLI comparison table

2.2.4.2 Web User interface

Web user interface doesn't have special feature as it is required by the consoleenvironment, the criticism of the solutions will be based mainly on graphics ergonomicand user experience design.

If we consider, WUI of Rackspace and OnApp, both provided an attractive graphicsdesign and it's easy to understand its sitemaps but it lacks of user experience design.When users ask for information about speci�c resource, he has to navigate to anotherweb page where information will be displayed. But when user want to switch to a secondresource to display its information, he has to list again all the resource then choose thedesired one which is not very comfortable for users. If we consider AWS WUI, it's moreimproved than Rackspace and OnApp web user interfaces in term of usability, since usercan display resource information in the same page as the list of resource, and he has justto change the selected resource to display the new information without being obliged tonavigate to another page. But the AWS web user interface still can be improved from userexperience design point of view, citing the example of virtual machine resource. Whena user selected a speci�c virtual machine, the information displayed is only about thevirtual machine and not about its attached resource such as storage volume or imagesnapshots. The user has to navigate to other page to look for such information which isnot so ergonomic. In order to implement a more ergonomic solution with a better userexperience, we will try to minimize the navigation between the web pages by displaying

Graduation Project Report 14 2013 - 2014

Page 24: Graduation Project Report

Chapter 2. Prelimenary Study

all relevant information about speci�c resource in the same page as the resources list andthe form will be displayed in a popups instead of being displayed in new pages.

Conclusion

Throughout this chapter, as �rst step, we explained some concepts related to cloudcomputing �eld, to better understand how cloud works and how our project will interactwith the cloud API. And in second step, we set forth some of the existing solutions.Based on the solutions criticism made by the end of this chapter, we will be able to listour project requirements: which is the subject of the next chapter.

Graduation Project Report 15 2013 - 2014

Page 25: Graduation Project Report

CHAPTER 3

REQUIREMENTS ANALYSIS AND

SPECIFICATION

This phase is strongly bound to the preliminary study led previously. After havingprovided some cloud computing basics necessary for understanding our project andafter assessing the existing solution provided by other IaaS provider, we will de�ne inthis chapter our project speci�cation. At �rst, we are going to identify our actors'characteristics. Then we will present the functional and non-functional requirements ofthe project. At the end, we will conclude this chapter with use cases and general sequencediagrams.

3.1 Identifying actors

Based on the kind of services and permissions o�ered to users, we can identify twopotential users: Cloud admin provider and Cloud service end-user. The former is acustomer who o�ers cloud services to the �Cloud service end-users�. he can manage a setof Cloud resources such as zones , cluster, etc. He acts as if he is a real cloud infrastructureowner. While the the end-user is the one who will use the cloud components provided bya Cloud Provider. Mainly this kind of users can only manage (list, update, reboot...) avirtual machine(s).

3.2 Informal requirements speci�cation

The Command Line Interface and the web user interface will implement the samefunctionalities which are the services provided by the Rosa� Cloud Platform. Here arethe common needs:

16

Page 26: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

3.2.1 Functional requirements

3.2.1.1 Cloud service end-user

The application should allow an end-user to:

1. List his virtual machines

2. Create virtual machine

3. Manage his Virtual Machine state:

(a) Start his virtual machine

(b) Stop his virtual machine

(c) Reboot his virtual machine

(d) Suspend his virtual machine

(e) Resume his virtual machine

4. Reset root password for his virtual machine(s)

5. Assign one or many of his virtual machines to a VLAN

6. Assign Public IP to one or many of his Virtual machines

7. Release Public IP from one or many of his Virtual machines

8. Visualize details of a virtual machine

9. Update the name of a virtual machine

10. Manage snapshots

11. Manage Volumes:

(a) Add a volume

(b) Update a volume

(c) Delete a volume

(d) List volumes

(e) Visualize details of a volume

(f) Attach a volume to a virtual machine

(g) Detach a volume from a virtual machine.

3.2.1.2 Cloud admin provider

The application should allow a Cloud Provider to:

1. Manage Physical resourcesA physical resource designates a data center, a server room, a rack, network grid,power grid, server, network switch, PDU, and SAN.In order to manage his physical resources, a Cloud Provider should be able to:

(a) Add a physical resource

(b) Update a physical resource

(c) Delete a physical resource

Graduation Project Report 17 2013 - 2014

Page 27: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

(d) Visualize details about a physical resource

(e) List physical resources

2. Manage Virtualized ResourcesRosa� Cloud Platform provides many virtual resources such as : a Cloud, a Zone, aCluster, a Host and VLANs. In order to manage virtual resources, a Cloud Providershould be able to:

(a) Add a virtual resource

(b) Update a virtual resource

(c) Delete a virtual resource

(d) Visualize details about a virtual resource

(e) List virtual resources

3. Manage Virtual MachinesTo manage virtual machines, a Cloud Provider should be able to:

(a) List his virtual machines

(b) Create virtual machine

(c) Manage his Virtual Machine state:� Start his virtual machine� Stop his virtual machine� Reboot his virtual machine� Suspend his virtual machine� Resume his virtual machine

(d) Reset root password for his virtual machine(s)

(e) Assign one or many of his virtual machines to a VLAN

(f) Assign Public IP to one or many of his Virtual machines

(g) Release Public IP from one or many of his Virtual machines

(h) Visualize details of a virtual machine

(i) Update the name of a virtual machine

(j) Manage snapshots

(k) Manage Volumes:� Add a volume� Update a volume� Delete a volume� List volumes� Visualize details of a volume� Attach a volume to a virtual machine� Detach a volume from a virtual machine.

4. Manage StorageWe distinguish two type of storage volume and storage repository. The latter is alogical disk space made available through a �le system on top of physical storagehardware while the former it's a reserved space within a storage repository.To manage Storage resources, a Cloud Provider should be able to :

Graduation Project Report 18 2013 - 2014

Page 28: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

(a) Manage Storage Repositories:� Add a storage repository� Update a storage repository� Delete a storage repository� List storage repositories� Visualize details of a storage repository

(b) Manage Volumes:� Add a volume� Update a volume� Delete a volume� List volumes� Visualize details of a volume

5. Manage O�eringsAn o�ering can be: a virtual machine o�ering, a Storage o�ering or a networko�ering. Each o�ering de�ne the resource of its associated characteristics (size,model,etc)To manage resources' o�erings, a Cloud Provider should be able to :

(a) Add an o�ering

(b) Update an o�ering

(c) Delete an o�ering

(d) List o�erings

6. Manage servers' types, network switch types and PDU typesTo manage resources' types, a Cloud Provider should be able to :

(a) Add a Server types, Network Switch types or PDU types.

(b) Update a Server types, Network Switch types or PDU types.

(c) Delete a Server types, Network Switch types or PDU types.

(d) List a Server types, Network Switch types or PDU types.

3.2.2 Non Functional requirements

The solution must achieve these quality factors:

� Expandability and Maintainability The expandability of software plays animportant role in the software's survival on market and is able to lengthen software'slifespan. It is important that the upgrades are easy to install and that the sourcecode is well documented because it is not guaranteed that the developer of thesoftware is also the same person that carries out the upgrades.

� Reliability The system has to operate at all times as expected. It is of highimportance that the system does not crash. When an error occurs, then the systemmust realize this and give the user an appropriate error message, then return tonormal operating conditions and wait for a new command.

Graduation Project Report 19 2013 - 2014

Page 29: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

� Usability The arguments and options used in command line interface must be easyto remember, signi�cant and expectable.

� Performance The communication between the user interfaces and the cloud APImust be transparent. The client's query shall be processed in less than one second.

� User friendliness The web user interface should allow users to e�ectively ande�ciently manage its resources and makes them feel comfortable while using theinterface.

3.3 Semi-formal requirements speci�cation

3.3.1 Uses Case Diagram

In general, the aim of presenting a use case diagram is to structure user needs andthe related objectives of the system. We start with presenting the general use case of ourproject then we will detail and re�ne some principal use cases.

3.3.1.1 General Use Case Diagram

In the �gure 3.1, we represent the main use cases of our project. A cloud serviceend-user should be able to manage his virtual machines. An end-user client should bealso able to manage the VLANs and volumes relatively to its virtual machines. A CloudProvider, in addition to the services o�ered to the end-user client, should be able managethe other IaaS components such as physical resources, virtual resource and some resourcetypes. The Cloud Provider should be also able the mange the list of o�ering. The o�eringsde�ne the users' permissions and its license limits.

Graduation Project Report 20 2013 - 2014

Page 30: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.1: General use case diagram

In order to explain in more details some of the cloud end-users possible activities, weare going to details the mange machine use case in the diagram use case in the �gure 3.2.

Graduation Project Report 21 2013 - 2014

Page 31: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.2: Manage virtual machine detailed use case

The main service o�ered by the IaaS platform to an end-user client, is to manage aset of virtual machines. The maximum number of virtual machines created depends onthe permission given to the user upon his registration. The client should be able to createa new virtual machine if he did not reach yet his license limits. He should be also ableto list his existing virtual machines and deleting it. Also, he should be able to updateits information and changing its password. The client should also be able to managethe virtual machine state (Halted, Running, and Suspended). For security purpose, theclient should be also to create snapshots to save an image of a current state of his virtualmachine that could be served later as a backup image.

In addition to managing his virtual machines, the cloud service end-user can add newvolumes and VLANs that could be attached and detached from his VMs depending onhis needs and his license limits. While, this resource could be detached from the virtual

Graduation Project Report 22 2013 - 2014

Page 32: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

machines, managing VLANs and volumes are considered as two independent use casesfrom managing virtual machine use case as it shows the general use case �gure.

3.3.2 Detailed Cloud Admin Provider Use Case Diagrams

3.3.2.1 Manage Physical resource Use Case Diagram

As it shows the �gure 3.3, the Cloud Service Provider should have the ability to managethe cloud's physical resources, citing the example of Datacenters, Servers and PDUs, etc.

Figure 3.3: Physical resource use case diagram

3.3.2.2 Manage Resource Types Use Case Diagram

Some of the cloud components have di�erent types. The types of each resource de�neits hardware characteristics such as the models, the number of network ports, the numberof power supply ports, etc. The cloud provider should be able to list, create, delete andupdate each resource types depending on its business strategy and its clients' needs.The �gure 3.4 shows the di�erent resources that a cloud service provider could manageits types.

Graduation Project Report 23 2013 - 2014

Page 33: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.4: Resource Type use case diagram

3.3.2.3 Manage PDU Use Case Diagram

The Power Distribution Unit abbreviated to PDU are an essential element indistributing electric power especially to racks of computers and networking equipment,such as network switch and servers, located within the datacenters. In order to ensuremore e�ciency in resource management, the cloud service provider should be able to list,add, delete . . . its PDUs depending on his needs. The �gure 3.5 shows the di�erentservices provided to a cloud service provider to manage his PDUs.

Graduation Project Report 24 2013 - 2014

Page 34: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.5: Manage PDU use case diagram

3.3.2.4 Manage Server Use Case Diagram

Servers use the same basic architecture as a desktop computer. However, a serverhas an enhanced hardware features that make him able to provide services to many usersover a network with fast network connections and high Input/output throughout. Itshardware reliability and durability are extremely important. As it shows the �gure 3.6,the cloud provider should be able to manage servers by adding new ones or updatingexisting ones. In order to ensure e�ective electricity consumption, cloud provider shouldbe able to connect and disconnect servers from PDUs depending on its needs. To make aserver available through the internet, the cloud provider should be able to connect it to aswitch. The �gure 3.6 illustrates how the cloud provider can manage his servers.

Graduation Project Report 25 2013 - 2014

Page 35: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.6: Manage server use case diagram

3.4 General Sequence Diagram

A general sequence diagram explain how our system works by illustrating theinteraction between the actors and our system.

3.4.1 Command Line Interface

The �gure 3.7 illustrates how an actor can interact with our Command Line Interface.Once the command line interface is installed on his computer, the client can start using itby typing a command on his computer console. If its valid command, the command linesend a HTTP request to Rosa� cloud API. The latter perform the request then send aHTTP response. The CLI receive the HTTP response and process it to retrieve the usefuldata. At the end, the result is displayed on the console screen. If the HTTP response isinvalid, an error message will be displayed. In case of non-authenticated user, he will beable to use the command line interface but he will receive a permission denied message.

Graduation Project Report 26 2013 - 2014

Page 36: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.7: General sequence diagram

3.4.2 Web User Interface

As �rst step, user has to be authenticated to use the web user interface. If he enteredthe right login and password, he can start using the WUI functionalities. The �gure3.8 illustrates how a customer can create a resource via the web user interface. Afterauthentication, the user selects a resource. When he clicks on `create resource' buttonon the resource page, a popup appears in the screen. The client �lls the popup �elds tospecify his resource characteristics. If the popup is �lled correctly, he becomes able tosubmit his request and the WUI send a HTTP request to the cloud API. If the requestsmatch the user permissions, the cloud platform creates the new resource then sends backa HTTP response. At the end the new resource appears in the resource page. If the userhas not the required permissions or an internal system error occurs, an alert message willbe displayed and the form will show up again.

Graduation Project Report 27 2013 - 2014

Page 37: Graduation Project Report

Chapter 3. Requirements analysis and speci�cation

Figure 3.8: Web user sequence diagram

Conclusion

This chapter allowed specifying and formulating the main features and characteristicsof our applications, what helped us to delimit the frame of our work and to get ready tothe next step which is the design phase.

Graduation Project Report 28 2013 - 2014

Page 38: Graduation Project Report

CHAPTER 4

DESIGN

In the previous chapter, we have described how the application works and how di�erentactors interact with it. In this chapter we are going to present the design phase of theproposed solutions. This chapter will be divided into two main sections. The �rst sectionwill be dedicated to present the CLI design and the second one will be dedicated to Web-based application. In each section, we start by presenting the general software architectureto have clearer idea about the �nal product, and then we will take a deeper look at thesoftware components and its dynamic aspect through UML diagrams.

4.1 Command Line Interface

A command line interface (CLI) is a type of human-machine interface that relies solelyon textual input and output. It shows only characters and input is usually performedentirely with a keyboard. The CLI tool bene�ts from an obvious and simple design.Throughout this section, we will identify our CLI software architecture.

4.1.1 General architecture

Because our CLI is only required to have a simple graphic design and HTTP-basedservices, the Client-Server model seems to be the most adequate choice. Client-Servermodel is simply an architectural method of providing information to an end user. It is ageneral description of a networked system where a client program (CLI) initiates contactwith a remote server program (Rosa� cloud API) for a speci�c function or purpose. Theclient exists in the position of the requester for the service provided by the server. The�gure 4.1 illustrates the communication between our CLI and Rosa� cloud API.

29

Page 39: Graduation Project Report

Chapter 4. Design

Figure 4.1: Command Line Interface architecture

4.1.2 Package Diagram

In order to better understand the application structure, and the dependencies amongits elements, we grouped them into packages. The �gure 4.2 shows the package diagramof our CLI. We can distinguish two main packages:

� API package: responsible of the communication with the cloud API.� Data Factory: responsible of managing the input and the output of the CLI.

Figure 4.2: CLI package diagram

Graduation Project Report 30 2013 - 2014

Page 40: Graduation Project Report

Chapter 4. Design

4.1.3 Class Diagram

After presenting the package diagram, we are going to take a deeper look at eachpackage and this by presenting the several classes composing it through UML ClassDiagram.

4.1.3.1 API package

This package is responsible of the communication with the cloud API. It is composedof two packages API Service and API Exception. API Service package, as it shows the�gure 4.3, is composed of two singleton classes:

� CloudAPIClient: The role of this class is to send requests to API and receive itsresponse. This class communicates directly with the API. The private methodsgeturl, getcustomcommand and request are used to establish communicationbetween CLI and the cloud API. The rest of method are used to perform the clientrequest.

� CliAPIService: This class is behaving as an abstraction layer between the otherproject packages and the cloud API. It's responsible of con�guring the requestsrelatively to the CLI inputs. It con�gures its attribute 'api' instantiated from theCloudAPIClient class with the right cloud settings such as the cloud uuid, usertoken. . . through the method 'setServiceSettings'. The other methods are usedto respond the client query. Each method calls the appropriate method of the apiattribute, based on the client request.

Figure 4.3: Class diagram of the API Service package

Graduation Project Report 31 2013 - 2014

Page 41: Graduation Project Report

Chapter 4. Design

The second package �API Exception�, as it shows the �gure 4.4, contains set ofclasses that inherit from a built-in class exception. Each class overrides the defaultbuilt-in class behavior to make the exception output more speci�c and more human-readable.

Figure 4.4: Class diagram of the API Exception package

4.1.3.2 Data Factory

As its name refers, this package contains the classes that handle all the application'sdata. It represents the core of our application. Below is a description of each classshown in the �gure 4.5:

� ArgParser: This class is the command line parser. Its main role is to de�ne thestructure of CLI input (e.g. command sub-command common-arguments [ other-arguments ] ). The methods initCrudParser and initCustomParser create thenecessary commands to manage the cloud resources and the method addArgumentadds new arguments to parser given as parameter. ArgParser class handle alsothe CLI auto-completion through its method parserAutocomplete.

� OptionParser: It's main role is to dynamically generate the necessary optionsfor speci�c resource by the optionGenerator method. These options will be servedas the CLI arguments. The arguments generation depends on the type of resourceand action that the user asked for. In order to avoid argument duplicationwhile generation task, the class provides two methods: abbreviationDuplicateand generateOptionAbbreviation. After creating arguments, the OptionParserclass adds the list of arguments to its associated parser.

� DataFormatter: This class provides the methods for manipulating the dataretrieved from the API response before being displayed. Depending on the userquery, the output can be displayed as table using displayTabularData or as textusing displayTextOutput or as json using displayPrettyJson.

Graduation Project Report 32 2013 - 2014

Page 42: Graduation Project Report

Chapter 4. Design

� MsgResponse: This class invokes methods to identify the response status. Ifresponse is not valid, the CLI user will be alerted with the appropriate errormessage.

� CommandLineInterface: This class is our main class. It provides for the usera console based environment to do textual queries. It invokes one method thatcoordinates between all the methods provided by the other classes in order tomake the application operational and meet the user needs.

Figure 4.5: Class diagram of the Data Factory package

4.1.4 Sequence Diagram

In previous section, we have described the di�erent components our CLI applicationand the relationship between the di�erent classes.

In order to better understand how our system operates, a series of sequence diagramswill be presented to illustrate the collaboration of various objects in speci�c scenariosof system application. Figure 4.6 describes the scenario of an end-user who tryingto check the list of his virtual machines in a table format. He starts by typing

Graduation Project Report 33 2013 - 2014

Page 43: Graduation Project Report

Chapter 4. Design

in the shell the appropriate command he can also use the tab completion. Whenhe hits �Enter� button, the main class CommandLineInterface should initialize thecommand line parser through an instance of the ArgParser class and generate theappropriate arguments to requested resource (which in our case a virtual machine).Then the CommandLineInterface Instance should ask the CliAPIService to send arequest to the cloud API. Once the response is received, it should be delivereddirectly to DataFormatter instance where the data will be processed. Beforedisplaying the response in the screen, our application checks the validity of theresponse.

If it is valid, it will be displayed in the screen in the right format otherwise anappropriate error message will be displayed.

Figure 4.6: Sequence diagram of list virtual machines scenario

4.2 Web user interface

In order to satisfy the graphical user interfaces fun and specially the users withoutIT background, developing a web user interface is essential. Throughout this section,we will present our Web User Interface design.

Graduation Project Report 34 2013 - 2014

Page 44: Graduation Project Report

Chapter 4. Design

4.2.1 General architecture

Figure 4.7: Web User Interface architecture

As shown in the �gure 4.7, the web user interface o�ers HTTP-based services.However, unlike the CLI, the web-based application requires a complex graphicaluser interface. Furthermore, the interface must ensure that its appearance re�ectsthe state of the client data. Whenever the data changes, the view that depends onit should be updated. In order to ensure a better experience, we need to separatethe graphical interface complexity from the application logic and the client data.Based on these requirements, the MVC model seems to be the best choice for ourapplication.

4.2.2 Deployement Diagram

A common practice in web application development is to divide the project intoa front-end and backend. As shown in the �gure 4.8, we are going to adoptthis approach. The front-end is the client-side that the application users can seeand interact with, while the backend is the server-side that supports the Front-end service and it's the part responsible for providing the required resources. Thebackend and the front-end can either communicate directly or via an intermediateprogram. In our case the communication will be based on a HTTP requests.

Graduation Project Report 35 2013 - 2014

Page 45: Graduation Project Report

Chapter 4. Design

Figure 4.8: Deployement diagram of the web user interface

As mentioned in section above we are going to apply the MVC pattern in the designof our application. In a typical web application that adopt the MVC conventions,the Front-end will be considered as the view part while the backend handle thecontroller and the model part.

In our case, in order to increase the modularity of our application and the �exibilityin manipulating and presenting the client data, we are going to combine a nestedMVC pattern and MVVM pattern. In the nested MVC pattern the front-end andthe backend will be considered as two separate applications and each one is basedon the MVC pattern. The backend will only be responsible for loading the front-endapplication and then providing it with the necessary data.

MVVM pattern refers to Model-View View-Model which means that the view caninteract with the model directly without any need to the controller intervention andvice versa. This pattern is best known as the two-way data binding technique. The�gure 4.9 shows the architecture of our front-end.

The Model's data is provided by the backend application, and then the applicationcan operate independently of the backend till it needs new data. This architecturedecreases the number of requests sent to the server and speeds up the interactionwith users.

Graduation Project Report 36 2013 - 2014

Page 46: Graduation Project Report

Chapter 4. Design

Figure 4.9: The MVC architecture of the application's front-end

4.2.3 Class diagram

After presenting the components of our application, we are now going to take adeeper look at each one and this by presenting the several classes composing it,through a UML Class Diagram.

4.2.3.1 Front-end

This front-end contains the application web pages. For each web page we willassociate a front-end controller to manage the way the data is handled. The �gure4.10 shows the di�erent classes of the client-side application. The front-end packagecontains the following classes:

� AppModule: This is the main class; it handles all the Front-end part.

� Con�g: This class handles the con�guration part. It de�nes the di�erent statesof the application. A state is association between view, controller and URL. TheCon�g class is where we register states and enable routing from one to another.

� Controller: This class manages the data provided by the Backend package. Forevery web page we associate a controller that inherits from this class.

Graduation Project Report 37 2013 - 2014

Page 47: Graduation Project Report

Chapter 4. Design

� ResourceService: This class is the class responsible of sending requests to thebackend. It's shared service between all the controllers.

Figure 4.10: Class diagram of the application's front-end

4.2.3.2 Backend Package

The main roles of the backend are to load our application and to provide the front-end with the appropriate data. In this way our backend and our front-end logic aretotally separated. The backend contains 3 classes:

� urlDispatcher: This class is responsible for intercepting the browser URLs andmap the front-end request to the appropriate backend method.

� Controller: This class is responsible for processing the data received from theAPI and sending it to the front-end Model.

� CloudAPIClient: This class role is to communicate with the cloud to performthe client's requests.

Graduation Project Report 38 2013 - 2014

Page 48: Graduation Project Report

Chapter 4. Design

Figure 4.11: Class diagram of the application's front-end

4.2.4 Sequence Diagram

The �gure 4.11 presents a scenario of user trying to check the datacenter page. Whenthe user selects data center in the sidebar menu, the AppModule loads the datacenterview and invokes the getDatacenter method of the HardwareCtrl in order to get thenecessary data. The ResourceService object sends a request to the backend. TheUrlDispatcher object intercepts the request and matchs it with the the appropriateController's method. This latter sends a request to Cloud API. Once the responsereceived, the Controller object retrieves the data and sends it back to the front-end. The HardwareCrtl process the received data and broadcast the information to�nalize the view.

Graduation Project Report 39 2013 - 2014

Page 49: Graduation Project Report

Chapter 4. Design

Figure 4.12: Sequence diagram of check datacenter page scenario

Conclusion

In this chapter, we presented the general and detailed design of our solution tofacilitate the transition to implementation phase. In the next chapter, we willpresent the software environment as well as the implemented solution.

Graduation Project Report 40 2013 - 2014

Page 50: Graduation Project Report

CHAPTER 5

ACHIEVEMENT

In this chapter, we will present the work we have done during the project'speriod. We will start by presenting the hardware environment, the platforms, thetechnologies and the software used in the development of our project. Second, wewill show how the CLI and the website looks like from each actor perspective. Thenwe will outline the di�erent stages of our project development through a detailedtimeline.

5.1 Workspace Environment

In this part, we are going to present the di�erent tools and technologies that we useto set up our solution.

5.1.1 Hardware Environment

For the achievement of our project, we have worked on a desktop computer withthe following con�guration:� Operating system: Ubuntu 12.04 LTS� RAM 8.00 Go

5.1.2 Software Environment

5.1.2.1 Development tools

Throughout the development of our application, we used the following software:

� PyCharm: is an Integrated Development Environment (IDE) with completeset of tools for productive development with Python programming language.In addition, the IDE provides high-class capabilities for professional Webdevelopment with Django framework.It o�ers a lot of features such as:

41

Page 51: Graduation Project Report

Chapter 5. Achievement

� Coding assistance and analysis, with code completion, syntax and errorhighlighting and quick �xes.

� Project and code navigation: specialized project views, �le structure views andquick jumping between �les, classes, methods and usages

� Python refactoring: including rename, extract method, introduce variable,introduce constant, pull up, push down and others

� Django web development tools� Integrated Python Debugger� Integrated Unit Testing� Google App Engine Python Development� Version Control Integration: uni�ed user interface for Mercurial, Git, etc.� Perforce and CVS with change lists and merge.

� Chrome web developer's tool: the developer tool, bundled and available inChrome, allows web developers and programmers deep access into the internalsof the browser and their web application. The developer tools are heavily basedon the WebKit Web Inspector, a part of the open source WebKit project. Wemainly use it in manipulating the JavaScript Scripts' log and tracking the HTTPrequests.

5.1.2.2 Technological choices

In this part, we will be presenting the di�erent frameworks and programminglanguages used during the implementation of each application.

5.1.2.2.1 Command Line Interface Which programming language to use fora project is one of the most major decisions a programmer will make during theentire development process.

As our CLI is lightweight application, our main matter concerns the production ofan e�cient and portable code that is also easy to maintain. Python seems to bethe best choice. Python is, high-level programming language, available on a widerange of platforms, readable and has consistent syntax that is easy to write and tomaintain. Python can be used for any programming task, from scripting to GUIprogramming and web programming. It's quite e�cient, as much of its activity isdone at the C level. Python is just a layer on top of C. It scales well for largeapps and has an excellent support for operating system functions, networking and�le systems. Also, Python supports multiple programming paradigms, includingobject-oriented and functional programming.

5.1.2.2.2 Web User Interface Web developers are now abandoning the old-fashioned ways of building websites in favor of making use of frameworks thatactually bring structure and form to web development. Web frameworks have greatimportance in a Web developer's life and choosing the right one is crucial to the

Graduation Project Report 42 2013 - 2014

Page 52: Graduation Project Report

Chapter 5. Achievement

success of a Web application.

� Django: is a Python-based framework. It is one of the backend frameworks thatfurther revolutionized the speed and e�ciency of web development. Many well-known website have been developed based on Django such as Bitbucket which is aweb-based hosting service for projects that use both the Mercurial or Git revisioncontrol systems, the National Aeronautics and Space Administration (NASA)website and last but not least the website of the internet freedom advocatorMozilla. What make Django a good choice to implement our core application arefollowing features:

� Complete development environment: Django provides a complete develop-ment environment. It comes with a lightweight Web server for development andtesting. When the debugging mode is enabled, Django provides very thoroughand detailed error messages, with a lot of debugging information which, in turn,makes debugging easier, and allows one to quickly isolate bugs.

� Structured and organized development: Django coding scheme revolvesaround building the website in phases. The front-end displays and designs aredesigned through templates, and then �nally woven together as one throughURL maps and delicate code snippets that transition from one aspect toanother. This way, we can develop di�erent chunks of the site and integratethem at the end rather than having the development stagger because of missingor delayed developments from certain parts of the site.

� It adheres strongly to the DRY principle: The DRY principle, also knownas the Do not Repeat Yourself principle, is a known coding standard wheredevelopers must learn to become a better object-oriented programmers. Djangohas also many essential pieces of built-in code on its libraries.

� It is written with and based on Python: Beside the importance of pythonas programming language, using Django will give us the opportunity the reusesome already implemented module for the command line interface.

� AngularJS: is an open-source web application framework, maintained by Google.It's a new client-side technology that extends the capabilities of your webapplications well beyond basic HTML, CSS, and JavaScript. It has been widelyused since 2010, and it is growing more popular every day. Based on GoogleTrends statistics shown in the �gure below, AngularJS is the most used framework.Its goal is to enhance web applications with model�view�controller (MVC)capability, in order to make both development and design web application easier.As a JavaScript client-side tool, it can be used with any server-side technology.

Graduation Project Report 43 2013 - 2014

Page 53: Graduation Project Report

Chapter 5. Achievement

� HTML 5: is the latest version of HTML web development language. HTML5includes new tags and new attributes for web pages and opens new opportunitiesespecially for developing web application.

5.2 Overview of the achieved work

In this part, we will present the �nal results of our implementation. We will presentour applications interface through a collection of screenshots.

5.2.1 Command Line Interface

We are going to show how our CLI output looks like. We will start by 'list resource'action. Our CLI can display outputs in tabular format, text format and JSONformat. The �gure 5.1 and 5.2 shows respectively text output and tabular output.In order to specify which format to use, we use the �format argument. It has threepossible values: table, text or JSON. If format is not mentioned it's by defaulttabular output.

Figure 5.1: Display text output

Graduation Project Report 44 2013 - 2014

Page 54: Graduation Project Report

Chapter 5. Achievement

Figure 5.2: Display tabular output

In order to list a resource with speci�c characteristics, we use search commandas shown in the �gure 5.3. The search command allows users to specify as muchcharacteristics as they want in order to �t precisely their requirement.

Figure 5.3: Search for a cluster with kvm hypervisor

Users can also update their resources info as shown in the �gure 5.4 by using theupdate command. The user has to specify the resource UUID then to add each ofthe attributes, which he wants to change, with their new values.

Graduation Project Report 45 2013 - 2014

Page 55: Graduation Project Report

Chapter 5. Achievement

Figure 5.4: Update of datacenter info

If a user forgets one of the command arguments, he can easily use the CLI helpmenu by using �h or �help argument as shown in the �gure 5.5.

Figure 5.5: Display CLI help menu

Graduation Project Report 46 2013 - 2014

Page 56: Graduation Project Report

Chapter 5. Achievement

If a request was not performed and an error occurs, the CLI display an error message.As shown in the �gure 5.6, the message is concise and explains in which level theproblem occurs.

Figure 5.6: CLI displays internal server error

CLI's users could also bene�t from the command line interface auto-completionfeature by hitting �Tab� button each time he needs assistance. Figure 5.7 and 5.8shows respectively resource auto-completion and zone UUID auto-completion.

Figure 5.7: Auto-complete the list of available resource

Figure 5.8: Auto-complete the list of owned zones

5.2.2 Web User Interface

Our web application is formed of a sidebar from where the user chooses which kindof resource he wants to visualize, a nav bar to handle login and his account and acontainer view where all view other views. The �gure 5.9 shows the case of a usertrying to display the �My Cloud� page.

Graduation Project Report 47 2013 - 2014

Page 57: Graduation Project Report

Chapter 5. Achievement

Figure 5.9: Virtual resource page

When the user selects a cluster in the cluster table, its associated zone in the zonetable become automatically selected and dashboard appears on the right as shownin the �gure 5.10. The dashboard header refers to the name of the selected clusterto help the user to track his state while using the application. The dashboardcontains general information about the cluster and tabs that allow user to navigatebetween the others components contained in this cluster such as hosts and storagerepositories.

Graduation Project Report 48 2013 - 2014

Page 58: Graduation Project Report

Chapter 5. Achievement

Figure 5.10: Cluster dashboard

In order to edit the cluster information, the user has to click in the pencil icon thatappears in every table line and then a popo-up appears with the set of �elds thatcloud be modi�ed. The �gure 5.11 shows a pop-up to modify the cluster name.

Figure 5.11: Edit cluster name

Graduation Project Report 49 2013 - 2014

Page 59: Graduation Project Report

Chapter 5. Achievement

Based on the same logic the user, when user wants to delete a resource he has justto click on the �x� button in each line of the resource table. As shown in the �gure5.12, a pop-up will show up to ask the user to con�rm his request.

Figure 5.12: Delete datacenter

Each resource table, as shown in the �gures above, has an �Add� button at the topthat allows user to add new resource to the table. The �gure 5.13 shows a pop-upto create a new datacenter.

Figure 5.13: Add new datacenter

Graduation Project Report 50 2013 - 2014

Page 60: Graduation Project Report

Chapter 5. Achievement

All the functionalities shown above are used in the same manner in order to managethe other resources, except virtual machines that have additional functionalities.The �gure 5.14 shows a virtual machines table.

Figure 5.14: Virtual machines table

When, one or many virtual machines are checked, as shown in the �gure 5.15, a newbuttons appears in the top that allows user the send multiple the requests to theAPI to manage the virtual machines states.

Figure 5.15: Manage virtual machines state

Graduation Project Report 51 2013 - 2014

Page 61: Graduation Project Report

Chapter 5. Achievement

In order to add new virtual machine the user click on tha "`Add"' buuton on thetop of virtual machine table. As shown in the �gure 5.16,a new form with multiplesteps appears on the right of the virtual machines table.

Figure 5.16: Add new virtual machines

In addition to managing the cloud resources, a cloud service provider can managealso his clients. As shown in the �gure 5.17, he can add, delete and assign new rolesto a his customers.

Figure 5.17: Manage the cloud provider customers

Graduation Project Report 52 2013 - 2014

Page 62: Graduation Project Report

Chapter 5. Achievement

In addition to the default o�erings de�ned by the company, a cloud provider cande�ne his own o�erings. As shown in the �gure 5.18, he can add network o�erings,compute o�erings, storage o�erings and domain o�erings.

Figure 5.18: Manage the cloud provider customers

5.3 Project Timeline

The �gure below shows the steps we have to accomplish during the period of thetraining which began on February, 3th 2014 and �nishes on May, 30th 2014.

Figure 5.19: Project time-line

Graduation Project Report 53 2013 - 2014

Page 63: Graduation Project Report

Chapter 5. Achievement

Conculsion

In this chapter, we presented the development environment in which we created ourapplications, the used languages. We subsequently presented the most signi�cantinterface of our application and explained how it works.

Graduation Project Report 54 2013 - 2014

Page 64: Graduation Project Report

GENERAL CONCLUSION

Along this report, we presented the di�erent steps of our internship. We havebeen enrolled to work within a skilled team, and we learned a lot from this greatexperience at Rosa� Holding.

We have started our report by providing a brief introduction to cloud-relatedconcepts. Then we described the existing cloud service management tools. Thisphase allowed us, furthermore, to get an idea about what features will beimplemented in our project and what improvement can be made compared toexisting implementations. In the next phase, we �xed the speci�cations and therequirements of our project. Throughout the design and the implementation phase,we faced new challenges. We had at the beginning to get used to new developmentframeworks such as Django and AngularJS. Then, we had to get used to the Rosa�cloud API and how to interact with. In the same context, we had to understandthe di�erent cloud resource and the relationship among it. Finally, we had to makesure that our solution meets and get along with the de�ned objectives.

At the end of this internship, all the requirements were met and all the challengeshad been successfully overcome. Our solution is now working properly and will besoon released.However, the implemented applications are just considered as a �rst release version.Online fraud detection and a billing system could be integrated within the web userinterface. Also, based on the customers' feedbacks and the improvements that couldbe made on the API, many new features could be added to both: the command lineinterface and the web user interface.

55

Page 65: Graduation Project Report

GLOSSARY

AAPI Application Programming Interface

CCLI Command Line Interface

IIaaS Infrastructure as a Service

PPDU Power Distribution Unit

PaaS Platform as a Service

SSaaS Software as a Service

SAN Storage Area Network

UUI User Interface

56

Page 66: Graduation Project Report

Chapter 5. Achievement

VVM Virtual Machine

WWUI Web User Interface

Graduation Project Report 57 2013 - 2014

Page 67: Graduation Project Report

BIBLIOGRAPHY

[1] Brad Green - AngularJS - May 25, 2014 - 177.[2] Green Tea Press - Think Python: How to Think Like a Computer Scientist - 24April 2014 - 240.[3] Peter Mell and Timothy Grance - The NIST De�nition of Cloud Computing -30 May 2014 - 7

58

Page 68: Graduation Project Report

NETOGRAPHY

[N1] https://developers.google.com/appengine/training/intro/whatiscc,consulted April 21st.[N2] http://www.cloud-lounge.org/EN/clouds-in-IT-history.html,consulted April 21st.[N3] http://aws.amazon.com/what-is-cloud-computing/, consulted April 21st.[N4] http://www.nist.gov/itl/cloud/, consulted April 22nd.[N5] http://www.vmware.com/virtualization/virtualization-basics/what-is-virtualization, consulted April 22nd.[N6]http://www.redhat.com/f/pdf/virtualization/gunner_virtual_paper2.pdf,consulted May 30th .[N7] http://www.redhat.com/products/cloud-computing/virtualization/,consulted April 22nd.[N8] http://www.slideshare.net/wanteddx/1-14723808, consulted April 28th.[N9] https://angularjs.org/, consulted April 29st.[N10] https://www.djangoproject.com/, consulted April 21st.[N11] https://readthedocs.org/, consulted April 15st.[N12] https://www.python.org/doc/, consulted April 25st.[N13] http://www.conres.com/cloud-computing-deployment-models,consulted May 30th.[N14] https://www.oasis-open.org/committees/download.php/19679/soa-rm-cs.pdf,consulted May 30th.[N15] http://www.rackspace.com/knowledge_center/whitepaper/understanding-the-cloud-computing-stack-saas-paas-iaas, consulted May30th.[N16] http://www.cregion.ru/node/52, consulted June 3rd.[N17] http://onapp.com/, consulted April 29st.

59