Quickstarting OE

From Chumby Wiki
Revision as of 11:17, 13 April 2011 by Bunnie (Talk | contribs)

Jump to: navigation, search

Background

Amazon offers pay-as-you-use cloud servers. You can attach disks to virtual machines just like you would a physical machine. Disk images can be shared between users, and they are identified by a number knows as an "AMI".

Chumby has pre-built an OE image, so that all of the packages are resident and built, thus allowing you to get started on developing your application right away, without having to spend hours configuring and downloading the source code for the entire universe. You can use these AMIs as a starting point for development; and if you mess up, you can always restart the instance from a fresh image again (but back up your changes before you do that!).

Amazon offers several tiers of machines, with varying prices http://aws.amazon.com/ec2/pricing/. We recommend using a "medium high-CPU" or "small" instance type, which cost $0.17 and $0.085 per hour, respectively (pricing as of April 2011). Building is a very CPU and memory-intensive task, and on a "medium high-CPU" instance, a full build from clean takes 6 hours to complete.

Amazon also offers a free "micro" tier, but there are a number of restrictions on it, including a very tight 600 MB RAM limit, and a 10 GB EBS disk limit. Open embedded barely fits in a 10GB EBS volume, and in fact will not build from clean in 600 MB of RAM. However, we offer the pre-built image for micro tiers for users who just want to evaluate the solution to see if this is something they want to pay for. On a micro tier you can build a couple small packages and re-create images, sufficient for a quick hack or evaluation, but we do not recommend doing serious development on a micro instance.

The AMI for an EBS image with 30GB of space (enough to build a large number of packages, but not eligible for the free tier) is ami-840871d6.

The AMI for an EBS image with 10GB of space (eligible for free tier but not a lot of space to build) is ami-ee176ebc.

How to create an instance

First, register for the Amazon EC2 service http://aws-portal.amazon.com/gp/aws/developer/subscription/index.html?productCode=AmazonEC2. The process is fairly self-explanatory, and they do require a credit card to register. I believe you can even link this to an existing consumer/personal Amazon account, but we haven't tested this.

You will be asked to make a key pair for yourself, certificates, and so forth; save them, as you will need the key pair to log into your instance.

Once you are approved for an account, you will see a console similar to the following: instance_dashboard.png

Before moving forward, click on Security Groups and enable ssh: security_group.png

Now, click on Launch Instance, and do the following:

  1. Click on community AMIs and enter the AMI number. Note that it can take up to a couple of minutes for the community AMI list to load, so be patient -- the UI gives no hint of the loading process, so it's easy to think nothing was found. screenshot http://files.chumby.com/bunnie/oe/request_instance0.png
  2. Select your instance type. screenshot http://files.chumby.com/bunnie/oe/request_instance1.png
  3. Configure your instance details. I typically turn on termination protection, but here you can also map a new kernel to the device, if you need to do so. Sometimes I find I have to enter an explicit kernel ID, especially if after you start the instance nothing seems to happen. The default kernel ID is aki-13d5aa41 for both images, in case you need it. screenshot http://files.chumby.com/bunnie/oe/request_instance2.png
  4. Give your instance a name. screenshot http://files.chumby.com/bunnie/oe/request_instance3.png
  5. Pick your key pair. I can't test this theory because I only have one account, but I believe the keypair you generated when you created your amazon account should be usable, and you don't need the keypair that I made with the instance. screenshot http://files.chumby.com/bunnie/oe/request_instance4.png
  6. Pick your security group -- default should be okay (assuming you enabled ssh access; your "new" account has all access shut off)
  7. Launch the instance! screenshot http://files.chumby.com/bunnie/oe/request_instance5.png
  8. Go back to the dashboard, and wait until the instance is running. Right click on the instance, and select connect. It will give you detailed instructions on how to connect. Note that the DNS mapping of your instance changes every time you restart it, but you can use elastic IP to make it fixed (at a charge!). screenshot http://files.chumby.com/bunnie/oe/connect.png
  9. Finally, log in with the username "ubuntu". No password is needed, since you are already validated through the key pair. "ubuntu" has sudo privileges as well, so protect your keypair! screenshot http://files.chumby.com/bunnie/oe/connect.png

Once you are logged in, there is a readme.txt that will help guide you through the rest.