1 / 40

Chapter 4 How to use cloud computing? Kai Liu, Qunying Huang, Jizhe Xia, Zhenlong Li,

Chapter 4 How to use cloud computing? Kai Liu, Qunying Huang, Jizhe Xia, Zhenlong Li, and Peter Lostritto. Learning Objectives. Get familiar with two popular cloud services Understand web application using a simple case Learn the basic steps to deploy the web application

tassos
Download Presentation

Chapter 4 How to use cloud computing? Kai Liu, Qunying Huang, Jizhe Xia, Zhenlong Li,

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4 How to use cloud computing? Kai Liu, Qunying Huang, Jizhe Xia, Zhenlong Li, and Peter Lostritto

  2. Learning Objectives • Get familiar with two popular cloud services • Understand web application using a simple case • Learn the basic steps to deploy the web application • onto cloud services

  3. Learning Materials • Videos: • Chapter_4-Video_1.mp4 • Chapter_4-Video_2.mp4 • Scripts, Files and others: • index.html

  4. Learning Modules • Introduction: popular cloud services • “Hello Cloud” web application • General steps • Special considerations • Deploy the “Hello Cloud” onto Cloud Services • Amazon AWS • Windows Azure • Conclusion and discussions

  5. Two Popular Cloud Computing Services • Amazon AWS • Since 2006 • Comprehensive platform which offers a list of cloud services such as computing, storage, content delivery, database, deployment & management, networking and other services (Varia and Mathew, 2012). • URL: http://aws.amazon.com/

  6. Two Popular Cloud Computing Services • Windows Azure • Since 2008 • Microsoft cloud service which has four parts including Windows Azure, SQL Azure, Windows Azure AppFabric, and Windows Azure Marketplace (Chappell, 2010). • URL: www.windowsazure.com

  7. Learning Modules • Introduction: popular cloud services • “Hello Cloud” web application • General steps • Special considerations • Deploy the “Hello Cloud” onto Cloud Services • Amazon AWS • Windows Azure • Conclusion and discussions

  8. “Hello Cloud” web application Homepage of “Hello Cloud” website

  9. HTML file contents <!DOCTYPE html> <html> <body> <h1>Hello Cloud</h1> <ul> <li><a href="http://aws.amazon.com/">Amazon AWS</a></li> <li><a href="http://www.windowsazure.com/en-us/">Windows Azure</a></li> <li><a href="http://incubator.apache.org/cloudstack/">Apache Cloudstack</a></li> <li><a href="http://www.eucalyptus.com/">Eucalyptus Cloud</a></li> <li><a href="http://www.nimbusproject.org/">Nimbus</a></li> <li><a href="http://opennebula.org/">OpenNebula</a></li> </ul> </body> </html>

  10. Web application Containers • Apache HTTP Server (httpd) • Open Source HTTP server for modern operating systems including Unix and Windows • Apache Tomcat Server • Open Source Software implementation of the Java Servlet and JavaServer Pages (JSP) • Microsoft Internet Information Services (IIS) • Deployed by Microsoft for Microsoft Windows

  11. Learning Modules • Introduction: popular cloud services • “Hello Cloud” web application • HTML page • Web application context • Deploy the “Hello Cloud” onto Cloud Services • Amazon AWS • Windows Azure • Conclusion and discussions

  12. Deploy “Hello Cloud” onto AWS 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4

  13. Step 1. Sign up for AWS 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance Play Video(1) 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 0:00 – 0:29

  14. Step 2. Authorize Network Access • There are two purposes in this step: • Allowing users to access the instance with SSH (Secure Shell) or RDP (Remote Desktop) • Accepting web traffic on specific port 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance Video: Chapter_4-Video_1.mp4 0:30 – 1:18 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server

  15. Interface of EC2 dashboard 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server

  16. Authorize Network Accessusing Security Groups 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance • 1. Create "hellocloud" group; • 2. Create a new rule for SSH; 4. Login to the instance 5. Install and configure web server • 3. Create a new rule for HTTP

  17. Step 3. Launch an Instance • Create Key Pair 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 1:18 – 4:17

  18. Launching a new instance by searching and using AMI from AWS Marketplace 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server

  19. Step 4. Login to the instance ssh -i ssh-keypair.pem username@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance • Login to the instance from Linux or Mac OS Machine 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance Video: Chapter_4-Video_1.mp4 4:17 – 6:49 4. Login to the instance 5. Install and configure web server

  20. Login to the instance from Windows machine,using Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server • Convert Amazon Key Pair to Private Key

  21. 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access • (b) Select private key 6. Transfer the “Hello World” files to the instance 3. Launch an instance • (a) Input Host Name 4. Login to the instance 5. Install and configure web server • (c) Type root as login name

  22. Step 5. Install and Configure the web server $: yum install httpd $: service httpd start $: chkconfighttpd on • Install httpd 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access • Enable port 80 in firewall 6. Transfer the “Hello World” files to the instance 3. Launch an instance • $: iptables -I INPUT -p tcp --dport 80 -j ACCEPT • $: service iptables save 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 6:49 – 7:16

  23. Step 6. Transfer "Hello Cloud" file onto the instance $: scp -i myfirstkey.pem index.html ubuntu@ ec2-54-235-3-170.compute-1.amazonaws.com:/root 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance • Transfer files from Linux or Mac OS Machine 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 7:16 -- 8:07

  24. Transfer files from Windows machine, using WinSCP: http://winscp.net/eng/index.php 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server • WinSCP login

  25. Transfer File using WinSCP 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server

  26. Step 7. Deploy the application $:mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcomebak.conf $:mv /root/index.html /var/www/html $:service httpd restart 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 8:07 – 9:59

  27. Step 8. Create an AMI from the running instance 1. Sign up for Amazon AWS 8. Create a new AMI from the running instance 7. Deploy the application 2. Authorize network access 6. Transfer the “Hello World” files to the instance 3. Launch an instance 4. Login to the instance 5. Install and configure web server Video: Chapter_4-Video_1.mp4 10:00 – 13:58

  28. Deploy “Hello Cloud” onto Azure 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS Click here to view the video demonstrating the steps.

  29. Step 1. Sign up for Windows Azure 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access Video: Chapter_4-Video_2.mp4 0:00 – 0:49 4. Login to the virtual machine 5. Turn on IIS

  30. Step 2. Create a virtual machine Video: Chapter_4-Video_2.mp4 0:49 – 6:28 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS • Launch Windows Virtual Machine

  31. Step 3. Authorize Network Access Video: Chapter_4-Video_2.mp4 6:28 – 8:10 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine a) Add an endpoint; 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS • b) Specify the details of the endpoint

  32. Step 4. Login to the Virtual Machine 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access Video: Chapter_4-Video_2.mp4 8:10 – 8:47 4. Login to the virtual machine 5. Turn on IIS • Windows Azure Cloud Management interface

  33. Step 5. Turn on IIS Video: Chapter_4-Video_2.mp4 8:47 – 11:53 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS • Turn on IIS in the virtual machine

  34. Step 6. Transfer “Hello Cloud” file onto Virtual Machine Cloud consumers can simply copy and paste or drag and drop files between local computer and virtual machine. 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS Video: Chapter_4-Video_2.mp4 11:53 – 13:52

  35. Step 7. Deploy the application • First, create a folder named hellocloud under "C:\inetpub\wwwroot" directory in the virtual machine • Then, copy the home page of "Hello Cloud" application to hellocloud folder. 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS

  36. Step 8. Capture an image of running virtual machine • Run sysprep in virtual machine • Shut down the virtual machine in Cloud Management Interface • Click "Capture" button in the bottom of Cloud Management Interface to capture the image. 1. Sign up for Windows Azure 8. Capture an image of running instance 7. Deploy the application 2. Create a virtual machine 6. Transfer the “Hello World” Files to the instance 3. Authorize network access 4. Login to the virtual machine 5. Turn on IIS Video: Chapter_4-Video_2.mp4 13:52 - end

  37. Learning Modules • Introduction: popular cloud services • “Hello Cloud” web application • HTML page • Web application context • Deploy the “Hello Cloud” onto Cloud Services • Amazon AWS • Windows Azure • Conclusion and discussions

  38. General Steps to deploy a simple web application

  39. Discussion Questions What are the differences between terminating an instance and stopping it on Amazon AWS? How to clean up an instance on AWS if you won't use the instance anymore? What's the differences between shutting down a virtual machine and deleting it on Windows Azure?  What are the general steps of deploying a simple web applications onto EC2 and Windows Azure? How to authorize network access in EC2 and Azure? What is the role of the "key pair" in EC2? What is "instance image" in cloud? Why is the relationship between an instance and an image. 

  40. References • Chappell, David. "Introducing the windows azure platform." David Chappell & Associates White Paper (2010). • Varia, J.and Mathew, S. 2012. Overview of Amazon Web Services. Available from: from: http://d36cz9buwru1tt.cloudfront.net/AWS_Overview.pdf[Accessed 23 January 2013].

More Related