Last update: 6/13/2012; 11:25:36 AM.
spacer

spacer Intro spacer

spacer spacer Most people think they can't run a server, but servers aren't any more complicated than a laptop. The main difference is that a server is always on and always connected to the Internet.

spacer EC2 for Poets is a tutorial that shows you how to set up a server in Amazon's "cloud." All you need is a net connection, credit card, and a basic understanding of how to use computers.

spacer Initially, the goal for EC2 for Poets was to make cloud computing less mysterious by helping people get through the process of setting up a server on Amazon EC2. The newest version is more than an experiment, it's a platform for applications. We're starting with the RIver2 news aggregator, an app that reads RSS feeds you're subscribed to every ten minutes and posts the new items at the top of the list. It's also a podcatcher and a photo aggregator, supports realtime updating and OPML reading lists.

spacer And there are more apps you can install after getting your river up and running. A simple linkblogging tool. A photo archiver. An outline-based document management and collaborative system.

spacer Each app is an instrument, together they form a symphony. The theme: A distributed publishing system operated by its users. This is, imho, the holy grail of the Internet. The goal we're all marching towards. With EC2 for Poets, we're getting closer.

spacer The key idea is "operated by its users." Engineers mystify what they do, as a form of job security. Eventually people figure it out. EC2 for Poets moves in that direction. For some people it will be the Aha that helps them see how the net works.

spacer This is also, I hope, a foundation for journalism and computer science students to lead their respective professions to the news system of the future. And users who are empowered to solve problems for themselves instead of waiting for experts or gatekeepers to do it.

spacer The first version of this tutorial was written in Berkeley, CA in March 2009 and was revised in January 2011, September 2011 and April 2012.

spacer Dave Winer
New York, NY

spacer PS: This howto was announced on March 21, 2009 with a 22-minute podcast. Even if you don't install the server, it might be useful to listen to the podcast to get an idea of why this may turn out to be important.

spacer PPS: The title derives from a class that was offered at the University of Wisconsin when I was a grad student there called Computer Science for Poets.

spacer Creating a server on Amazon EC2 spacer

spacer There's this great service called EC2 run by Amazon, the same Amazon you can buy books and refrigerators from.

spacer EC2 allows you to create your own server in Amazon's server farm located somewhere "up there" in the clouds. It could be in Montana or New Jersey or Europe. You don't have to know or care where the server is.

spacer You also don't have to talk to anyone to create a server. And when you're done with it, just shut it off. You only pay for what you use. And it doesn't cost very much. If you run a server for 8 hours it costs about $1. Update: For some people it's free for a year!

spacer If you've ever purchased anything at Amazon, you're all set. And if you haven't, all you need is a credit card.

spacer I think any reasonably knowledgeable user could set up a server this way. You might have to scratch your head, or read the instructions two or three times to get past the hardest parts. But you don't have to be an math major to pull it off. That's why it's called EC2 for Poets. :-)

spacer For people who are new to computers, this head-scratching, stare-at-the-computer process is very much part of how computers work, for all of us. No matter how long you've been doing it. It's one of the fundamental lessons of science, I think -- anything worth learning is hard. Even the simplest things sometimes, amazingly, take a long time to penetrate our thick skulls. That's why learning can be so satisfying.

spacer BTW, I don't own any Amazon stock, and I don't make any money when you set up a server. I just feel this is a basic skill any technical user should have. It will change the way you think about computing. I'm sure of it.

spacer One more thing -- Ken Sedgwick blazed this trail. He wrote an initial howto which I expanded on in this piece. Thanks Ken!

spacer Requirements spacer

spacer 1. An account at Amazon.

spacer 2. A desktop or laptop computer, probably running Windows or Macintosh.

spacer 3. Anywhere from 10 minutes to an hour.

spacer A Hello World server spacer

spacer In this experiment we'll start up a server that you can access over the Internet that will display Hello World and the current time on the server. You can refresh the page as many times as you like.

spacer From there, I will show you how to install the River2 aggregator.

spacer Sign up for AWS spacer

spacer AWS stands for Amazon Web Services. It's an umbrella term that stands for all the services Amazon provides, like EC2. In order to set up your own server, you need to sign up for AWS.

spacer To do so, go here: aws.amazon.com/ -- in the upper-right corner you'll see a yellow widget that says Sign Up Now. Click it. It'll ask for your email address and Amazon password, as if you were buying a book or shirt.

spacer Unfortunately I can't tell you about the next page, since I can't see it. I have already signed up for AWS. Hopefully it's not too confusing. If you have trouble, grab a screen shot and post it in a comment and we'll try to help out.

spacer Sign up for S3 and EC2 spacer

spacer After signing up for AWS, you must also sign up for S3 (the storage system) and EC2 (to create servers).

spacer 1. To sign up for S3 go here.

spacer 2. For EC2 go here.

spacer Create a key-pair spacer

spacer Now we're going into the cloud. This is where you start to get god-like powers. :-)

spacer 1. Open the Amazon EC2 Console Dashboard. You might want to bookmark this in your browser.

