1 © 2009 IBM Corporation A step-by-step guide to put DB2 on EC2 Deepak Rao, IBM November 26, 2009
1 © 2009 IBM Corporation
A step-by-step guide to put DB2 on EC2
Deepak Rao, IBMNovember 26, 2009
2 © 2009 IBM Corporation2
The IBM View of Cloud
“Cloud” is an emerging consumption and
delivery model for many services. ▪ Business benefits:
▪ Cost savings▪ More employee mobility▪ Responsiveness and agility in delivering new
solutions
▪ IT benefits:
▪ Allows IT to Shift Focus
▪ Economies-of-scale
▪ Hybrid infrastructure: public and private
3 © 2009 IBM Corporation
What Cloud Computing means to DB2
3
• Cloud Computing means a lot of different things to a lot of people:
• Cloud datacenter (Utility Computing)
• Data as a Service (DaaS)
• Software as a Service (SaaS)
• Platform as a Service (PaaS)
• DB2 focus is on reducing IT costs by leveraging Utility Computing
4 © 2009 IBM Corporation
What is Utility Computing?
• Utility computing is the packaging of computing resources, such as computation and storage, as a metered service similar to a traditional public utility (such as electricity, water, natural gas, or telephone network). This system has the advantage of a low or no initial cost to acquire hardware; instead, computational resources are essentially rented.
4
5 © 2009 IBM Corporation
The DB2 strategy for the Cloud
• Deliver key technologies to support our customers’ private cloud initiatives
• Partner with key public cloud providers to fully integrate DB2 in to the ecosystem
• DB2 9.7 can now be purchased from IBM through CD/DVD’s or on Amazon as an AMI
• Provide robust DBMS for SaaS vendors
• Offer terms and conditions and pricing to make DB2 the best DBMS for the Cloud
5
6 © 2009 IBM Corporation
DB2 options for AWS
1. Pre-built Development-Use DB2 AMIs
• Based on DB2 Express-C (32, 64-bit options)
• No DB2 usage fees – just pay for Amazon’s infrastructure
• DB2 assistance through online forums
2. Pre-built Production-Use DB2 AMIs (2Q09)
• For DB2 Express (32-bit) and Workgroup (64-bit)
• Hourly usage fee includes DB2 license, OS subscription, EC2 charges
• Can purchase optional DB2 support
3. Create your own DB2 AMI
• Use your existing DB2 licenses
• Get DB2 support from IBM as usual
6
7 © 2009 IBM Corporation
Amazon Cloud Computing Key Concepts
• Elastic Compute Cloud (EC2) : Is a web service provided by Amazon, it is a resizable & scalable compute capacity in the cloud, Run time environment. Five configurations starting at $0.10 per hour.
• Simple Storage Service (S3) : Amazon Simple Storage Service (S3) is the distributed storage component of the AWS platform. It can read, write, and delete objects representing data ranging from 1 byte to 5 gigabytes. You can use S3 to store, replicate, and persist an unlimited amount of objects in the cloud. However, you should not think of S3 as a local disk and attempt to run your database from S3. Storage on demand. Pricing starts at $0.15c per GB/Month
• Elastic Block Storage (EBS): Amazon Elastic Block Store (EBS) offers persistent storage for Amazon EC2 instances. Amazon EBS volumes provide off-instance storage that persists independently from the life of an instance. Amazon EBS volumes are highly available, highly reliable volumes that can be attached to a running Amazon EC2 instance and are exposed as standard block devices. Amazon EBS volumes offer greatly improved durability over local Amazon EC2 instance stores, as Amazon EBS volumes are automatically replicated on the backend (in a single Availability Zone). Can be attached to EC2 to allow persistent storage. Starts at $0.10 per GB/month
• Amazon Machine Image (AMI): An Amazon Machine Image (AMI) is an encrypted machine image that contains all information necessary to boot instances of your software. For example, an AMI might contain Linux, Apache, and your web site or it might contain Linux, A virtual image containing OS + Software; It runs on Amazon EC2 Infrastructure, AMI’s are stored in Amazon S3.
• Amazon Instance: An instance is the AWS version of a server. They come in a variety of sizes small, large, and extra-large and are designed to provide predictable and dedicated computing power on demand. Amazon charges you directly based on instance-per-hour usage.
• EC2 API’s: Amazon Provides API’s which can be used in Perl, Python, Ruby or Java to write your own code to Develop, Deploy, Manage Cloud Infrastructure through programs.
• SSH Key: When you launch an image through AWS, you will specify a particular SSH Key (*.pem) to associate with that image. This allows you to gain access to your machines without using passwords. This is the recommended (and more secure) way to access your instances.
• Bundles: Its an Amazon way of providing a ‘build’ of different software which can be instantiated. IBM has several “Builds” for DB2 pre-built, ready to be initialized. Alternatively, You can make your own Builds.
• Elastic IP: Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An Elastic IP address is associated with your account not a particular instance, and you control that address until you choose to explicitly release it. Unlike traditional static IP addresses, however, Elastic IP addresses allow you to mask instance or Availability Zone failures by programmatically remapping your public IP addresses to any instance in your account.
8 © 2009 IBM Corporation
Steps for setting up DB2 9.7 on Amazon Cloud Platform
• You can setup DB2 on AWS 2 ways, GUI or EC2 API based scripts, However the steps involved are same. They are:-
• Setup AWS/EC2 account (One time activity)
• Download Security Certificates (One time activity)
• Download Firefox UI (One time activity)
• Update Personal & Payment information (One time activity)
• Login to AWS
• Choose a suitable AMI & launch an Instance
• Login/SSH to the Instance & accept Product licensing
• Setup Security & DB2 settings
• Create Database, Test Connectivity to applications
• After tests, don’t forget to shutdown AMI Instance to avoid charges to your Credit Card!!
• Note:Amazon AWS Cloud computing can be setup 100% without manual intervention through API codes, but for the better understanding of components involved in Cloud Computing we will use the step-by-step method through GUI.
© 2009 IBM Corporation
Sign up for a free AWS & EC2 account
10 © 2009 IBM Corporation
Download certificates/Keys to a folder
© 2009 IBM Corporation
Download Amazon AWS Plug-in for Firefox:http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609
© 2009 IBM Corporation
Setup your personal Information
© 2009 IBM Corporation
Setup Payment information
© 2009 IBM Corporation
Launch AWS Console
© 2009 IBM Corporation
Create an Instance of pre-configured DB2 AMI
© 2009 IBM Corporation
Select the Image for DB2 9.7
© 2009 IBM Corporation
Launch the AMI Instance
© 2009 IBM Corporation
Check the status of the Instance
© 2009 IBM Corporation
Confirm the Instance is up & running
© 2009 IBM Corporation
Firefox UI Amazon EC2
© 2009 IBM Corporation
Launching Terminal for the newly created Instance
© 2009 IBM Corporation
License agreement
© 2009 IBM Corporation
Certificates configuration
© 2009 IBM Corporation
Security setup
© 2009 IBM Corporation
Storage (EBS) Configuration
© 2009 IBM Corporation
Configuring Users on AWS
© 2009 IBM Corporation
Database Creation
© 2009 IBM Corporation
DB2 Instance start-up
© 2009 IBM Corporation
Connecting to the Database
© 2009 IBM Corporation
Shutting down the Server Instance
31 © 2009 IBM Corporation
• Yes, Amazon provides a whole lot of API’s which can be downloaded & used in your own programs to automate the steps seen till now.
• http://docs.amazonwebservices.com/AWSEC2/2006-10-01/DeveloperGuide/
Automation???
32 © 2009 IBM Corporation
Cost of consuming DB2 on Cloud services for 5 hours
33 © 2009 IBM Corporation
Cost break-up
34 © 2009 IBM Corporation
DB2 on Cloud Resources – ibm.com/db2/cloud
34
• IBM – AWS Partnership Press Release
http://www-03.ibm.com/press/us/en/pressrelease/26673.wss
• Related FAQs
IBM- http://www.ibm.com/developerworks/downloads/faq-ec2/faq-ec2.html
DB2- http://www.ibm.com/developerworks/downloads/im/udbexp/faq-ec2-udbexp.html
• DB2 Express-C Development-Use AMIs
http://www.ibm.com/developerworks/downloads/im/udbexp/ec2.html
• Documentation for using the pre-built DB2 AMIs
Startup Guide- http://download.boulder.ibm.com/ibmdl/pub/software/dw/cloud/udbexp/Get_Started_DB2_AMI.pdf
Rebundle Guide- http://download.boulder.ibm.com/ibmdl/pub/software/dw/cloud/udbexp/Rebundle_Guide_DB2_AMI.pdf
• Screencast and scripts for easily creating your own DB2 AMIs from scratch
http://www.channeldb2.com/video/db2-expressc-on-amazon-ec2
• Webcast
http://www.ibm.com/db2/labchats#30
• DB2 Cloud Computing FAQ:http://www.ibm.com/developerworks/downloads/im/udbexp/faq-ec2-udbexp.html
• DB2 on EC2 details:http://www.ibm.com/developerworks/downloads/im/udb/ec2.html
• Chat with Lab on DB2 Cloud:http://www.channeldb2.com/events/db2-and-cloud-computing
• AWS Cost Calculator:http://calculator.s3.amazonaws.com/calc5.html?utm_source=ibm&utm_medium=catalog&utm_campaign=link
35 © 2009 IBM Corporation
Summary
• Cloud Computing is a Disruptive Force
• IBM is a leader in Cloud Computing
• IBM supports our clients’ private and public cloud initiatives:
• IBM DB2 offers:
1. A robust DBMS for the Cloud
2. Key technologies for Cloud deployments
3. Pricing and licensing flexibility for Cloud environments
4. Added value through an ecosystem of Cloud partners at all layers.
5. Extensive backing from world class support including IBM Research Labs
35
36 © 2009 IBM Corporation
> Questions
36