[jboss-user] [JBoss Tools] - Deploy web apps to the cloud using JBoss Deltacloud tools

Andre Dietisheim do-not-reply at jboss.com
Wed Feb 23 10:51:26 EST 2011


Andre Dietisheim [http://community.jboss.org/people/adietish] modified the document:

"Deploy web apps to the cloud using JBoss Deltacloud tools"

To view the document, visit: http://community.jboss.org/docs/DOC-16520

--------------------------------------------------------------
h1. Deploy to any cloud by using Deltacloud Tools
If you want to deploy webapps to the cloud you'd actually have to choose what cloud you want to use in a first step. By chance there's Deltacloud that offers a unique common interface to the different cloud providers. With JBoss Deltacloud tools, you'll now even be able to stick to your eclipse and deploy as if your cloud instance was a standard WTP server.

h1. Preface
The current cloud landscape is partitioned amond partitioned among a large amount of different solution providers. All of them offer different features and tools to work with. Deltacloud offers a common interface to a large amount of cloud providers and helps to avoid vendor lock in. Deltacloud, a server application, offers a REST interface and a nice web UI to work with.
Until now, no Eclipse based tools were available for Deltacloud and you had to switch between your Eclipse and your browser when deploying webapps to a Deltacloud server.

h1. Solution
JBoss Deltacloud tools now offer you Eclipse based tooling that allow you to stick to your favorite IDE while developing and deploying to the cloud. JBoss Deltacloud tools allow you to start and stop instances at will, access them with a terminal and deploy to it as if it was a standard application server running in the wild. The JBoss WTP Server adapter now allows remote deployments to Deltacloud instances in a way you alreday know from legacy deployments.

h2. Create an account at Amazon EC2
We use the Deltacloud server at  http://try.steamcannon.org/deltacloud http://try.steamcannon.org/deltacloud. This deltacloud server runs on EC2 drivers and provides an API to work against EC2 resources. To be able to create instances you'll need a valid EC2 account. 
If you don't have an account so far, you may sign up here:


>  http://aws.amazon.com/ http://aws.amazon.com/


h2. Install JBoss Deltacloud Tools
Add the following update site to your software sites:


>  http://download.jboss.org/jbosstools/updates/JBossTools-3.2.0.GA/ http://download.jboss.org/jbosstools/updates/JBossTools-3.2.0.GA/


And install the *Deltacloud Development Tools* that you find in the Cloud cathegory.


 http://community.jboss.org/servlet/JiveServlet/showImage/11455/update-site.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11455/update-site.png 

h2. Create a Dynamic Web Project
At JBoss we believe in community based approaches. We stick to the Eclipse WTP standard and provide tools that will allow you to deploy *Dynamic Web Project*. Make sure you have such a project ready or create a new one. 
The screencast uses a gwt project that was created with our GWT integration facet. If you want to check it out, you'll have to install it. You may check all details about it on  http://community.jboss.org/docs/DOC-15794 http://community.jboss.org/wiki/CreateGWTProjectswithJBossToolsandEclipseWTP

h2. Create a connection to a Deltacloud server
Switch to the Deltacloud perspective and create a new cloud connection. 

 http://community.jboss.org/servlet/JiveServlet/showImage/11456/new-connection.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11456/new-connection.png 

There's a public available deltacloud server that is run by the steamcannon project. You may reach it at 

>  http://try.steamcannon.org/deltacloud http://try.steamcannon.org/deltacloud
> 

This Deltacloud server runs on ec2 drivers. It offers an interface to interact with amazon EC2. You'll therefore have to provide your EC2 credentials. You may look them up by clicking on both links that are shown below the appropriate fields in the wizard.

 http://community.jboss.org/servlet/JiveServlet/showImage/11457/ec2-credentials.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11457/ec2-credentials.png 

You may test your credentials by hitting the test button. 

 http://community.jboss.org/servlet/JiveServlet/showImage/11458/connection-test-successful.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11458/connection-test-successful.png 

The wizard will then inform you if they're fine. 
As soon as you hit finish, you'll get a new connection in your cloud viewer. It will allow you to check the images you may choose and will let you list the instances that you may be already running on EC2.

 http://community.jboss.org/servlet/JiveServlet/showImage/11459/new-cloud.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11459/new-cloud.png 


h2. Launch a new instance
Now that you have a connection to the Deltacloud server you may launch a new instance on it. You'll find an appropriate entry in the context menu of your cloud.

h3. Choose an image
Give your new instance a name and choose an image to launch. You may choose among the ones that are listed. We used a custom image that was created by the steamcannon project for us. It already has JBoss AS 6 installed to it so that you will be ready to deply web applications to it. Since this custom image is not listed (there's a  https://issues.apache.org/jira/browse/DTACLOUD-16 bug in the current Deltacloud server that prevents all images from being listed) you'll have to type it in directly into the appropriate field:

> ami-ca51a1a3 (32-bit)
> ami-a651a1cf (64-bit)

You'll then have to provide a geographic location to your instance. The so called realm matches the datacenter that will run your instance. There are 4 different locations in the US available to choose among. 

h3. Choose a key
You'll furthermore have  let you provide a key to interact with amazon ec2. You may create a new one if you hit *Manage* and hit *New* in the upcoming dialog.

 http://community.jboss.org/servlet/JiveServlet/showImage/11460/manage-keys-1.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11460/manage-keys-1.png $
 http://community.jboss.org/servlet/JiveServlet/showImage/11461/manage-keys-2.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/11461/manage-keys-2.png 


The *SSH* daemon that is installed to the image we use is configured in a way that spares you from creating keys for ssh-connections. It will look up the key you used to launch your instance and authenticate/authorize you on behalf of this key. You'll therefore have to indicate a location to store the key locally. This location should match the directory that is used in the *SSH2 preferences* in Eclipse. Our wizard will store the public part of the key locally and add it to the *SSH private keys*.

 http://community.jboss.org/servlet/JiveServlet/showImage/102-16520-2-11463/ssh2-preferences.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16520-2-11463/450-177/ssh2-preferences.png 

The ssh subsystem in the *RSE* (Eclipse Remote System Explorer) will then be able to pick it and use it when connecting to your instance with the *SSH shell* that is build in.

You may of course also create your key manually in the *aws console*. You will then have to download your key. You'll then have to add it to your *Private keys* manually.

h3. Select a hardware profile
The last step in configuring your instance involves choosing a hardware profile. The profiles differ in the hardware equipment that you'll get for your instance. The smallest one - *t1.micro* - is available free of charge. It wont cost you a single penny to run a micro instance on ec2. If unfortunately has not enough memory to *run JBoss AS smoothly*. Choose at least *t1.small* which has a fair amount of 1.7 GB memory.

 http://community.jboss.org/servlet/JiveServlet/showImage/102-16520-2-11464/launch-instance-1.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16520-2-11464/450-423/launch-instance-1.png
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-16520]

Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110223/13f4c896/attachment-0001.html 


More information about the jboss-user mailing list