Cloud Computing is a computing service provisioning and delivery model in which users get access to dynamically scalable computing capacity over the network in a pay-as-you-use payment scheme. While its attractiveness may differ depending on whom you've talked to, its service-oriented nature gives users two important benefits: ease of application deployment (someone else's hard works laying down the hardware and software foundation) and on-demand access anytime from anywhere. These characterstics make Cloud Computing ideally suited for developers who want to quickly try something out in an isolated "good" environment without the overhead of system setup or the capital expenses of paying for systems they no longer need after they are done.
In the past Teradata provided developers a Teradata Express Edition that runs on top of Windows 32-bit platform. Like all programs with installers, it required that users first find a system, then go through the installation, deal with any unexpected setup problems, and finally uninstall and repurpose the system for something else. Now, Teradata Express 12 for Amazon EC2 is set to change the paradigm and makes developers' life simpler and better.
Teradata Express 12 for Amazon EC2 runs on top of Novell SLES10 and the industry-leading Amazon EC2 Cloud Computing platform. It has Teradata database 12.0 and client utilities pre-installed and sample databases included. The old Express Edition limitation with 4GB storage has now been expanded to 1TB, giving developers more freedom to experiment with larger datasets and with more real-life development and testing needs. If you are interested, this post will show you how to automatically setup Teradata Express 12 for Amazon EC2 using an automated script. Note, this article assumes that you have some working knowledge of Amazon EC2 platform.
Please note that while this product is not officially supported, you can talk to other users and get help in the Cloud Computing forum.
There are two ways to connect to Amazon AMI instances. You can use Amazon EC2 API Tools, which is a command line interface with Amazon AMI. The installation procedures for it can be found here. Or, you can use ElasticFox, which is an Amazon Firefox extension to manage Amazon AMI instances over the web. The setup reference for it can be found here.
Using either the Amazon EC2 API tools or the ElasticFox, the instructions to launch a new instance of Teradata Express 12 for Amazon EC2 is simple and straightforward. We will demonstrate the steps using either tools.
After you set up Amazon EC2 API Tools, you can launch an instance by running the following command "ec2-run-instances ami-id -k gsg-keypair --instance-type m1.large --availability-zone us-east-1b". Replace ami-id with Teradata Express 12 for Amazon EC2 ami-id of ami-85d536ec (Note: the ami ID may change in the future so check your confirmation email) instance-type ( m1.large or higher) and availability-zone can also be changed if desired.
Once the instance is launched, you can check the status of the launched instance: "ec2-describe-instances instance-id" by giving the id of the instance we just launched. So you can connect to the database you need to grant permission on port 1025 of the launched instance: "ec2-authorize default -p 1025 -s source_subnet" so that the database can be accessed from outside of the Amazon EC2 network. To run the command, change source_subnet range to fit your network. (Example: 220.127.116.11/16, or 0.0.0.0/0)
Finally, upload through SSH credential files (cert_xxxx.pem and pk_xxxx.pem) to a location under /mnt in the launched instance. (Example: scp –i rsa-key pair-file private-key-file certificate-file root@<instance-address>:/mnt/)
You can launch ElasticFox by clicking on “Tools” menu in Mozilla Firefox and selecting “ElasticFox”. If this is the first time you use ElasticFox, you will be prompted to enter your AWS credentials. You can later modify your credentials by clicking on the” Credentials” button in the top center of the ElasticFox window. Your Access Key and Secret Key can be found under the “Your Account” menu at http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key. Click on Add button when credential information is entered and then click on Close button.
Once logged in, click on "Images" tab and type into the textbox right below the "Images" tab Teradata Express 12 for Amazon EC2 ami-id, which is ami-85d536ec (Note: ID may change in the future so check your confirmation email). Then, right click on the AMI and select Launch Instance(s) of this AMI.
Subsequently, in the pop-up Launch new Instance(s) window, select Instance Type if desired. Finally, click on Launch button at the bottom of the window.
Once your Teradata Express 12 for Amazon EC2 instance is launched, grant permission on port 1025 so that the database can be accessed from outside of the Amazon EC2 environment. To do so, go to the "Security Groups" tab and right click on the owner ID and select "Grant New Permissions".
Finally, attach EBS volumes to your instance. To do so, click on the “Volumes and Snapshots” tab in ElasticFox, then press the green "+" symbol in the “Volumes” box and type in the size in gigabytes (GB) of the volume, between 1 and 1000. For the purposes of this demo, we type “16” to specify a 16 GB volume. Please note that each Teradata database AMP will require minimum of 1 EBS volume (e.g. 2 AMP => need to add 2 volumes). In addition, a volume must be in the same availability zone as the instance that it will be attached to.
After the volume is created, we can attach it to a running instance. First, click on the “AMIs and Instances” tab. Right click on the instance to associate the EBS volume with and select the “Attach an EBS volume” option. A dialog box will appear and it allows you to select the Amazon EBS volume that was created earlier from the drop down box and a device name need to be entered in order to attach the volume.
After clicking on the Attach button, the EBS volume will be attached. Repeat for each volume.
You can use a SSH client (ssh, Putty, etc) to connect to the external IP address of the instance, make sure you specify your rsa key file with the connection attempt. Setup scripts would automatically run at the first log-in. First, you will be prompted to accept software license agreement. Type y or simply press Enter.
Once you have accepted the Teradata Express 12 for Amazon EC2 license agreement, the automated setup script will prompt you to initialize the database. Type y or simply press Enter.
The next step is to change to your own dbc password for better security. Choose a new password for dbc and press Enter.
If you attach your EBS volume through ElasticFox, skip to next screen. Otherwise, if you had your credential file uploaded in API Tools section, the script will automatically add and attach EBS volumes to the database. You will be prompted for a few setup parameters. Go ahead and accept the default values and press Enter.
If you have chosen to attach the EBS volumes in ElasticFox, the script is going to give you a warning, and you will be prompted to select the available volumes to setup database on.
Either way, the setup script will run for some time. After the instance's database has successfully ran Sysinit and DIP, the script will prompt you to create the sample database. Type y or press Enter.
After the sample database is created, the setup for a Teradata Express 12 for Amazon EC2 instance is complete and the AMI instance can be used.
You can use your favorite Teradata client utilities to log onto the new Teradata Express 12 for Amazon EC2 instance and run queries to validate the Teradata Express database setup. In the example below we use bteq but you can using any other supported client utilities (SQL Assistant Java Edition, etc). Execute a simple query "select * from dbc.dbcinfo;"
The query returned successfully and your Teradata Express 12 for Amazon EC2 instance database setup is now validated.
You now have a fully functioning version of Teradata 12 running in the Amazon cloud. Have fun! And don't forget to terminate your instance if you are done with it. If you leave it running you will incur usage charges! Note: If you terminate your instance you will have to go through the setup again, and you will lose all your data. Make sure you backup your data and any needed Teradata configuration files in /etc/opt/teradata/tdconfig.
Also, please note that while the Teradata Express family of products is not officially supported, you can talk to other users and get help in the Cloud Computing forum.