background preloader

Blogs

Facebook Twitter

Building EBS Boot and S3 Based AMIs for EC2 with Ubuntu vmbuilder. Here’s my current recipe for how to build an Ubuntu 9.10 Karmic AMI, either the new EBS boot or the standard S3 based, using the Ubuntu vmbuilder software. The Ubuntu vmbuilder utility replaces ec2ubuntu-build-ami for building EC2 images and it can build images for a number of other virtual machine formats as well.

There is a lot of room for simplification and scripting in the following instructions, but I figured I’d publish what is working now so others can take advantage of the research to date. Happy New Year! Some sections are marked [For EBS boot AMI] or [For S3 based AMI] and should only be followed when you are building that type of AMI. The rest of the sections apply to either type. Run an instance of Ubuntu 9.10 Karmic AMI, either 32-bit or 64-bit depending on which architecture AMI you wish to build. In the above instructions I stray a bit from the defaults. I also set /mnt to the first ephemeral store on the instance even on EBS boot AMIs. A Fabric script for striping EBS volumes. Here's a short Fabric script which might be useful to people who need to stripe EBS volumes in Amazon EC2. Striping is recommended if you want to improve the I/O of your EBS-based volumes. However, striping won't help if one of the member EBS volumes goes AWOL or suffers performance issues.

In any case, here's the Fabric script: That's it. Hopefully it will be useful to somebody out there. d2fijcgs9oegyr.cloudfront.net/How to Convert S3-Backed Windows AMIs to EBS-Backed AMIs.pdf. Amazon Elastic Load Balancer Setup | SerkTools. May 20th, 2009 As I previously wrote about, Amazon announced a load balancing solution called Elastic Load Balancer. While this may prove to be a great addition to AWS currently none of the GUI tools (including the AWS Console provided by Amazon) have built in functionality to create ELB instances. So I became motivated to finally get comfortable with the EC2 API, allowing me to call EC2 commands from my windows command line. I wrote a post detailing how to setup your command line environment for the EC2 API here. Now armed with a load balancing solution and a working windows command line I wanted to delve into ELB and see what it has to offer. ELB Documentation Amazon Web Services in general has excellent documentation. ELB Architecture First a quick overview of the architecture of ELB.

As we can see from the diagram the load balancer directs traffic to different instances, even across different availability zones. Creating ELB Instance Create CNAME Record for ELB Instance HTTP vs HTTPS. EC2 SQL Server backup strategies and tactics | Randoom. The many backup modes offered by Microsoft SQL server, combined with the prodigious hardware options offered on Amazon EC2 can make choosing a backup strategy for your setup a little confusing. In this post, I’ll sketch some options and end with a simple PowerShell script usable on both Express and Standard versions, that’ll backup your database to S3. To start with, you should probably be running your database off an EBS (Elastic Block Storage) volume.

They can sustain many more random IOPS than instance disks (good for typical workloads) and they live independently of your instances. While i haven’t had an instance die from under me, if one should cop it, all data on the local disks will be gone-gone. EBS volumes can fail too however, and will do se at an annualised rate of 0.1% to 0.5% according to Amazon. A simple approach is to use the snapshotting feature of EBS. Another option is to do normal backups to another EBS volume mounted on the same instance. Script is included below. Blog: Benchmarking of EC2's new Cluster Compute Instance Type. Two months ago Amazon Web Services released a new "Cluster Compute" EC2 instance type, the cc.4xlarge. This new instance type is targeted for High-Performance Computing (HPC) such as computationally intensive scientific applications. The major differences between this and other EC2 instance types are: Dual quad core "Nehalem" X5570 2.93 processors: compared with X5550 2.67 processors for the next largest m2 instance types.

Amazon states this CPU configuration provides 33.5 ECU (EC2 Compute Units) compared with 26 ECUs for their m2.4xlarge instance type (previously the largest instance type) Hardware-Assisted Virtualization (HVM): compared with paravirtualization used by other instance types Multi-node 10 Gbps clustering capabilities: instances can be deployed to separate "Placement Groups" wherein each such group has non-blocking, low latency 10 Gbps network connectivity The new cluster compute instance type is currently only available in Amazon's US-East region. CPU Performance. Increasing Root Disk Size of an "EBS Boot" AMI on EC2.

