Using Amazon EC2
Using Amazon EC2
Chris Furlong, Product Management Contributions from John Trigg and John Sands 9 March 2009 v1.1
Amazon EC2
Page 1
Contents
Using Amazon EC2 .................................................................................................................................. 1 What is it? ............................................................................................................................................... 3 Why would I use it?................................................................................................................................. 3 Instance Types ........................................................................................................................................ 3 Standard Instances.............................................................................................................................. 3 High-CPU Instances ............................................................................................................................. 3 Costs (correct at March 2009) ................................................................................................................ 4 Using EC2 ................................................................................................................................................ 5 Sign-up ................................................................................................................................................ 5 Sign-up for EC2 and S3 ........................................................................................................................ 9 Launching an Instance for the First Time ............................................................................................ 9 Launching an Instance Subsequent Times ........................................................................................ 15 Remote Desktop connect to your Instance ...................................................................................... 15 Finally ................................................................................................................................................ 17 Further Resources ................................................................................................................................. 18
Amazon EC2
Page 2
What is it?
It is a part of Amazons web service offerings, called Elastic Compute Cloud (EC2). It provides the ability to run virtual Windows (and other operating systems) servers in Amazons data centres across the world. EC2 is built on top of another of Amazons web services Simple Storage Service (S3) which provides the data storage layer for EC2.
High-CPU Instances
Instances of this family have proportionally more CPU resources than memory (RAM) and are well suited for compute-intensive applications. c1.medium - High-CPU Medium Instance 1.7 GB of memory, 5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each), 350 GB of instance storage, 32-bit platform c1.xlarge - High-CPU Extra Large Instance 7 GB of memory, 20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each), 1690 GB of instance storage, 64-bit platform
EC2 Compute Unit (ECU) One EC2 Compute Unit (ECU) provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor. More on instance types can be found here: http://aws.amazon.com/ec2/instance-types/
Amazon EC2
Page 3
Amazon EC2
Page 4
QVS can be very happily run on a non-SQL Server, no-authentication (use QVS DMS mode if you need to provide security for the instance) Amazon instance. There are additional costs for data transfer, and storage used, details at: http://aws.amazon.com/ec2/#pricing and http://aws.amazon.com/s3/#pricing. These costs should be minimal.
Amazon EC2
Page 5
Amazon EC2
Page 6
You should receive a confirmation email from Amazon.com about the creation of your AWS account. Follow the link provided by Amazon to get your Access Keys: http://awsportal.amazon.com/gp/aws/developer/account/index.html?action=access-key
Amazon EC2
Page 7
Amazon EC2
Page 8
Copy your Access Key and keep it handy as we will need it again shortly, repeat for your Secret Access Key. Create an X.509 certificate, when the option appears. Download both the Private Key and the X.509 certificate for future use. You may also want to take note of your AWS Account Number as this is used in sharing private images between users. If this is a new Amazon account you will need to add payment details as appropriate. Amazon do not currently offer any corporate services so you will need to provide these details.
Click the Complete Sign-Up button. You will receive two emails from Amazon, one confirming your EC2 registration, the other S3.
Amazon EC2
Page 9
Before we can launch an instance we need to pre-configure the EC2 firewall, Click Security Groups on the left hand side:
Amazon EC2
Page 10
Select your new security group and add, from the Connection Method drop down, HTTP and RDP. Also add Custom and set the from and to range to 4747 for QVP and the plugin. See above for complete screenshot. Click EC2 Dashboard and select Launch Instances:
Amazon EC2
Page 11
None of the Windows AMIs listed on the quick start are optimal for QVS, they either lack IIS or have authentication enabled (additional charge applies). Select Community AMIs
Amazon EC2
Page 12
Select Public Images and Windows in the Viewing pane to list all Windows base images.
Amazon EC2
Page 13
The most appropriate AMI for QVS use is (at the time of writing): AMI: acf9d1d8 (EU-West) qlikview-eu/QV85SR4_Public_AMI.manifest.xml AMI: ami-230dea4a (US-East) qlikview/QV85SR4_Public_AMI.manifest.xml This AMI has QlikView 8.5 and QlikView Server 8.5 installed. All you need to provide is a licence key. Click Select next to the AMI you would like to launch:
Next you need to create a Key Pair, give you key pair a name and click download. Save this file for further use. Click Continue: As you have already created a custom security group, you will jump to the last page:
Amazon EC2
Page 14
Enter the number of instances to start (you can start multiple identical instances if needed), change the Instance type (see above for details) and ensure your Security Group is selected. Click Launch to start your first Amazon cloud server! Click Close and the goto Instances.
Wait for you instance status to change from starting to running (may take upto 10 minutes), click the output button. If you get an empty log, close it and be patient and drink more coffee! Amazon EC2 Page 15
Eventually you will get some output on the log, once that happens we need to extract the default administrator password from the instance.
Click on More Actions and then Get Windows Password. Once you have done this the window below will open.
If you get a message about the Instance not being ready more patience is required, its nearly there. To decrypt the password you need to paste the content of the key pair file you downloaded earlier. Make sure you paste the whole of the file including -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----
Amazon EC2
Page 16
Take a note of the password. You can now Remote Desktop into your windows instance using the address above and the credentials.
Finally
Now you have a working Windows server hosted in Amazons cloud, some advice. Change the password from the default set by Amazon to something more memorable. Remember to close the instance down when you have finished with it (you are being charged by the hour) do this by terminating the instance on the My Instances screen. You can view you bill at any time by going to Your Account, Account Activity Amazon bills in dollars regardless of location used or your location.
Amazon EC2
Page 17
Further Resources
Elastic Fox is an excellent Firefox add in that provides slightly more advanced control of the EC2 environment (http://developer.amazonwebservices.com/connect/entry.jspa?entryID=609 ). There is also an excellent user guide for ElasticFox (http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1797 )that described Bundling, and using Elastic Storage Blocks these functions can also be performed from the AWS Web Console shown above. Bundling is a process used to create a new image from a running one so you dont need to do any further installation configuration each time you need to use a server (S3 storage costs apply to hold the new AMI), the new AMI can be shared with other users be cautious not to share QVS site licenses. Elastic Storage Blocks provide a method of attaching a reusable hard-disk to an Instance. S3Fox (https://addons.mozilla.org/en-US/firefox/addon/3247 ) is a Firefox add in that allows you to manage S3 storage at a file level, allowing you for example to delete a bundled AMI.
Amazon EC2
Page 18