IntrotoUbuntuandCloud

Open Week -- Intro to Ubuntu and Cloud, running your 1st Ubuntu Server on EC2 -- AhmedKamal -- Wed, Oct 13

   1 [17:01] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/10/13/%23ubuntu-classroom.html following the conclusion of the session.
   2 [17:01] <kim0> Good Morning, Good Afternoon and Good evening folks
   3 [17:01] <kim0> Let me introduce myself .. This is Ahmed Kamal
   4 [17:01] <kim0> I am the Ubuntu cloud liaison
   5 [17:02] <kim0> So this session is cloud computing basics
   6 [17:02] <kim0> Basically .. it introduces what cloud computing is all about
   7 [17:02] <kim0> I do hear a lot from people who wonder what this cloud thing is all about
   8 [17:03] <kim0> and what's in it "for me"
   9 [17:03] <kim0> this session is exactly for that .. If you're more advanced however, I'd like to invite you to also attend the next session
  10 [17:03] <kim0> by Dustin kirkland, a developer on the Ubuntu server team
  11 [17:04] <kim0> This session is two parts
  12 [17:04] <kim0> part1: I give an intro to cloud, and we have a Q+A session
  13 [17:04] <kim0> part2: I will demo launching your first Ubuntu server VM on the Amazon EC2 cloud
  14 [17:05] <kim0> which will include using cloud-init, a unique Ubuntu server package that makes it easier to work with VMs in the cloud
  15 [17:05] <kim0> So the first thing you need to know about cloud computing .. is that everyone who knows about it has a different view on what it really is
  16 [17:06] <kim0> i.e. every person has some definition, which I'm sure many other quite knowledgeable people would disagree about
  17 [17:06] <kim0> If you're using Gmail/Facebook/Dropbox .. you're already using cloud computing
  18 [17:06] <kim0> and you probably don't even know it!
  19 [17:06] <kim0> I won't try to present a conclusive definition of cloud computing here, but I will say any cloud vendor should provide the following properties
  20 [17:07] <kim0> -Pay per use
  21 [17:07] <kim0> -Instant Scalability
  22 [17:07] <kim0> -Security (If you trust your provider)
  23 [17:07] <kim0> -Reliability
  24 [17:07] <kim0> -APIs
  25 [17:07] <kim0> let me quickly comment on each of those points
  26 [17:07] <kim0> the first .. pay per use, really means that you only pay for what you use
  27 [17:08] <kim0> this is as opposed to a more traditional VPS (Virtual Private Server)
  28 [17:08] <kim0> where you rent by the month ..
  29 [17:08] <kim0> in the pay per use model .. you can use 100 servers for 1 hour and only pay for that!
  30 [17:08] <kim0> -Instant Scalability
  31 [17:08] <kim0> This one means .. that most cloud providers
  32 [17:09] <kim0> do not limit your scaling .. ie if you need more storage or more servers
  33 [17:09] <kim0> you can go ahead and just get them .. no need for pre-committment
  34 [17:09] <kim0> -Security (If you trust your provider)
  35 [17:09] <kim0> Well .. a major debate point
  36 [17:09] <kim0> however .. Some people will never trust their data on someone else's data-center
  37 [17:10] <kim0> however .. some other people will say ...
  38 [17:10] <kim0> just as you trust the bank with your money .. trust us with your data
  39 [17:10] <kim0> it really depends on how valuable your data is to you, how much you trust the provider
  40 [17:11] <kim0> however .. if you have no dedicated IT staff .. throwing your load on a public cloud may even provide better security than running things in house
  41 [17:11] <kim0> -Reliability
  42 [17:11] <kim0> Most cloud vendors will invest in building a reliable data center
  43 [17:11] <kim0> replicated storage
  44 [17:11] <kim0> fault tolerant equipment ...etc
  45 [17:11] <kim0> you gain all of that ..
  46 [17:12] <kim0> -APIs
  47 [17:12] <kim0> The final point .. and it basically means that you control your cloud virtual data center
  48 [17:12] <kim0> through a set of APIs
  49 [17:12] <kim0> APIs are Application Programming Interfaces
  50 [17:12] <kim0> basically .. a way to programmatically create servers, storage, hook them up together
  51 [17:13] <kim0> so you can basically script or program everything that builds your entire virtual data-center
  52 [17:13] <kim0> "automation" is thus big in the cloud world
  53 [17:13] <kim0> and APIs do enable that
  54 [17:13] <kim0> when you're managing hundreds or thousands of virtual servers .. automation is generally important
  55 [17:14] <kim0> so ..
  56 [17:14] <kim0> In essence when you decide to use cloud computing, you're outsourcing your IT services (storage, infrastructure, ...etc) to a vendor that uses his skills to provide a reliable,secure service and uses the economies of scale to provide them at very competitive prices
  57 [17:14] <kim0> Any questions so far ?
  58 [17:15] <ClassBot> jack002 asked: What happens if vendor stop supporting a cloud?
  59 [17:16] <kim0> The question is what about if my cloud vendor dies/disappears/goes-out-of-business
  60 [17:16] <kim0> A very valid concern indeed
  61 [17:16] <kim0> that is why most cloud concerned IT people
  62 [17:16] <kim0> try to avoid "vendor lock in"
  63 [17:16] <kim0> which means having a standard API to manage your cloud
  64 [17:17] <kim0> and being able to quickly and easily migrate your data and infrastructure off to a different cloud
  65 [17:17] <kim0> there is a lot of effort in that direction
  66 [17:17] <kim0> standardizing APIs ..
  67 [17:17] <kim0> writing wrapper tools like the delta-cloud wrapper
  68 [17:17] <kim0> to standardize cloud management
  69 [17:17] <kim0> however .. the whole scene is too young and fast moving .. so there is not definitive answer yet
  70 [17:18] <kim0> however indeed .. vendor lock in is something you should care about
  71 [17:18] <kim0> Alright
  72 [17:18] <kim0> So, let's move on to the different types of clouds
  73 [17:18] <kim0> Most people categorize clouds as either
  74 [17:18] <kim0> -IaaS
  75 [17:19] <kim0> -PaaS
  76 [17:19] <kim0> -SaaS
  77 [17:19] <kim0> being .. Infrastructure, Platform, Software
  78 [17:19] <kim0> as a Service
  79 [17:20] <kim0> IaaS: Basically means .. you get the low level infrastructure as a service. i.e. what you get is, raw storage, networking bandwidth, load balancers, servers ...etc
  80 [17:20] <kim0> and you build your code and applications on top
  81 [17:20] <kim0> very similar to physical servers really
  82 [17:20] <kim0> This is similar to the Amazon EC2 cloud .. the rackspace cloud and many others
  83 [17:20] <kim0> PaaS: being .. Platform .. you get a "platform" to code against!
  84 [17:21] <kim0> i.e. you don't really see "machine" and "storage"
  85 [17:21] <kim0> you may not even know how many machines your code is running on
  86 [17:21] <kim0> you may not know how the network is configured!
  87 [17:21] <kim0> What you do get
  88 [17:21] <kim0> is a "File-system" for example to put shared data on
  89 [17:21] <kim0> you'd get an API to store/retrieve data from
  90 [17:21] <kim0> ...etc
  91 [17:22] <kim0> How this database you're using is actually configurd .. where does it run .. is none of your concerns!
  92 [17:22] <kim0> The prime example of a PaaS .. is the Google App Engine platform
  93 [17:22] <kim0> The major benefit of PaaS .. is that you don't care/know about the low level stuff
  94 [17:23] <kim0> it all "just works" as far as you're concerned
  95 [17:23] <kim0> however .. the bad part .. is that you don't know the low level stuff also!
  96 [17:23] <kim0> you cannot change anything .. you have almost zero control on the low level configuration ...etc
  97 [17:24] <kim0> Another major benefit, is that you get scaling, for very little or almost no effort
  98 [17:24] <kim0> on the other hand .. with IaaS ..
  99 [17:24] <kim0> you would have to build your application in a scalable manner
 100 [17:24] <kim0> you'd have to use load balancers .. use caching in a smart way ..
 101 [17:24] <kim0> manage DB replicas .. manage DB sharding ... etc
 102 [17:24] <kim0> lots of stuff, which may consume a lot of effort
 103 [17:25] <kim0> The last cloud type we mentioned was
 104 [17:25] <kim0> -SaaS
 105 [17:25] <kim0> basically Software as a service
 106 [17:25] <kim0> What this means .. is that you get a final completed "Software" running in the cloud
 107 [17:25] <kim0> and you just use it!
 108 [17:25] <kim0> examples .. are like Salesforce.com
 109 [17:26] <kim0> It is a complete CRM application
 110 [17:26] <kim0> that is running in the cloud
 111 [17:26] <kim0> you don't need to worry about buying servers, buying storage, running or scaling it
 112 [17:26] <kim0> or backing it up ...etc
 113 [17:26] <kim0> you just pay per use
 114 [17:27] <kim0> the simplicity and benefits are obvious .. while of course vendor lockin is also fairly obvious and problematic
 115 [17:27] <kim0> Cool ..
 116 [17:27] <kim0> Another classification type of Clouds
 117 [17:27] <kim0> is
 118 [17:27] <kim0> private, public, hybrid
 119 [17:27] <kim0> let's quickly comment on that
 120 [17:28] <kim0> -Private: Means a cloud that you built and that you control .. in-house .. behind your firewall .. in your own datacenter
 121 [17:28] <kim0> An enterprise may very well build its own private cloud for its internal users
 122 [17:29] <kim0> -Public: This basically means a cloud that's available publicly on the Internet for anyone that pays
 123 [17:29] <kim0> -Hybrid: This one is a mix of both public and private
 124 [17:29] <kim0> for example .. you may build an inhouse cloud that handles the average load
 125 [17:29] <kim0> however .. a couple of days per month
 126 [17:29] <kim0> you get 5x the normal load for some reason
 127 [17:30] <kim0> so you decide to "burst" out
 128 [17:30] <kim0> to some public cloud
 129 [17:30] <kim0> so you start some virtual servers (VMs) on a public cloud
 130 [17:30] <kim0> perhaps establish a VPN connection between your enterprise and the public cloud
 131 [17:30] <kim0> et voila .. you can expand your virtual datacenter as much as you want to handle the extra load
 132 [17:31] <kim0> so .. any questions so far
 133 [17:32] <ClassBot> kstailey_ asked: is libcloud an API?
 134 [17:32] <kim0> libcloud is an abstraction library
 135 [17:32] <kim0> that works across many cloud vendors
 136 [17:33] <kim0> so if you're writing an in house script that connects to a public cloud
 137 [17:33] <kim0> creates a few servers and configures them
 138 [17:33] <kim0> if you build your script over libcloud
 139 [17:33] <kim0> you'd be able to quickly replace
 140 [17:33] <kim0> Amazon ec2 for example .. by linode
 141 [17:33] <kim0> across many others
 142 [17:33] <kim0> this is part of the solutions to the vendor lockin problem
 143 [17:34] <ClassBot> ongolaBoy asked: I guess that all this kind of cloud involve tons of complex hardware and software to run. Am I right ?
 144 [17:34] <kim0> Well ..
 145 [17:34] <kim0> remember when we said public vs private clouds
 146 [17:34] <kim0> One thing I would like to mention is that you can build a private cloud
 147 [17:35] <kim0> today using Ubuntu
 148 [17:35] <kim0> using Ubuntu Enterprise Cloud
 149 [17:35] <kim0> UEC
 150 [17:35] <kim0> that is integrated with the Ubuntu server CDs
 151 [17:35] <kim0> to answer your question about "complexity"
 152 [17:35] <kim0> I would say it is very "simple" for a sysadmin type person to install and get UEC cloud running
 153 [17:36] <kim0> after all everything is easier with Ubuntu :)
 154 [17:36] <kim0> however ..
 155 [17:36] <kim0> of course for production clouds that serve the whole world
 156 [17:36] <kim0> the likes of Amazon and Google data-centers
 157 [17:36] <kim0> indeed the hardware and software involved can become quite involved
 158 [17:36] <kim0> requiring teams of highly skilled unix geeks to keep up and running
 159 [17:37] <kim0> you can start small .. UEC for example can be run on only 2 machines
 160 [17:37] <kim0> or with some hacks .. even just one machine
 161 [17:37] <kim0> and grow your infrastructure as much as you want
 162 [17:37] <ClassBot> kstailey_ asked: does it make sense to run PaaS on Iaas?
 163 [17:38] <kim0> Good question
 164 [17:38] <kim0> It makes sense to me
 165 [17:38] <kim0> The most popular PaaS platforms are however proprietary
 166 [17:38] <kim0> for example .. the Google App Engine code is closed AFAIK
 167 [17:39] <kim0> if it were open .. you could definitely get it running over IaaS
 168 [17:39] <kim0> after all .. it needs to run over something
 169 [17:39] <kim0> there definitely are some smaller PaaS frameworks that you can start using
 170 [17:39] <kim0> I remember coding against a framework called web2py
 171 [17:39] <kim0> which could either be deployed locally
 172 [17:39] <kim0> OR could be deployed to run over google app engine
 173 [17:40] <kim0> such solutions may be a good starting points to avoid vendor lockin
 174 [17:40] <ClassBot> komputes asked: This all sounds great but how does one do this virtual datacenter expantion with minimum development knowledge?
 175 [17:41] <kim0> Not sure if "development" in your question means linux sysadmin knowledge or actually development knowledge writing your app
 176 [17:42] <kim0> with APIs .. you basically can create a virtual data-center
 177 [17:42] <kim0> without too much IT infrastructure knowledge
 178 [17:42] <kim0> i.e. without much knowledge of servers, storage, networking ...etc
 179 [17:42] <kim0> an application developer can get by perhaps without a Linux admin at all
 180 [17:42] <kim0> however .. ofcourse you still need app development skills to run your app
 181 [17:43] <kim0> even more so .. to create an app that can be scaled to take advantage of the cloud
 182 [17:43] <ClassBot> komputes asked: Is there a pre-built solution for using a cloud as a remote desktop middle-man (i.e. I want to support grandma but both of us are behind a firewalls and both ends can't port forward - not admin)
 183 [17:44] <kim0> I don't think you need a cloud for that .. you can use applications like TeamViewer or logmein (free but not foss)
 184 [17:44] <kim0> although you could write your own app if you wanted to of course
 185 [17:44] <ClassBot> kstailey_ asked: how long before we see Ubuntu switch to OpenStack?
 186 [17:45] <kim0> UEC is built on top of the best open source cloud technologies
 187 [17:45] <kim0> at the moment .. that is Eucalyptus
 188 [17:45] <kim0> openstack is a fine piece of evolving technology though
 189 [17:45] <kim0> it's already in maverick universe .. so you can go ahead and play with it
 190 [17:46] <kim0> we're kinda running out of time
 191 [17:46] <kim0> just wanted to mention a couple of killer cloud use cases
 192 [17:46] <kim0> If your application load varies significantly (top load / least load > 10)
 193 [17:46] <kim0> then you most likely will benefit from running your load over a cloud
 194 [17:46] <kim0> examples
 195 [17:46] <kim0> The Washington Post: 200 EC2 instances (1,407 server hours), convert 17,481 pages of Hillary Clinton’s travel documents within 9 hours
 196 [17:47] <kim0> The New York Times used 100 Amazon EC2 instances + Hadoop application to recognize 4TB of raw  TIFF image into 1.1 million PDFs in 24 hours ($240) 
 197 [17:47] <kim0> Okay
 198 [17:47] <kim0> so let's start with a quick demo
 199 [17:47] <kim0> which I hope is going to actually work :)
 200 [17:47] <kim0> In this demo we will use Amazon's EC2 cloud
 201 [17:47] <kim0> we will launch Ubuntu server
 202 [17:48] <kim0> Note that
 203 [17:48] <kim0> if you want to experience Ubuntu server over EC2 cloud yourself
 204 [17:48] <kim0> You can
 205 [17:48] <kim0> For Free !
 206 [17:48] <kim0> Well actually Canonical pays for you
 207 [17:48] <kim0> You can run it for an hour
 208 [17:48] <kim0> by visiting http://10.cloud.ubuntu.com
 209 === [[NEO]] is now known as Neo31
 210 [17:50] <kim0> The first thing is identifying
 211 [17:50] <kim0> which Ubuntu server you want to run
 212 [17:50] <kim0> you can do so by visiting
 213 [17:50] <kim0> http://uec-images.ubuntu.com/releases/maverick/release/
 214 [17:50] <kim0> or you can replace maverick by any other release name
 215 [17:50] <kim0> You can pick any AMI you want
 216 [17:50] <kim0> AMI = Amazon Machine Image
 217 [17:51] <ClassBot> There are 10 minutes remaining in the current session.
 218 [17:51] <kim0> basically a blueprint/template of the virtual server you will start
 219 [17:51] <kim0> assuming you have the ec2 tools setup correctly
 220 [17:51] <kim0> You can create and launch your server with one command like
 221 [17:51] <kim0> ec2-run-instances ami-508c7839 --instance-type t1.micro --region us-east-1 -k MyEC2Key --user-data-file=cloudinit.txt
 222 [17:51] <kim0> ami-508c7839 : Is the AMI we chose
 223 [17:52] <kim0> t1.micro = is the smallest machine Amazon provides
 224 [17:52] <kim0> MyEC2Key: Is my private key (my password if you will)
 225 [17:52] <kim0> cloudinit.txt :
 226 [17:52] <kim0> That is one interesting feature of Ubuntu in the cloud
 227 [17:52] <kim0> cloud-init is a feature which allows the VM to automatically customizes itself
 228 [17:53] <kim0> as it boots
 229 [17:53] <kim0> i.e. you can tell the machine
 230 [17:53] <kim0> to upgrade all software (apt-get upgrade)
 231 [17:53] <kim0> and install apache2
 232 [17:53] <kim0> all while booting
 233 [17:54] <kim0> Take a look at
 234 [17:54] <kim0> http://paste.ubuntu.com/512497/
 235 [17:54] <kim0> Which shows the cloud-init file I am using
 236 [17:54] <kim0> This file ensures that
 237 [17:54] <kim0> the VM upgrades itself
 238 [17:54] <kim0> runs byobu
 239 [17:54] <kim0> imports my ssh public key from launchpad!
 240 [17:55] <kim0> automatically so I can login
 241 [17:55] <kim0> installs apache
 242 [17:55] <kim0> and runs some commands at machine boot time
 243 [17:55] <kim0> this is of course awesome
 244 [17:55] <kim0> since all your servers launch from the same template
 245 [17:55] <kim0> you need a way to customize them
 246 [17:55] <kim0> into their respective roles
 247 [17:55] <kim0> and cloud-init does just that
 248 [17:55] <ClassBot> There are 5 minutes remaining in the current session.
 249 [17:56] <kim0> If you visit
 250 [17:56] <kim0> http://typewith.me/Eip1j21bJ3
 251 [17:56] <kim0> I will  paste the command output interactively
 252 [17:57] <kim0> The bold text ,, is called the machine ID
 253 [17:57] <kim0> Now my server has been created
 254 [17:58] <kim0> I ran describe instances
 255 [17:58] <kim0> this gets me the public name
 256 [17:58] <kim0> of my server
 257 [17:58] <kim0> if you visit that
 258 [17:58] <kim0> there should be apache
 259 [17:58] <kim0> http://ec2-184-72-172-83.compute-1.amazonaws.com/
 260 [17:58] <kim0> Indeed .. it works!
 261 [17:58] <kim0> that's how easy it is
 262 [17:59] <kim0> to deploy an ubuntu server with a customized apache running on it
 263 [17:59] <kim0> sorry folks if we're running out of time
 264 [18:00] <kim0> one final thing I wanna show you
 265 [18:00] <kim0> is the logs of the machine
 266 [18:00] <kim0> http://paste.ubuntu.com/512499/
 267 [18:00] <kim0> notice how cloud-init has customized the server
 268 === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || UOW Survey: http://is.gd/fZlwL || Event: Ubuntu Open Week - Current Session: Deploying Web Applications in the Cloud - Instructors: kirkland
 269 [18:01] <kim0> upgraded it and installed apache

MeetingLogs/openweekMaverick/IntrotoUbuntuandCloud (last edited 2010-10-15 01:40:08 by ABTS-KK-dynamic-251)