Resin Cloud deployment with Amazon
From Resin 3.0
(→Fire up an Amazon Instance) |
|||
Line 21: | Line 21: | ||
</pre></code> | </pre></code> | ||
+ | |||
+ | |||
+ | ==Install Resin on a Local Box== | ||
+ | |||
+ | Install | ||
+ | [http://caucho.com/resin-4.0/admin/starting-resin-install.xtp#InstallingResinusingthedebpackageonUbuntuandDebian Resin] locally so you test locally and deploy. [http://caucho.com/resin-4.0/admin/starting-resin-install.xtp Feel free to install it on any supported OS]. | ||
+ | |||
+ | |||
+ | Add Caucho's Debian repository to your system's repositories to use automated update tools like Synaptic and apt-get. To do this, add the following line to your/etc/apt/sources.list | ||
+ | |||
+ | <code> <pre> | ||
+ | deb http://caucho.com/download/debian unstable multiverse | ||
+ | </pre></code> | ||
+ | |||
+ | |||
+ | Then install Resin as follows: | ||
+ | |||
+ | <code> <pre> | ||
+ | apt-get update | ||
+ | apt-get install resin-pro | ||
+ | </pre></code> | ||
+ | |||
+ | It is a good idea to make sure the version you install on Amazon AMI matches the version you install locally. |
Revision as of 22:06, 25 November 2011
This tutorial is going to cover the basics of using Resin with Amazon Web Services for cloud deployment. If you are new to cloud computing and IaaS, follow along and you will soon be deploying Java web applications in the cloud. You wil create an EC2 instance. You will download and install Resin on Ubuntu on a local machine. You will install Resin on an Amazon Linux AMI instance (EC2 instance). You will use Roo to create a simple application and deploy it.
We use Roo because Spring is fairly widely used, and Roo is a quick way to generate a sample app. Future tutorials will use other common Java tools as well as show you how to configure and manage a complete Resin cluster. Think of this as the first tutorial in a series of tutorials.
For this tutorial you will need Resin 4.0.24 or later. Check back periodically because as we are going to expand the tutorial and improve Resin's support of cloud deployments. The Resin engineering team plans on improving cloud support continuously.
Many of the steps in this tutorial would be similar even if you were using Eucalyptus, CloudStack with CloudBridge, RightScale myCloud or even OpenNebula this guide should help you along as they all support the Amazon EC2 REST APIs. Also any cloud computing environment (private or public, on premises or hosted) will have similar characteristics. Thus even if you are using a private cloud using OpenStack like Project Olympus, the principles will be the same. In fact even using remote servers deployed in a datacenter or virtualized servers with Xen Server, Xen Cloud or VMWare vSphere the steps will be very similar.
For this tutorial we expect you are familiar with starting, and stoping Amazon WS instances. If you are not, go through this tutorial from Amazon WS. You will need an Amazon WS account. Amazon WS allows you to have free tier so you can learn Amazon WS (EC2, S3, Elastic Load Balancer, Block Storage, SimpleDB, Simple Queue Service, Simple Notification Service).
Fire up an Amazon Instance
Fire up an Amazon Instance using Amazon Linux (basically CentOS 5.4). Then install Resin as follows using RPM:
$ sudo rpm --import http://caucho.com/download/rpm/RPM-GPG-KEY-caucho
$ sudo yum install http://caucho.com/download/rpm/4.0.24/x86_64/resin-pro-4.0.24-1.x86_64.rpm
Install Resin on a Local Box
Install Resin locally so you test locally and deploy. Feel free to install it on any supported OS.
Add Caucho's Debian repository to your system's repositories to use automated update tools like Synaptic and apt-get. To do this, add the following line to your/etc/apt/sources.list
deb http://caucho.com/download/debian unstable multiverse
Then install Resin as follows:
apt-get update
apt-get install resin-pro
It is a good idea to make sure the version you install on Amazon AMI matches the version you install locally.