2. 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)
3. 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.
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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)
10. 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 “::”
11. 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
12. 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)
13. 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
14. 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”
15. 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