spacer 2. In the upper right corner is a panel called "My Resources" that lists the number of Running Instances, EBS Volumes, Key Pairs, Elastic IPs, etc. These are fancy names for computer stuff that aren't actually that complicated.

spacer 3. Click on Key Pairs. You should see an empty list.

spacer 4. Click on the Create Key Pair button. A dialog pops up asking for the name. Enter the name of a place, like Tahoe. Click the Create button.

spacer 5. Now something interesting happens. It wants to save a file on your computer. This file is a key that unlocks all the web services. Without this file you get nothing. With it you get everything. So you obviously want to put this in a safe place and take good care of it.

spacer Although your Key Pair file has a fancy .pem extension, it's really just a text file. You can store it anywhere on your system. Later in this tutorial, you'll open it with a text editor, such as Notepad on Windows or TextEdit on the Mac.

spacer Create a security group spacer

spacer A security group is like the firewall in your operating system or router. It says what kinds of Internet messages can pass through to your server, and what kinds will be rejected.

spacer 1. In the left margin of the dashboard, click on the Security Groups link.

spacer 2. Click on Create Security Group near the top of the screen.

spacer 3. A dialog appears, asking for a group name and description. You can call it whatever you want, I called mine "default" and described it as "Server firewall settings."

spacer 4. Click Create in the dialog.

spacer 5. You should see your security group in the list. Click on it.

spacer 6. In the lower portion of the screen you should see information about your security group, with two panes: Details and Inbound. Click on Inbound.

spacer 7. You should see a popup menu that includes a list of Internet protocols. Choose HTTP. Click the Add Rule button. An item is added to the right side of the panel. Do the same for HTTPS and RDP; allowing your server to receive secure HTTP requests, control the server using Remote Desktop Connection on the Mac or Windows.

spacer 8. When you're done, click the Apply Rule Changes button.

spacer Be sure you're in the US East spacer

spacer In the next step you will not be able to find my AMI unless you tell Amazon you're in the US East region.

spacer So, before proceeding, look in the upper-left corner of the console, click on the popup and choose US East (Virginia). Screen shot.

spacer This will cause the new instance to be created on a server in Virginia.

spacer Launch your server spacer

spacer Now it's time to create your virtual machine and launch it.

spacer 1. In the left margin of the dashboard, click on the AMIs link. You should see a popup menu in the upper left corner of the panel. Choose Public Images from the popup. It might take a few seconds for the list to appear (there are a lot of public images).

spacer 2. Type ec2ForPoets28 in the little search box near the top of the screen. A single item should show up in the list. Click on the checkbox next to its name.

spacer 3. Click the Launch button near the top of the screen.

spacer 4. A big dialog appears.

spacer 5. Set Number of Instances to 1 (it should be the default).

spacer 6. Change the Instance Type to Micro (t1.micro, 613 MB). Leave the Availability Zone choice on No Preference.

spacer 7. Click Continue to get to the next dialog. You can accept the defaults. Click Continue.

spacer 8. This is where you give your instance a name. It's like naming a cat. Pick something fun and memorable. (I named mine Einstein.)

spacer 9. Click Continue to get to the next dialog, where you choose the Key Pair. Click the radio button next to Choose from your existing Key Pairs, and then choose the one you created earlier in the popup menu. (We called our example Tahoe.)

spacer 10. Click Continue to get to the next dialog. Click the radio button next to Choose one or more of your existing Security Groups, and then select the default Security Group.

spacer 11. The final dialog in the sequence appears, summarizing the choices you made. If everything looks okay, click the Launch button at the bottom of the dialog. Pause for a moment to consider your accomplishment. You are now a Cloud Computing Expert. :-)

spacer 12. In the left margin of the dashboard, click Instances. You should see a single entry whose status is "starting." We're now waiting for it to change to "running." This could take as much as 10 or 15 minutes, depending on how busy the angels and elves at Amazon are.

spacer Notes...

spacer Later if you want to go "shopping" for other AMIs, Amazon maintains a directory that's a bit like shopping for iPods or books, of popular AMIs. Too bad they don't offer the same reviewing options as they do for consumer products. (Consider this a feature request.)

spacer In putting together the sample server for this tutorial, I started with Amazon's Basic Microsoft Windows Server 2003 AMI with none of the frills.

spacer Find or download Remote Desktop Connection spacer

spacer Remote Desktop Connection, or RDC, is an application for Windows or Mac that allows you to control a remote server like the one you just launched.

spacer If you're using a Windows machine, RDC is in the Start Menu, Programs, Accessories.

spacer If you're using a Mac, you can download the app from Microsoft.

spacer Update: An even better choice for Mac users is the open source CoRD app. It's better at managing more than one server at a time, and just plain better than the Microsoft app, which is showing clear signs of age. Plus you don't have to install Rosetta to use CoRD.

spacer Wake the server up spacer

spacer Wait as much as 15 or 20 minutes for the status of the server in the Instances panel to change from "starting" to "running." Now we just have to kick it in the butt to get the server software launched. You do that by logging in the first time.

spacer 1. First, locate the Key-Pair file (mine is call

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.