Build new applications in the cloud - or use interoperable services that run on Microsoft infrastructure to extend and enhance your existing applications. You choose what's right for you.

Table of Contents

 

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:

 

  1. 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.

 

  1. Start Eclipse with Windows Azure PHP Projects plug-in installed.
  2. Assign or Create workspace folder as Eclipse starts.
  3. Change Eclipse perspective from PHP to PHP Windows Azure.
    1. In Eclipse menu-bar, select Window menu.
    2. In Window menu, select Open Perspective menu-item.
    3. In Open Perspective menu-item, select Other... cascading menu-item.
    4. In Open Perspective panel, select PHP Windows Azure
  4. In the PHP Windows Azure perspective, Create a new PHP Windows Azure Project.
    1. In Eclipse menu-bar, select File menu.
    2. In File menu, select New menu-item.
    3. 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...
    4. In New menu-item, select Windows Azure Web Project cascading menu-item.
    5. In new PHP Azure Project panel:
      1. Provide project name QuickStart
      2. In Data Storage Options, select None.

        This selection means that no Windows Azure Storage functionality will be configured into this new project.

      3. Select Finish button

 


 

Task 2 — Deploy Web Application to Development Fabric

 

In this task, you will run your service locally in the Development Fabric.

 

  1. To start Development Fabric, right-click its icon in the system tray and select Start Development Fabric Service
  2. To view Development Fabric UI, right-click its icon in the system tray and select Show Development Fabric UI
  3. Note that there are no WebRole(s) deployed within Development Fabric.
  4. To start deployment of Web Role in local Development Fabric, from Eclipse menu-bar...
    1. Open PHP Explorer view
    2. Select either:
      • Service project QuickStart
      • or Web Role project QuickStart_WebRole
    3. In Eclipse menu-bar, select Windows Azure menu.
    4. In Windows Azure menu, select Run in Development Fabric menu-item.
  5. 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.
  6. View Development Fabric UI again:
    1. Expand the tree on the left panel to see the WebRole instances.
    2. 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.

 

 Note:

This task requires that you to have a developer account.

To register for an account, please visit:  Account — Windows Azure Platform.

  1. To deploy to the Windows Azure Cloud, you need to create a Windows Azure Service Package.
  2. From Eclipse menu-bar...
    1. Open PHP Explorer view
    2. Select either:
      • Service project QuickStart
      • or Web Role project QuickStart_WebRole
    3. In Eclipse menu-bar, select Windows Azure menu.
    4. 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.

  3. Since Development Fabric is running and it is necessary to cleanup to create a Windows Azure Service Package, select OK button to proceed.
  4. Wait for Service Package to finish being created.
  5. 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
  6. When toolkit finishes creating Service Package, it opens default browser to Windows Live Sign-In in order to access your Windows Azure account.
  7. After sign-in, you are redirected to Windows Azure Portal
  8. Select deployment to Staging service.
  9. In Staging Deployment page
    1. From Service project QuickStart workspace directory, browse to provide:
      • Application PackageQuickStart.cspkg
      • Configuration SettingsServiceConfiguration.cscfg
    2. Set Service Deployment NameQuickStart
    3. Select Deploy button and Staging begins copying over the two files for QuickStart deployment.

In Windows Azure's Staging Page

  1. Wait for deployment of QuickStart to complete.
  2. After deployment is Allocated, select Run button.
  3. Wait for enabling of QuickStart to complete.
  4. Wait some more for QuickStart to become ready to run.
  5. In Staging page, after deployment is Started, select Web Site URL link.
  6. Note now within the Staging Cloud the defaultDocument index.php is running.

 


 

Summary

 

In this quick lab, you have learned how to...

 

  1. Create a simple PHP Windows Azure Web Project.
  2. Build and Run PHP Windows Azure Web Project within the Development Fabric.
  3. Deploy and Run PHP Windows Azure Web Project within the Windows Azure Cloud.

 

Good job!! You are done with this Lab.