Universidad Polit´Ecnica De Madrid
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSIDAD POLITECNICA´ DE MADRID ESCUELA TECNICA´ SUPERIOR DE INGENIEROS DE TELECOMUNICACION´ DEPARTAMENTO DE INGENIER´IA DE SISTEMAS TELEMATICOS´ T´ıtulo: “Development of a management system for virtual machines on private clouds” Autor: D. Mattia Peirano Tutor: D. Juan Carlos Due˜nasL´opez Departamento: Departamento de Ingenier´ıade Sistemas Telem´aticos Tribunal calificador: Presidente: D. Juan Carlos Due˜nasL´opez Vocal: D. David Fern´andezCambronero Secretario: D. Gabriel Huecas Fern´andez-Toribio Fecha de lectura: 15 de Marzo 2013 Calificaci´on: UNIVERSIDAD POLITECNICA´ DE MADRID ESCUELA TECNICA´ SUPERIOR DE INGENIEROS DE TELECOMUNICACION´ PROYECTO FIN DE CARRERA Development of a management system for virtual machines on private clouds Mattia Peirano 2013 To my sister Acknowledgements During these five years between Politecnico di Torino and Universidad Polit´ecnica de Madrid, I have had the chance to meet many people along the way: some of them have come along with me, others joined just to share a stretch of road together and then follow on their own. I want to begin by expressing my gratitude to those people who made this expe- rience possible. First I want to thank my family that allowed me to embark on this adventure: they supported me during this year away with its ups and downs, and, even from afar, with their great love, they have been present in some way. Thanks to Juan Carlos for allowing me to finish my studies, by welcoming me in his research group. He has been my guiding light since the very beginning of my adventure at the ETSIT, which began with his own lecture on Telematics Ser- vices Architecture. I have been very lucky in choosing that course: thanks for this opportunity you gave me. Thanks to Rodrigo, workmate, fellow of lunches and breakfasts; he has been able to teach me a lot and to grant me a bit of his experience. His passion at work will allow him to be, besides a successful writer, a great professor, as those who fill the classroom with students sitting on the steps. Between chocolate cookies and our inevitable croissants with Eva, he introduced me to the true essence of Spanish customs and traditions. Thanks to professor Guido Marchetto who allowed me to finish my degree with his supervision and support. Thanks to Valentina who has been able to give me a bit of her strength, always encouraging me in all my important decisions. She was able to find hundreds of reasons not to give up; thanks for supporting and waiting for me for all this time. Thanks to Julia, flatmate with whom I had the pleasure of sharing the bestpartof this journey. I hope our paths will cross again, despite the large distance. Thanks to Sara, the first who welcomed me in this city and in this school. Thanks tothemany people I have had the pleasure to meet during this experience at both universities: somehow, everyone of you left me something, and I hope I’ve left something to you, too. And a final thanks to my old friends, who, even if far, every time I came back, were able to make me feel I had never left. Grazie a tutti Madrid, February 20, 2013 Abstract Cloud computing and, more particularly, private IaaS, is seen as a mature technol- ogy with a myriad solutions to choose from. However, this disparity of solutions and products has instilled in potential adopters the fear of vendor and data lock- in. Several competing and incompatible interfaces and management styles have increased even more these fears. On top of this, cloud users might want to work with several solutions at the same time, an integration that is difficult to achieve in practice. In this Master Thesis I propose a management architecture that tries to solve these problems; it provides a generalized control mechanism for several cloud infrastructures, and an interface that can meet the requirements of the users. This management architecture is designed in a modular way, and using a generic infor- mation model. I have validated the approach through the implementation of the components needed for this architecture to support a sample private IaaS solution: OpenStack. Keywords: cloud computing; private IaaS; cloud management; management ar- chitecture; cloud interoperability; OpenStack. Riassunto Il cloud computing, e pi`uin particolare i servizi IaaS privati, sono ormai visti come una tecnologia matura che presenta una miriade di soluzioni tra cui `epossibile sce- gliere. Tuttavia, questa disparit`adi soluzioni e prodotti ha instillato nei potenziali utenti la paura di legarsi definitivamente ad un determinato fornitore o tecnolo- gia. L’avvento di nuove interfacce di gestione, incompatibili tra loro, e di diversi stili di amministrazione ha dato ancor pi`uvoce a questi timori. In primo luogo, gli utenti del cloud possono voler lavorare contemporaneamente con diverse solu- zioni tecnologiche, ma tale integrazione risulta difficile da realizzare nella pratica. In questa tesi magistrale propongo un modello di architettura di gestione che cerca di affrontare tali problemi offrendo un metodo comune di controllo per tecnologie cloud eterogenee e un’interfaccia che pu`oessere adattata alle esigenze dell’utente. Questa architettura `estata progettata in modo tale da avere una struttura modulare e utilizzando un modello di informazione generico. Abbiamo convalidato il nostro approccio attraverso lo sviluppo e la implementazione dei componenti necessari, fa- cendo riferimento a una specifica soluzione di IaaS privato: OpenStack. Parole chiave: cloud computing; IaaS privati; gestione del cloud; architettura di gestione; interoperabilit`atra cloud; OpenStack. Resumen La computaci´onen la nube y, m´asconcretamente, las IaaS privadas, est´anconside- radas como una tecnolog´ıamadura que presenta una multitud de soluciones entre las cuales elegir. Sin embargo, esta disparidad de soluciones y productos ha inculcado en los potenciales usuarios el miedo a ligarse perennemente a un proveedor o tec- nolog´ıaespec´ıficos.La aparici´onde varias interfaces de gesti´on,incompatibles entre ellas, y distintos estilos de administraci´onhan dado voz, a´unm´as,a estos temores. Adem´as,los usuarios de los servicios en la nube desean trabajar con varias soluciones al mismo tiempo, y ´estaes una integraci´ondif´ıcilde lograr en la pr´actica. En este Proyecto de Fin de Carrera propongo un modelo de arquitectura de gesti´onque no s´olotrata de hacer frente a estos problemas, sino que ofrece una forma com´unde manejar varias soluciones de computaci´onen la nube, y una interfaz que se puede adaptar a las necesidades del usuario. Esta arquitectura de gesti´onest´adise˜nadade una manera modular, usando un modelo de informaci´ongen´erico.Hemos validado nuestro enfoque a trav´esde una implementaci´onde los componentes de tal arquitec- tura escogiendo como referencia una soluci´onde IaaS privado espec´ıfica:OpenStack. Palabras clave: computaci´onen la nube; IaaS privada; gesti´onde la nube; ar- quitectura de gesti´on;interoperabilidad entre nubes; OpenStack. Contents 1. Introduction 1 1.1. Context . .2 1.2. Technical Objectives . .2 1.3. Didactic Objectives . .3 1.4. Work Plan . .4 1.5. Document Structure . .5 2. State of the Art 7 2.1. Cloud Computing Definition . .7 2.2. Main Features . .8 2.3. Service Models . .8 2.3.1. Infrastructure as a Service - IaaS . .8 2.3.2. Platform as a Service - PaaS . .9 2.3.3. Software as a Service - SaaS . .9 2.4. Deployment Models . .9 2.4.1. Private Cloud . .9 2.4.2. Community Cloud . 10 2.4.3. Public Cloud . 10 2.4.4. Hybrid Cloud . 10 2.4.5. Hosted Public Cloud vs. Hosted Private Cloud . 11 2.5. Computing as Utility . 11 2.6. Cloud Sustainability . 12 2.7. Technologies . 13 2.7.1. Private IaaS . 13 2.7.2. Public IaaS . 21 2.7.3. PaaS Services . 23 2.7.4. SaaS Services . 24 2.8. Management of cloud services . 25 2.8.1. KOALA . 26 2.8.2. Scalr . 26 2.8.3. Puppet . 27 i 2.9. Virtualization . 27 2.9.1. Hypervisors . 27 2.9.2. LibVirt . 28 2.9.3. Other solutions . 28 2.10. Supporting technologies . 29 2.10.1. Eclipse Modeling Framework . 29 2.10.2. GitHub . 29 2.10.3. Launchpad . 29 2.10.4. REST . 30 3. Requirements Analysis 31 3.1. Problem Definition . 31 3.2. Domain model . 33 3.3. Requirements . 35 3.3.1. Functional Requirements . 36 3.3.2. Non-functional Requirements . 39 3.4. Use cases . 40 3.4.1. Traceability . 47 4. Design 49 4.1. General architecture . 49 4.2. Assumptions . 51 4.3. The Cloud Computing Information model . 52 4.3.1. EMF Model . 52 4.3.2. OpenStack Information Model . 53 4.4. Component Diagram . 57 4.4.1. Client Layer . 57 4.4.2. Manager Layer . 59 4.4.3. Controller Layer . 61 4.5. Man.O.S. detailed Design . 62 4.5.1. The Client . 62 4.5.2. System interfaces . 65 4.5.3. Manager Implementation . 71 4.5.4. The Utility Package . 78 4.5.5. Exceptions . 79 4.5.6. The Infrastructure Manager Implementation . 79 5. Test 83 5.1. Introduction to Tests . 83 5.1.1. Tests in Java Environment . 84 5.2. Test Architecture . 84 ii 5.2.1. Unit Tests . 85 5.2.2. Integration Tests . 88 5.2.3. System Tests . 89 5.3. Metrics and Statistics . 95 5.3.1. Cyclomatic Complexity . 95 5.3.2. Weighted Methods per Class . 96 5.3.3. Efferent Couplings . 97 5.3.4. Lack of Cohesion in Methods . 98 5.3.5. Number of Levels . 98 5.3.6. Number of Fields . 99 5.3.7. Number of Parameters . 100 5.3.8. Conclusions . 100 6.