Share via


Deployment

In order to run this sample, you will need to deploy the WCF service assemblies and configuration to your head node, your on-premises nodes, and your Windows Azure nodes.

Task 1 – Copying the WCF Service Configuration to the Head Node

In this task, you will copy the WCF service configuration file to the head node’s service registration folder. This allows you to use the HPC 2008 R2 Cluster Manager application to diagnose the service deployment and create new service tasks for the service. It also allows clients to create new sessions (interactive and durable) against the head node.

  1. Open the command prompt window from Start | All Programs | Microsoft Visual Studio 2010 | Visual Studio Tools | Visual Studio Command Prompt (2010).
  2. Navigate to the AsianOptions labs folder, and from there navigate to the Source\AsianOptionsService\bin folder.
  3. Run the following command to copy the service configuration file to the head node:

    CMD

    xcopy AsianOptionsService.config \\MyHeadNode\HpcServiceRegistration\ /Y

    Note:
    Replace the MyHeadNode machine name with the name of your head node machine. The HpcServiceRegistration share is created when installing the head node.

Task 2 – Deploying the WCF Service to On-Premises Nodes

In this task, you will deploy the WCF service to your HPC cluster’s on-premises nodes.

Note:
If this sample is only being tested on Windows Azure nodes, you can skip this task.

There are two ways in which you can copy the WCF service such that it is accessible to your on-premises nodes:

  • Copy the service assembly to a shared folder in the HPC cluster.
  • Copy the service assembly to each of the on-premises nodes in the HPC cluster.

If you examine the service configuration file (task 2 in the Getting Started section above), you will notice that the location of the service assembly is set to a shared folder in the head node machine, Therefore, follow the following steps:

  1. In your head node machine, create a share named apps. Verify that all the on-premises nodes can access this share.
  2. Open the command prompt window from Start | All Programs | Microsoft Visual Studio 2010 | Visual Studio Tools | Visual Studio Command Prompt (2010).
  3. Navigate to the AsianOptions labs folder, and from there navigate to the Source\AsianOptionsService\bin folder.
  4. Run the following command to copy the service assembly to the head node:

    CMD

    xcopy *.* \\MyHeadNode\apps\AsianOptions\ /EY

    Note:
    Replace the MyHeadNode machine name with the name of your head node machine.

If you want to deploy the service assembly to each on-premises node, follow these instructions:

  1. Change the AsianOptions service configuration file to point to the folder in which the service assembly is located. For example:

    AsianOptionsService.config

    <microsoft.Hpc.Session.ServiceRegistration> <service assembly="e:\apps\AsianOptions\AsianOptionsService.dll" contract="AsianOptionsService.IPricingService" type="AsianOptionsService.PricingService" includeExceptionDetailInFaults="true" maxConcurrentCalls="0" serviceInitializationTimeout="60000" stdError="" maxMessageSize="65536"> </service> </microsoft.Hpc.Session.ServiceRegistration>
    Note:
    The assembly must be located in the same folder in each on-premises node.
  2. Copy the updated service configuration file to the head node, as specified in the previous task.
  3. Copy the service assembly to the target location in each of the on-premises nodes. If you already have the service assembly located in the head node, you can run the following command to automatically copy the files to all the on-premises nodes:

    CMD

    clusrun /nodegroup:ComputeNodes xcopy \\MyHeadNode\apps\AsianOptions\*.* E:\apps\AsianOptions\ /EY

    Note:
    Note: If you only want to deploy the service to some of the compute nodes, change the node group specified in the nodegroup parameter. Also, remember to rename the MyHeadNode machine name to that of your head node machine.

Task 3 – Deploying the WCF Service to Windows Azure Nodes

In this task, you will deploy the WCF service to your Windows Azure nodes.

  1. Open the command prompt window from Start | All Programs | Microsoft Visual Studio 2010 | Visual Studio Tools | Visual Studio Command Prompt (2010).
  2. Navigate to the AsianOptions labs folder, and from there navigate to the Source\AsianOptionsService folder.
  3. Run the following command to create a deployment package for the service:

    CMD

    hpcpack create AsianOptionsService.zip bin\

    Note:
    Note: Do not change the name of the package; the name must match that of the service configuration file and the service name used by the client application.
  4. Run the following command to upload the deployment package to the Windows Azure package storage:

    CMD

    hpcpack upload AsianOptionsService.zip /nodetemplate:"Azure node template"
    Note:
    Change the value of the nodetemplate parameter to the name of your Windows Azure node template.

  5. If you already have Windows Azure nodes started in the HPC cluster, you need to copy the new package to them. To sync the Windows Azure nodes with the new packages stored in the application packages blob, run the following command:

    CMD

    clusrun /nodegroup:WindowsAzureNodes hpcsync