Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Ahmed Kamal: PointnClick guide to running Ubuntu in the cloud

$
0
0
My previous post about running uec on ec2, drew some comments as being a fairly complex process. That may be true because essentially you're attempting to hack together a configuration which is not entirely supported. Anyway, that led me to want to demo a "point-n-clink" guide to running your first Ubuntu server in the EC2 cloud. i.e. no command line allowed, just point and click :) It doesn't get any easier than this, so let's hit it

Assuming you have setup an account with Amazon and could login to the Amazon console, you should see
pointnclick-guide-ubuntinthecloud-1

Before we begin, let's set ourselves a "key-pair". Which is basically a ssh public/private key-pair that enables you to login to your instance once launched. Click on "Key Pairs" and click "Create key pair", I'm gonna name my key "ubuntu" and click create

pointnclick-guide-ubuntinthecloud-2

The key is promptly created and pushed for download through your browser. Let's proceed with another "preparatory" setup. By default, EC2's firewall denies all inbound traffic to the instance, which means you cannot even ssh into your instance. Let's open ports 22 for ssh, and 80 just in case we wanna test by running an apache2 server. So, add your from-to ports and source IPs as per the next screenshot and "Save" it

pointnclick-guide-ubuntinthecloud-3

Great, now we're ready to actually launch an instance. Click "EC2 Dashboard" link, click the button "Launch Instance", a wizard starts asking for which AMI we would like to use. An AMI is a template that will be copied to your instance and used to start it. Click "Community AMIs", it may take a moment for the AMIs to load. Now here's a trick, to quickly "zoom-in" on the official ubuntu AMIs, use the following search string "ubuntu-images/" in order to locate EBS based images, and "ubuntu-images-us/" in order to locate instance store based images. This is in no way a "supported" feature of neither Amazon nor Ubuntu, it's just a convenient hack that works today and may not work tomorrow. We choose an EBS based AMI because we plan on launching a micro instance and those require EBS AMIs

pointnclick-guide-ubuntinthecloud-4

click the "Select" button beside it. Click continue and choose a t1.micro instance and click continue a couple of times

pointnclick-guide-ubuntinthecloud-5

pointnclick-guide-ubuntinthecloud-6

pointnclick-guide-ubuntinthecloud-7

You're now on the key-pair page, we simply choose our previously generated "Ubuntu" key pair and click continue

pointnclick-guide-ubuntinthecloud-8

On the firewall configuration page, we choose the "default" security group, since this is what we had configured to open ports 22 and 80 previously

pointnclick-guide-ubuntinthecloud-9

Voila, we're ready. Review and confirm the settings on the page and click "Launch"

pointnclick-guide-ubuntinthecloud-10

The cloud starts deploying your virtual server and you get the following message

pointnclick-guide-ubuntinthecloud-11

In a minute your instance should be up and running. Let's locate it and login to it. Clicking the "Instances" link, then clicking our only instance so far and locating its "Public DNS" entry setting allows us to ssh to it

pointnclick-guide-ubuntinthecloud-12

Now we're all set, let's jump to our terminal to ssh into the instance. It seems the "ubuntu.pem" key-pair the browser downloaded gets by default permissions that are too open for ssh's taste. Thus we need to "chmod" it to 700, this is the part where I lied about not using any CLI, but hey chmod doesn't really count ;) let's then ssh straight into our instance using the ubuntu.pem key-pair

pointnclick-guide-ubuntinthecloud-13

Awesome! We're in! let's do what the greeting message tells us to "sudo tasksel --section server" and choose to install a LAMP Server. We get asked for a MySQL password twice, the system installs and configures a full LAMP stack for us. Let's visit the apache web server

pointnclick-guide-ubuntinthecloud-14

That concludes this graphical guide. As you can see launching your first Ubuntu server instance in the cloud can't really get much easier than this :) Before you go for a cup of coffee, do not forget to "Terminate" your instance. If you don't, you keep on getting billed by the hour for it.

pointnclick-guide-ubuntinthecloud-15

Let me know in the comments if a step was unclear. Also, let me know if there are other topics you'd want me to demo. If you're interested in running Ubuntu in a cloud context and have any doubts, drop by on IRC channel #ubuntu-cloud on freenode, and grab me "kim0"

Viewing all articles
Browse latest Browse all 17727

Trending Articles