LightSwitch Cloud Service using OData service

In 2 previous posts:

I created a LightSwitch application that consumes an OData web service and deployed it into a Windows Azure Web Site. In this post I deploy this application into a Windows Azure Cloud Service. Deployment of a LightSwitch application into a Cloud Service is similar to deploying to a WAWS. Cloud Services offer better scalability and control over WAWS.

Creating the Windows Azure Cloud Service
First step is to create a Windows Azure Cloud Service  where the LightSwitch application can be hosted.

Settings are confirmed at the bottom right corner. The dialog closes and a new entry is added to the table of cloud services. Next I create a storage account that will hold the LightSwitch application deployment. Local redundancy is all I need.

Deploying the LightSwitch application
Previously I deployed this application to a Windows Azure Web Site so when pressing Publish… these settings are still active. Now I change the Service Type from Web Site to  Cloud Service. As a result the next step of the publish wizard is displayed.

Select the Cloud Service created earlier and make a choice between the production and staging environment. Optionally, remote desktop access can be activated. On the Advanced tab the deployment name can be specified and the storage account thats holds the LightSwitch application binaries must be selected.

When deploying a LightSwitch application into a Windows Azure Cloud Service the connection must be secure (HTTPS). For now a self-signed certificate is all we need so we create one. Specify the name and the password of the certificate and select this certificate. The last step of the wizard is to specify the data connection to the OData service that is consumed by this application.

These details can be found in the Windows Azure Marketplace. The Service URL can be found at the data provider. User Name is the customer-id of the Windows Azure Marketplace subscription and Password is the service specific account key that is provided to you when purchasing an Windows Azure Marketplace data set. Finally, press the Publish button to start publishing the LightSwitch application to the Windows Azure Cloud Service. Publishing takes about 10 minutes. During deployment the Windows Azure Portal shows the progress. In this case, the ‘old’ portal (2) shows more detailed information than the ‘new’ portal (1).

Using the Azure Storage Explorer the storage account can be viewed. The LightSwitch application binaries are present.

Up and running
Now the RDW LightSwitch application runs in a Windows Azure Cloud Service. Note the red https in the URL caused by my self-signed certificate.

This concludes my series of posts about consuming a publically available OData service using a LightSwitch application and deploying this application to both a Windows Azure Web Site and a Windows Azure Cloud Service.

View Jaco Oskam's profile on LinkedIn

Share Button