This article is about running a new EC2 instance with a larger boot volume than the default. You can also resize a running EC2 instance. Amazon EC2’s new EBS Boot feature not only provides persistent root disks for instances, but also supports root disks larger than the previous limit of 10GB under S3 based AMIs. Since EBS boot AMIs are implemented by creating a snapshot, the AMI publisher controls the default size of the root disk through the size of the snapshot.

There are a number of factors which go into deciding the default root disk size of an EBS boot AMI and some of them conflict. On the one hand, you want to give users enough free space to run their applications, but on the other hand, you don’t want to increase the cost of running the instance too much. I suspect the answer to this problem might be for AMI publishers to provide a reasonable low default, perhaps 10GB as per the old standard or 15GB following in the footsteps of Amazon’s first EBS Boot AMIs. Example Toolset. Size of root partition on " Boot from. Hi, Resizing of the root partition is now supported at launch time in all EC2 regions. The valid options for the block device mapping structure, which is used for file system resizing, is documented in the client tools help. As Shlomo points out, please ensure that you are using version 1.3-45772 2009-10-31 (or later) of the EC2 API tools.

The --block-device-mapping option takes a value in the following format: <device-name>=<snapshot-id>[:<volume-size>[:<deleteOnTermination>]]<blockquote> device-name - this is the device name as it should be exposed to the instance, for example /dev/sdb. This is the same as the device field specified in the AttachVolume call today.

This field also serves as the key for the structure. snapshot-id - the ID of the EBS snapshot to be used when creating the volume. Volume-size - the size (GiBs) of the volume. Delete-on-termination - this indicates whether the volume should be deleted on termination. Regards,Dave. How to find Windows uptime? The following article will help you to find the computer uptime Instructions Option 1: 1. Go to "Start" -> "Run". 2. Write "CMD" and press on "Enter" key. 3. Write the command "net statistics server" and press on "Enter" key. 4. Improved EBS snapshots on Amazon EC2. So I’ve been working on a system where the MySQL instance on EC2 sporadically locks up (mysqld is zombied) during a snapshot process =) Essentially the EC2 snapshot is triggered like this: system("xfs_freeze -f /vol") and die; system("ec2-create-snapshot $vol -K $key -C $crt ") and die; system("xfs_freeze -u /vol") and die; This method is based on advice from here Notice I am doing an xfs_freeze of the entire volume on which the mysql data sits.

It is intended to be used with volume managers and hardware RAID devices that support the creation of snapshots such as EBS. The -f flag requests the specified XFS filesystem to be frozen from new modifications. When this is selected, all ongoing transactions in the filesystem are allowed to complete, new write system calls are halted, other calls which modify the filesystem are halted, and all dirty data, metadata, and log information are written to disk.

EC2 recommends this for ec2-create-snapshot: mysqld[26852]: InnoDB: about forcing recovery. Amazon’s Elastic Block Store explained « RightScale Blog. Now that Amazon's Elastic Block Store is live I thought it'd be helpful to explain all the ins and outs as well as how to use them. The official information about EBS is found on the AWS site. I've written about the significance of EBS before and I'll follow up with a post about some new use cases it enables. The Basics EBS starts out really simple. You create a volume from 1GB to 1TB in size and then you mount it on a device (such as /dev/sdj) on an instance, format it, and off you go. Later you can detach it, let it sit for a while, and then reattach it to a different instance. Reliability EBS volumes have redundancy built in, which means that they will not fail if an individual drive fails or some other single failure occurs.

