Lab 0 — Quick Start into Windows Azure 4 Eclipse
In this lab, you will see how quick it is to deploy a Web Role PHP Application using Windows Azure for Eclipse into Development Fabric and Windows Azure.
Task 0 — Prerequisites
Before doing this lab, if you not done so:
- Complete install of Windows Azure for Eclipse
Task 1 — Create a Windows Azure Web PHP Project
In this task, you will create a basic PHP Web project that will be used within a Windows Azure Web Site.
- Start Eclipse with Windows Azure PHP Projects plug-in installed.
- Assign or Create workspace folder as Eclipse starts.
- Change Eclipse perspective from PHP to PHP Windows Azure.
- In Eclipse menu-bar, select Window menu.
- In Window menu, select Open Perspective menu-item.
- In Open Perspective menu-item, select Other... cascading menu-item.
- In Open Perspective panel, select PHP Windows Azure
- In the PHP Windows Azure perspective, Create a new PHP Windows Azure Project.
- In Eclipse menu-bar, select File menu.
- In File menu, select New menu-item.
- For New menu-item, note that the initial cascading menu-items has changed in PHP Windows Azure perspective:
- Windows Azure Web Project
- PHP Project
- Project...
- In New menu-item, select Windows Azure Web Project cascading menu-item.
- In new PHP Azure Project panel:
- Provide project name QuickStart
In Data Storage Options, select None.
This selection means that no Windows Azure Storage functionality will be configured into this new project.
- Select Finish button
Task 2 — Deploy Web Application to Development Fabric
In this task, you will run your service locally in the Development Fabric.
- To start Development Fabric, right-click its icon in the system tray and select Start Development Fabric Service
- To view Development Fabric UI, right-click its icon in the system tray and select Show Development Fabric UI
- Note that there are no WebRole(s) deployed within Development Fabric.
- To start deployment of Web Role in local Development Fabric, from Eclipse menu-bar...
- Open PHP Explorer view
- Select either:
- Service project QuickStart
- or Web Role project QuickStart_WebRole
- In Eclipse menu-bar, select Windows Azure menu.
- In Windows Azure menu, select Run in Development Fabric menu-item.
- When service begins:
- Default browse should open and present the defaultDocument at the next available port, typically at URL http://127.0.0.1:81/index.php
- Explorer should open to workspace folder of Service project QuickStart.
- View Development Fabric UI again:
- Expand the tree on the left panel to see the WebRole instances.
- As set within ServiceConfiguration.cscfg previously, note that in the left-panel that there are now 2 Web Role deployment instances.
Task 3 — Deploy Web Application to Windows Azure Cloud
In this task, you will run your service remotely on Windows Azure using a Windows Azure Storage Account.
- To deploy to the Windows Azure Cloud, you need to create a Windows Azure Service Package.
- From Eclipse menu-bar...
- Open PHP Explorer view
- Select either:
- Service project QuickStart
- or Web Role project QuickStart_WebRole
- In Eclipse menu-bar, select Windows Azure menu.
- In Windows Azure menu, select Publish Application to Windows Azure Portal menu-item.
This action will open a portal to Windows Azure, which will be gone in more detail later in this lab.
- Since Development Fabric is running and it is necessary to cleanup to create a Windows Azure Service Package, select OK button to proceed.

- Wait for Service Package to finish being created.
- When finished, the build results will be presented in Windows Explorer will open Service project QuickStart workspace folder.
Note the newly create additions to this project...
- folder ServiceDefinition.csx
- file QuickStart.cspkg
- When toolkit finishes creating Service Package, it opens default browser to Windows Live Sign-In in order to access your Windows Azure account.
- After sign-in, you are redirected to Windows Azure Portal
- Select deployment to Staging service.
- In Staging Deployment page
- From Service project QuickStart workspace directory, browse to provide:
- Application Package — QuickStart.cspkg
- Configuration Settings — ServiceConfiguration.cscfg
- Set Service Deployment Name — QuickStart
- Select Deploy button and Staging begins copying over the two files for QuickStart deployment.
In Windows Azure's Staging Page
- Wait for deployment of QuickStart to complete.
- After deployment is Allocated, select Run button.
- Wait for enabling of QuickStart to complete.
- Wait some more for QuickStart to become ready to run.
- In Staging page, after deployment is Started, select Web Site URL link.
- Note now within the Staging Cloud the defaultDocument index.php is running.
Summary
In this quick lab, you have learned how to...
- Create a simple PHP Windows Azure Web Project.
- Build and Run PHP Windows Azure Web Project within the Development Fabric.
- Deploy and Run PHP Windows Azure Web Project within the Windows Azure Cloud.
Good job!! You are done with this Lab.
© 2009 Soyatec. All rights reserved.