One of the great features of Amazon EC2 is the possibility to dynamically query and use instance specific metadata, or even custom data. This can be useful for various reasons, and the greatest advantage I’ve personally seen into this, is the possibility to allow the instance to have some information on how to configure itself when first booting (using chef or puppet, or some other configuration management tool).
The Amazon documentation explains how to get this information, basically just by using simple http get requests on the ip: 169.254.169.254, like for ex (for the metadata index):
curl http://169.254.169.254/latest/meta-data/
or for the custom data:
curl http://169.254.169.254/latest/user-data
Eucalyptus supports this great feature (starting with v1.4), but we obviously need to target a different ip to retrieve this information (as the amazon ip has nothing to do with our internal cloud
). We need to use the cloud controller IP for the request and the port it is bound (by default 8773 if you have not changed it). This will look like this (you need to run it from inside the actual instance): Read the rest of this entry »
Tags: amazon, ami, aws, ec2, emi, eucalyptus
A while ago one of the major problems people faced to use Amazon EC2 into production environments was the dynamic state of the instances IPs. Every time one instance was started it was getting a new, dynamic IP. This has been addressed with the introduction of Amazon Elastic IP Addresses, but even when using this, the private IPs are still dynamic and most of the time people will want to communicate between several instances on the private allocated IPs and not on the public ones. This article will show how you can easily automate the process to update DNS hostnames for your EC2 instances, by adding to the AMI’s the logic for this. I will use for this a master DNS server running bind9, but this can be adapted to any other DNS server. Read the rest of this entry »
Tags: amazon, ami, aws, dns, dnsutils, ec2
Ubuntu released official images for Amazon EC2 for Intrepid (8.10) and Hardy (8.04) releases (not Jaunty image yet). These are server edition images. I’ve always used the great alestic ec2 images created by Eric Hammond for any Ubuntu or Debian release I needed in the past and was very happy with the quality of the images Eric maintained. This was also seen by the Ubuntu team and they worked with Eric to create their official images with the same quality and most of the features of what most people were used for Ubuntu images so far in EC2 world.
In my opinion here are the advantages of the newly released official Ubuntu images:
- officially support by Canonical (Eric has done a great job in patching and updating his images, but I am sure he has better things to do and let the Ubuntu team do this).
- custom kernels: for Intrepid 2.6.27 and Hardy 2.6.24 by having Amazon support in doing this (while alestic images were using the default Amazon Fedora kernel 2.6.21 image).
- apt mirrors in the ec2 cloud provided by Ubuntu: us.ec2.archive.ubuntu.com and eu.ec2.archive.ubuntu.com
- RightScale support for advanced integration with the RightScale platform for RightScale users.
Read the rest of this entry »
Tags: amazon, ami, ec2, Ubuntu