I know that folks at Amazon have thought long and hard how to characterize the reliability of EBS volumes. Amazon EBS volumes are designed to be highly available and reliable. Volume Performance Snapshot Backups Availability Zones Price Summing It Up. Hardening Linux Web Servers. Security is a process, not a result. It is a process which is difficult to adopt under normal conditions; the problem is compounded when it spans several job descriptions. All the system level security in the world is rendered useless by insecure web-applications. The converse is also true—programming best practices, such as always verifying user input, are useless when the code is running on a server which hasn’t been properly hardened. Securing forward facing GNU/Linux web servers can seem like a daunting task, but it can be made much easier by breaking the process into manageable portions. This article will cover installing, configuring and hardening free software web servers and associated software including Apache 2.2.0, MySQL 5.0.18, PHP 5.1.2, Apache-Tomcat 5.5.16 and common Apache modules such as mod_security, mod_ssl, mod_rewrite, mod_proxy and mod_jk.

Common security mistakes in web-applications and how to fix them will also be discussed, focusing on PHP and Java environments. Amazon EC2 with Microsoft SQL Server | Brent Ozar - Too Much Information. Sometimes you need an offsite database server in case something goes wrong, but you can’t afford a full-blown disaster recovery datacenter. Or maybe you’ve got some ideas that you’d like to try out with a big SQL Server 2005 box, but you don’t have the hardware sitting around idle. Or maybe you’d just like to learn SQL Server 2005 – sure, it’s not the latest and greatest, but it’s still the most popular version out in the wild. Now you’ve got a way to accomplish this for around $1 per hour. With Amazon EC2, DBAs can “rent” virtual servers running Windows 2003 and SQL Server 2005.

In this article, I’ll explain the five big steps required to turn on your own SQL Server in Amazon’s datacenters. Step 1: Understand what “cheap” SQL Server hosting costs. As of this writing (10/2008), here’s the smallest SQL Server you can get at Amazon EC2, what’s known as a “Standard Large” configuration: Yes, that’s a lot of money, and no, that does not include your bandwidth. Elasticfox AMI List. How to install SharePoint 2010 on Amazon Cloud : EC2 » carbon – Marek Czarzbon – Auf der Suche nach Diamanten der Technologie. Last week I have tried to install SharePoint 2010 Beta on Amazon Cloud. It was not possible because at this time Amazon was not supporting Windows Server 2008. Today I have read news from Amazon AWS: Wow!

So let’s try to install SharePoint 2010 on it. And it works! Below you will find all steps you have to follow and you will need about 1 hour for the installation. 1- You need an EC2 Account by Amazon 2- Go to the AWS Management Console (Beta) 3- Start a new instance. 4- The Windows Server 2008 is not available as standard AMI Image, so switch to Community AMI and choose amazon/Windows-Server2008-x86_64-SqlExpressMultiLang-v1 P.S: Thanks to Helmut for the hint about the new version of the image ( see comment about the problems with the version 1.0).

Amazon/Windows-Server2008-x86_64-SqlExpressMultiLang-v101 I guess you just want to evaluate SharePoint 2010 and not to build a productive server on a beta version. 5- Define the number of instances to 1 and define the security group. 18- Done!!!! How to create an Amazon Elastic Compute Cloud EC2 Machine Image (AMI) | Phil Chen. This how to article will go over creating a Amazon Elastic Compute Cloud (EC2) Machine Image (AMI) from scratch. In this particular example we are creating a Centos 5.3 64bit AMI from beginning to end. For those that are interested in taking advantage of cloud computing, hopefully you find this blog article helpful. Note this blog also can be generalized for Centos 5, 5.1, 5.2 most versions of Redhat, and Fedora 64bit and 32bit. First thing is first you are going to need to sign up for an Amazon Web Services account specifically S3 Storage and EC2 Elastic Compute Cloud here.

You will need a credit card and some basic info, and will immediately get the following info: AWS Account Number S3 KEY "yourkeynumber" S3 SECRET KEY "yoursecretkey" EC2 PRIVATE KEY "pk-yourprivatekey.pem" EC2 CERTIFICATE "cert-yourcertificate.pem" Time to login become root and go to town: Put your two .pem files the cert and pk in the directory ~/.ec2 [root@server]$ mkdir ~/.ec2 Enable your .bashrc settings.