Tag Archives: amazon

Of cloud and factories

The most common metaphor for cloud computing is that it’s like your electric power company. Flick the switch on, log in to your cloud service, pay for what you use, log out, flick the switch off, go to sleep. Well, it’s a bit more complicated that that.

Power companies offer a single product: Electric Power. How many variations are there? Compare them to the myriad cloud offerings: Infrastructure as a service (virtual machines, Windows or Linux), Storage as a service (online, backup, archiving), Software (everything). To me, it looks more like manufacturing and selaling cars. And the cloud business has striking similarities to car manufacturing: Just assume that every car manufactured and sold is a month of a cloud service – any kind cloud service. What are the analogies?

  1. The infrastructure that powers a cloud service is like a car factory. There is an assembly line, pumping out a particular car model/cloud service. In both cases, the product is as good as the materials it’s made of and the quality of the manufacturing process. Also, the pricing catalog varies accordingly.
  2. Cars shipped out of the factory need an extended and reliable transport network, like rail, ports, RORO ships and so on. The same is true with cloud services: Since they are delivered over the Internet, cloud providers need multihoming (peering with at least two Tier-1 or Tier-2 providers), low latency and high bandwidth.
  3. Economies of scale and just in time production: The more cars you build and sell, the cheaper they are. Same thing with cloud services (Amazon Web Services). Also, adding more capacity as you grow is the only sustainable model for cloud providers – the analogy in the car industry is just in time production.
  4. Go to market: Building a cloud service is one thing, selling it is another. All car brands have an extensive network of resellers and dealers, cloud service providers rely also on partners and heavy Internet advertising and market awareness to bring in the sales volume to sustain their business. And volume is key to cloud services, just as it is in the car industry.
  5. Product qualities: Cars come in all sizes, shapes, colours, equipment. The same applies to cloud services. They all look alike (for example, all cloud service providers offer Windows servers), they do the same job, but what really matters is performance, capacity and reliability. What qualities would you look for if you were on the market for a new car?
  6. Common technology: Have you opened the hood of an Audi, Skoda, VW and Seat? The mechanics are the same, but the badges are different. Moreover, three technologies (soon to be four) power all cars on the globe: Gasoline, Diesel, hybrid (and electric in a few years from now). Guess what, it’s the same with cloud computing. There are only a handful of hypervisors and automation platforms that power most cloud service providers, yet, every provider has their own look and feel.

The perfect analogy would be the factory this gentleman used to run:

A quick spin of Amazon EC2

This is my version of how-to-create-an-EC2-instance-with-pictures. Users of Amazon AWS stuff will find these trivial, others are welcome to see how to create your own little virtual servers in Amazon’s (non-free) cloud infrastructure.

The first thing you need to do, is of course to sign up to Amazon AWS. Point your browser to aws.amazon.com and click on the “Sign in to the AWS Management Console” link (top right). Creating an account is trivial, except that you have to enter your credit card number and a valid telephone number. The credit card number is mandatory (you have to be billed somehow to use AWS); the phone number will be used for Amazon’s automated billing service to literally give you a call and ask you to enter the four digit random challenge number that will show up on your browser. So, enter a valid phone number in a nearby phone, wait for it to ring, type the number and your account is created.

After that, you are a customer of Amazon Web Services. You will now be transferred to the AWS console, which looks like this:

The tabs at the top are all Amazon services available to customers. From here, you can create virtual machines, use elastic storage services, change networking rules, use platform tools and virtually run your own (virtual) datacenter from your browser. The limit is your wallet.

Before creating any resources, it is vital to do some geeky stuff, like downloading Amazon’s command line tools. Ubuntu people can do that like this:

# apt-get install ec2-api-tools

EC2 tools allow creation and management of AWS on the fly. They are front-end utilities to Amazon’s web services API, which is well documented and open, allowing Amazon customers to develop own applications and frameworks that directly interact with the AWS cloud. To make the EC2 API tools work, you need to take a few extra steps. Accessing the AWS API is not done via a password, but by using two authentication methods: A symmetric key to access  REST & query APIs and your personal X.509 certificate and private key signed by Amazon. These are used to make use of their SOAP web services API. Download them (.pem files) and store them in at least two safe locations. Note: The private key is generated only once. Amazon will not keep a copy; if you lose it, it is impossible to use the web services API again and you have to generate a new one.

In addition to the above, you will also need a keypair to log in to your instance. And now that you have your certificate and keys, you can fire up the console and start creating your own virtual servers. The easiest way is to select any of the offered, preconfigured Amazon Machine Images (AMI) that are available:

Amazon offers two free, no-cost (really really small…) Linux images and many more, with all sorts of operating systems (including Microsoft Windows) and middleware preinstalled. The AMI marketplace is growing, with images submitted from all major software vendors.

The customization options of your virtual server will look familiar to Xen and vCenter users (selection of memory, disk, CPUs etc), with the extra option of network parameters, like configuring access ports:

Firewall configuration

By default for a Linux AMI only SSH (port 22) is available. The next step is to start your virtual server. Select your instance and from the “Instance Actions” menu select “Start”. Wait a couple of minutes for EC2 and EBS to provision your virtual server, add another minute for booting and your machine comes to life:

Something that Xen and vCenter users would expect to be there and is not: The console. AWS does not provide (at this time) a console window where you can see your server booting up and running; rather, you have to wait until SSH (or RDP for Windows VMs) starts up. Then you can login like this:

SSH into your AMI instance

Remember what we said about keys? There is no password to log in via SSH, you have to use they keypair you have downloaded earlier. As soon as you log in, you can sudo to root (no password required) and configure your virtual server the way you like.

Apart from starting and stopping your virtual server, the AWS console allows you to create and restore disk snapshots, like this:

…and retrieve detailed report usage reports in CSV and XML format:

…and have a 10,000ft view of AWS status:

Many more features and services are available: S3 storage services, purpose-built AMIs, load balancers, CloudFront services, network latency and bandwidth options, all are available for a price, summarized in a single page:

That’s what true IaaS looks like. Signing up, creating a VM and bringing it up and live on the Internet does not take more than 15 minutes. The underlying infrastructure is massive and in constant development for close to 5 years now, yet, mature enough to be used from all kinds of customers, from freelancers up to large enterprises.