• Like
  • Save
Java – azure integration
Upcoming SlideShare
Loading in...5

Java – azure integration



Tutorial for integrating Windows Azure Platform and Java Web

Tutorial for integrating Windows Azure Platform and Java Web



Total Views
Views on SlideShare
Embed Views



1 Embed 75

http://blogs.mervpolis.com 75



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Java – azure integration Java – azure integration Presentation Transcript

    • Azure’s Cloud Services Build infinitely scalable apps and services Support rich multi-tier architectures Automated application management (based on Meet WA Presentation by Scott Guthrie)
    • Windows Azure Subscription To deploy your application, you must have Azure’s subscription. Windows Azure offered 90-days trial for free. Azure’s Free Trial subscription granted you permission to every Azure’s services with limited quotas.
    • Registering for Free Trial You’ll need:  Email Address (Yahoo, Gmail, etc)  Phone Number  International Credit Card (VISA, Master Card) Visit https://www.windowsazure.com/en- us/pricing/free-trial/, then register your self You must NOT use your services exceeded your quota limit, or your account will be disabled
    • Preparing your Environment For JAVA Developer you must have these:  Eclipse (or any Eclipse-based IDE)  JDK 6  Server (Apache Tomcat 7 is recommended)  Windows Azure SDK  Windows Azure Plugin for Eclipse  Windows Azure Subscription Go to http://manage.windowsazure.com  Create your own Cloud Services
    • Preparing your Java Project Create a new Dynamic Web Project / Maven Web project Make sure that your project doesn’t have any ERRORS Export your project to .WAR file
    • Preparing your Azure Project Create a new Windows Azure Deployment project Set your project configuration:  Copy your exported .WAR file to “WorkerRole1/approot/”  package.xml, find: <component deploydir="%SERVER_APPS_LOCATION%" deploymethod="copy" importas=“{your-war- name}.war" type="server.app"/>, edit with your .WAR file name
    • Preparing your Azure Project Continued:  Find startupApacheTomcat7.txt in “samples/” folder, copy all to clipboard  Find startup.cmd in “WorkerRole1/approot”. Open with text editor, block all text, paste it. Before you begin to the next step, you’ve to know Azure’s project structure
    • Azure Project’s Structure Cloud Services will use “WorkerRole”, it will have:  “util” folder. DO NOT EDIT  “run.cmd” DO NOT EDIT  “startup.cmd” (You can edit this like the instruction before this page)  “YourApplication.war”, your Java-web project  jdk.zip and tomcat7.zip (if you use Tomcat 7)
    • Azure Project’s Structure You can make startup.cmd download the zip by itself. It will greatly reduce the size of your project In startup.cmd:  Find script below:  ::cscript /NoLogo "utildownload.vbs" "http://archive.apache.org/dist/tomcat/tomcat- 7/v7.0.26/bin/apache-tomcat-7.0.26.zip" "tomcat7.zip“  Remove the “::”
    • Azure Project’s Structure Continued:  That script will download tomcat7.zip for you automatically  For jdk.zip, you should add this code AFTER “download-tomcat” script  cscript /NoLogo "utildownload.vbs" "http://java-azure- for-private.googlecode.com/files/jdk.zip" "jdk.zip“  Find this script:  SET WAR_NAME={YourWarName).war
    • Build and Upload Right-Click in your Azure project Choose Properties, find “Windows Azure”, change “Build For” to “Deployment to cloud” Click “Project” in Menu-Bar, click “Build Project” (to activate Azure Full Build) Refresh, and you’ll find “deploy” folder in your Azure Project Go to WindowsAzure Management Portal (http://manage.windowsazure.com)
    • Build and Upload Click “Cloud Services” tab, I’m sure you have created one Click “CERTIFICATES”, upload your certificate (.pfx) that located in “AzureProject/cert”. Default password is: “Password1” It’s up to you, to choose “Staging” or “Production” Environment
    • Build and Upload Whether you choose Staging / Production Environment, the way you upload your project is the same In the bottom of the screen, click “UPLOAD”, find “.cspkg” and “.cscfg” in your “deploy” folder Waiting until you see the Status become: “RUNNING”
    • Troubleshooting Common problem is when you deploy your project  Status is always “RECYCLING”:  Maybe your web-project contains error. FIX IT  Maybe you didn’t use the right Project Structure. FIX IT (look from page 9-11)  Status is always “BUSY”:  Just wait for a while. If status become “RECYCLING”, see above.  If after you wait for so long, just delete the production. Upload it again
    • start nowhttp://windowsazure.com