Platform for Deploying Web Applications
Total Page:16
File Type:pdf, Size:1020Kb
MASARYKOVA UNIVERZITA FAKULTA}w¡¢£¤¥¦§¨ INFORMATIKY !"#$%&'()+,-./012345<yA| Platform for deploying web applications MASTER THESIS Bc. Marek Jelen Brno, fall 2011 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or excerpted during elaboration of this work are properly cited and listed in complete refer- ence to the due source. Bc. Marek Jelen Advisor: doc. RNDr. Toma´sˇ Pitner, Ph.D. ii Acknowledgement I would like to thank my supervisor and all those who helped me to make this happen. iii Abstract This theses focuses on deployment of web applications. Web applications are becoming more important with advances in cloud computing and with the ap- proach of HTML5 standard. With the rise of web applications, the importance of deployment technologies rises. This thesis describes the deployment process of web applications and the cloud computing phenomenon regarding the deploy- ment process of web applications. As part of the theses a project for deploying web applications is developed to provide open-source platform for web applica- tion deployment. iv Keywords cloud computing, PaaS, IaaS, web applications, deployment, service, Ruby, Java, JavaScript, Linux v Contents 1 Introduction ................................... 4 2 Cloud computing ................................ 6 2.1 History ................................... 6 2.2 Finding the roots ............................. 6 2.3 Infrastructure as a Service ........................ 7 2.3.1 Amazon Elastic Compute Cloud . 8 2.3.2 Rackspace cloud . 9 2.3.3 Joyent . 9 2.4 Platform as a Service ........................... 9 2.4.1 Heroku . 10 2.4.2 Google App Engine . 11 2.4.3 Microsoft Azure . 11 2.5 Software as s Service ........................... 12 2.5.1 Office Web Apps . 12 2.5.2 Google Apps . 12 3 The cloudy business .............................. 14 3.1 Web application development process and deployment . 14 3.1.1 Bare metal . 16 3.1.2 Shared hosting . 17 3.1.3 Virtual servers & dedicated hosting . 17 3.1.4 Platform . 18 3.2 Platform adoption ............................. 18 3.2.1 Management . 19 3.2.2 Developers . 19 4 Making the clouds wild ............................ 21 4.1 Wildcloud ................................. 21 4.2 Required features ............................. 21 4.2.1 Security . 21 4.2.2 Resource allocation . 22 4.2.3 Building the application and central repository . 22 4.2.4 Thin provisioning . 22 4.2.5 Extensibility . 23 4.2.6 Deployment . 23 4.2.7 File system . 23 4.3 Comparison with existing solutions . 23 4.3.1 CloudFoundry . 24 1 4.3.1.1 Tight coupling . 24 4.3.1.2 Deployment . 24 4.3.1.3 Message queuing . 24 4.3.1.4 Isolation . 25 4.3.2 Nodejitsu . 25 4.3.2.1 Node.js . 25 4.3.2.2 Isolation . 25 4.3.3 OpenShift . 25 4.4 Applied technologies ........................... 26 4.4.1 Operating system . 26 4.4.2 Application security and isolation . 26 4.4.3 Loose coupling . 27 4.4.4 Thin provisioning . 28 4.4.5 Data storage . 28 4.4.6 Cloud communication . 29 4.4.7 External services . 29 4.4.8 HTTP routing . 29 4.4.9 Session store . 30 4.5 Architecture ................................ 30 4.5.1 Basic communication . 30 4.5.2 Core components . 31 4.5.3 Components seen by applications . 35 4.5.4 Routing of HTTP requests . 37 4.6 Testing ................................... 38 4.6.1 Functional testing . 40 4.6.2 Load testing . 40 5 Product evaluation ............................... 42 5.1 Case-study ................................. 42 5.1.1 Company . 42 5.1.2 Problems . 42 5.1.3 Requirements . 43 5.1.4 Solution . 43 5.1.5 Benefits . 44 5.2 From customer’s point of view ..................... 44 5.2.1 Welcome screens . 45 5.2.2 Navigation . 46 5.2.3 Dashboard . 47 5.2.4 SSH keys . 47 5.2.5 Repositories . 48 2 5.2.6 Applications . 49 5.2.7 Router . 50 6 Conclusion .................................... 52 3 1 Introduction When at the end of the year 1990 1 Tim Berners-Lee was proposing his new project “WorldWideWeb”, I believe, he had no idea, what will WildWideWeb become. In those 11 years the mankind created something, that has never been created in the known history. An incredible library of knowledge available to everyone connected to the network. With the advances in text recognition and search algo- rithms, we have possibility to scan through billions of documents, books, articles within seconds. And man is going even further. We are building social networks and services, to allow people to communicate what they want to say to those, who want to lis- ten and even to those, who do not. We are tearing down the walls among people, countries, continents and the freedom of speech has advanced so much, that we are even afraid of it. Services like Twitter2 or Facebook 3 scale to billions of active users and unimaginable amounts of data. People are loosing their fear of living in the virtual environment and are embracing the impossible - being anytime ev- erywhere. All these advances in the domain of social or community networking are pos- sible thanks to a new phenomenon called “cloud computing”. Cloud computing is the new “buzz word”, that we can hear from all directions all over the world. At the beginning the cloud computing was the domain of agile start-up compa- nies, that needed to scale their products to vast number of clients, but did not have enough money to invest into their own and expensive hardware. As the time comes, the cloud computing is adopted even in large enterprises and the term “cloud” is becoming the new formula, everyone want to use to magically succeed with their product. The cloud computing brought new ideas into the area of server infrastruc- tures. The most important one is the shift of paradigms from “we have to build computer that will never fail” into more reasonable and practical view “we have to build an infrastructure that will survive the crash of a computer”. Cloud com- puting is about building an infrastructure that even on commodity hardware will maintain high availability and performance. The main subject of this thesis is to analyse requirements on deploying mod- 1. http://en.wikipedia.org/wiki/World Wide Web 2. https://twitter.com/ 3. http://www.facebook.com/ 4 1. INTRODUCTION ern web applications and implement platform that simplifies such process. To ful- fil the subject different areas and views on cloud computing will be explored and the most important cloud computing services regarding the topic of this thesis described. In the first chapter, the term “cloud computing” will be discussed. It is always important to lay the ground by defining the terms. It is even more impor- tant in the domain of cloud computing, because of it’s rapid pace of expansion and development. In the second chapter, with the terms defined, the processes from the point of a clients and providers will be discussed to analyse the needs of customers. In the third chapter existing solutions and their advantages and dis- advantages are discussed. Also the reasoning why to start new project is being presented. The following chapters will describe the new platform for deploying web ap- plications in the “cloudy way”. The advantages and disadvantages of this so- lution, as well as technical aspects and requirements to set-up the platform are presented. The last chapter will provide performance figures as well as results of functional and load testing. 5 2 Cloud computing 2.1 History The cloud computing comes after the “dot-com bubble” 1. Amazon as one of the survivors of the bubble measured that only 10% of their computing capacity is used. The rest of their computing power was there to cover spikes in the visi- tors count to accommodate the necessary computing power to serve the HTTP re- quests. With the advances of virtualization, Amazon created cloud infrastructure that allowed to significantly reduce the costs of their infrastructure and labour required to operate it. Learned this lesson Amazon decided to create public ser- vice, that allows clients to rent computational power for their own purposes. This product was presented for the first time in 2006. More companies followed and new projects were started, proprietary and open source. Among the pioneers in this area were projects Eucalyptus2 and Open- Nebula 3. Later a project called OpenStack 4 was found by RackSpace5. 2.2 Finding the roots There is no simple and universal answer to the question what cloud computing really is. It is important to note, that different people or experts do define cloud computing differently. In different domains the term may mean something com- pletely different. For example taking 21 experts to define the term cloud comput- ing yields 21 different definitions [19]6. From the perspective of this thesis, the definition provided by Wikipedia7 [73] seems to be one of the most precise, but let me provide my own definition that is based on those mentioned. “providing computation as a service over a network” 1. http://en.wikipedia.org/wiki/Dot-com bubble 2. http://www.eucalyptus.com/ 3. http://www.opennebula.org/ 4. http://openstack.org/ 5. http://www.rackspace.com/ 6. http://cloudcomputing.sys-con.com/node/612375 7. http://en.wikipedia.org/wiki/Cloud computing 6 2. CLOUD COMPUTING Computation, in this definition, is any computer-related service that can be provided remotely and basically can be divided into three layers, that build on each other from bottom up. Layer Abbreviation Software as a Service SaaS Platform as a Service PaaS Infrastructure as a Service IaaS To illustrate what each of these layers represents, let’s apply them to a real service.