Geeks With Blogs

@JReuben1
  • JReuben1 AngularJS Directive templateUrl --> halfway to W3C WebComponents ! about 507 days ago
  • JReuben1 Yeoman AngularJS generator - generate controllers, views, routes, services - NICE! about 509 days ago
  • JReuben1 A comparison of HTML5 Canvas 2D JS libs http://t.co/fcB7jvnhqY KineticJS , EaselJS, fabric.js, Paper.js, processing.js seen as the leaders about 509 days ago

Josh Reuben

Overview

Windows HPC Server 2008 is infrastructure for high-end applications that require high performance computing clusters – i.e. for scaling out parallelizable across many compute nodes in a grid. These compute nodes can be coordinated by a head node , which in turn can be proxied via a service broker node that exposes a SOA WCF interface for job scheduling. Additional functionality includes the ability to coordinate between job processes running on nodes via MPI (message passing interface).

The Windows Azure Scheduler is basically a complete & modular deployment of all HPC Server components to run in the cloud, not just compute nodes, and without having to rely on a VM role to host the Head Node.

Functionality: HPC Azure job scheduling and resource management, runtime support for MPI and SOA, web-based job submission interfaces, and persistent state management of job queue and resource configuration.

A basic deployment includes the following:

  • A SQL Azure database - stores state information about the job queue and resource configuration
  • a head node - schedules jobs and support SOA workloads
  • a web-front end node - provides a web-based job submission Scheduler portal
  • compute nodes - to run jobs.

For example, you can deploy a SOA service and client to the head node, and an MPI application to the compute nodes.

It is possible to submit jobs in multiple ways:

  • using the Scheduler Portal
  • via RDC to the head node and then using the HPC Job Manager

Note that while the Azure HPC Scheduler supports LINQ to HPC, this has been discontinued and made redundant by Daytona Azure Iterative MapReduce functionality, so it will not be discussed further in this post.

Plug HPC functionality into Azure Roles

SDK plug-ins

The SDK provides different plug-ins which can be imported via ServiceDefinition.csdef file to extend Windows Azure role functionality for HPC support.

To recap Azure config:

  • ServiceDefinition.csdef specifies the settings that are used by Windows Azure to configure a hosted service (such as the type of role that you want to deploy – worker, web, or VM).
  • ServiceConfiguration.cscfg specifies the values for these settings (such as how many instances of each you want to deploy).

The minimum required config imports appropriate plugins to enables the Azure Scheduler for job scheduling and the node manager for coordinating resource management. Can optionally enable SOA session manager to manage sessions between the SOA client and the service hosts, and SOA broker to manage messages between the SOA client and the service hosts.

  • HpcHeadNode - (Worker Role only). Enables the Azure Scheduler & the node manager.
  • HpcComputeNode - (Worker Role only). Enables the node manager.
  • HpcBrokerNode - (Worker Role only). Enables the SOA broker & the node manager.
  • HpcVmNode - (VM Role only). Enables the node manager
  • HpcWebFrontEnd - (Web Role only). Enables the Azure Scheduler Portal and a RESTFul HTTP web service for job submission.
  • HpcWebFrontEndHeadNode - (Worker or web role) - enables the Azure Scheduler, the node manager, and the Azure Scheduler Portal + job submission web service.

Add the SDK plug-ins

3 types of extended roles are required for a minimum configuration:

  • Head node: Azure worker role with the HpcHeadNode plug-in added. The HpcHeadNode plug-in provides job scheduling and resource management functionality.
  • Compute node: Azure worker role with the HpcComputeNode plug-in added to support MPI and SOA applications + workload management features.
  • Front end: Azure web role with the HpcWebFrontEnd plug-in added to provide a built-in web portal an HTTP RESTful web service for submission to the Azure Job Scheduler.

Eg ServiceDefinition.csdef.

<?xml version="1.0" encoding="utf-8"?>

<ServiceDefinition

    name="AzureSampleService"    

    xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">

    <WebRole name="FrontEnd" vmsize="Small">

        <Sites>

            <Site name="HPCPortal"

                physicalDirectory="C:\Program Files\Windows Azure Scheduler SDK Preview\HpcPortal">

                <Bindings>

                    <Binding name="HPCWebServiceHttps"    

                        endpointName="Microsoft.Hpc.Azure.Endpoint.HPCWebServiceHttps"/>

                </Bindings>

            </Site>

        </Sites>

        <Endpoints>

            <InputEndpoint name="Endpoint1" protocol="http" port="80" />

        </Endpoints>

        <Imports>

            <Import moduleName="Diagnostics" />

            <Import moduleName="HpcWebFrontEnd" />

            <Import moduleName="RemoteAccess" />

        </Imports>

    </WebRole>

    <WorkerRole name="HeadNode" vmsize="Small">

        <Imports>

            <Import moduleName="Diagnostics" />

            <Import moduleName="HpcHeadNode" />

            <Import moduleName="RemoteAccess" />

            <Import moduleName="RemoteForwarder" />

        </Imports>

    </WorkerRole>

    <WorkerRole name="ComputeNode" vmsize="Small">

        <Imports>

            <Import moduleName="Diagnostics" />

            <Import moduleName="HpcComputeNode" />

            <Import moduleName="RemoteAccess" />

        </Imports>

    </WorkerRole>

</ServiceDefinition>

 

Build & Deployment Requirements

Windows Azure SDK v 1.5 - http://www.microsoft.com/windowsazure/sdk/.

Visual Studio 2010 Professional + Windows Azure Tools for Visual Studio - (To build & publish the sample applications)

Windows Azure Scheduler SDK - http://connect.microsoft.com/hpc (64-bit only).

HPC Pack 2008 R2 with SP3 release candidate client utilities (required for SOA Service Broker) -http://connect.microsoft.com/hpc site.

HPC Pack 2008 R2 MS-MPI redistributable package - Required for MPI support - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14737.

HPC Pack 2008 R2 SDK - To write applications that use the HPC Pack APIs - http://www.microsoft.com/download/en/details.aspx?id=26645.

Windows Azure subscription - to configure a hosted service, storage account, and SQL Azure database to deploy HPC scheduler applications - http://go.microsoft.com/fwlink/p/?LinkId=205528

Installing the Azure Scheduler SDK + Sample Apps

To install the SDK - Open an elevated Command Prompt ( Run as Administrator) & run the installation program: WindowsAzureSchedulerSDK_x64.msi. HPC plugin folders will be installed in C:\Program Files\Windows Azure SDK\v1.5\bin\plugins folder.

To install the sample apps - unzip WAS-SDK-Samples-3921.zip , build AzureSampleService.sln, Configure the AppConfigure project as the startup project & publish to Windows Azure. Arbitrarily set the number of instances of each node type, bearing the Azure billing plan in mind. settings: Solution Configurations == Debug, Solution Platforms == Mixed Platforms. projects in the solution:

  • AppConfigure - Configures and publishes the other projects
  • CertificateGenerator - Helper library that creates Windows Azure management certificates
  • AzureSampleService - Defines the roles for the Azure Scheduler and Azure service configuration files
  • ComputeNode - Defines the properties of compute nodes
  • FrontEnd - Defines the properties of the web front end node
  • HeadNode - Defines the properties of the head node

Including application binaries in the deployment

  • Specify which roles should include which application binaries.
  • For example, a service might deploy a SOA service and client to the head node, and an MPI application to the compute nodes.
  • To include binaries in the bin folder for a role, can either specify it as the output directory for the application project, or add the application as a reference in one or more role projects.

Deploy the sample Azure Scheduler service - run the AppConfigure project in visual studio, provide your Azure subscription ID, + arbitrary names for hosted service, storage account, and scheduler deployment. Additionally specify a certificate .cer file (need to upload this certificate to the relevant Azure subscription via the /windows.azure.com portal). The data is specified in the appconfigure.exe.config file. Publish to Azure.

Validate the Deployment

  • Make a Remote Desktop connection to the role instances
  • Verify that Windows Azure Scheduler role binaries are deployed in the location: E:\plugins\<PluginName>\HPCPack\bin. Additionally, on compute node role and head node role instances, you can verify that the sample applications are installed in the E:\approot folder.
  • run a HPC clusrun command on the nodes in the Windows Azure Scheduler. see clusrun.
  • run the hpcjobmanager command to Start HPC Job Manager – provides a GUI for submitting and monitoring jobs on the cluster.
  • Connect to the Windows Azure Scheduler Web Portal using a web browser. E.g. https://<prefix>.cloudapp.net/Portal. submit a simple test job.
  • view events in Event Viewer in Applications and Services Logs\Microsoft\HPC\Scheduler\Operational.

Running MPI Applications

  • configure the Firewall to allow MPI communication between compute nodes - configure an application-based firewall exception on the nodes by using the hpcfwutil command.
  • To submit an MPI job to run on compute nodes, use job submit to start an mpiexec command that runs the .exe. e.g.
job submit /numnodes:<NumComputeNodes> mpiexec <.exe> <NumIntervals> <NumIterations>
  • To view the output of the calculation, use the task view <jobId> command.
  • Unlike MPI programs deployed to an on-premises Windows HPC Server cluster the visual studio add-in debugger cannot be used to debug MPI applications that are deployed with the Windows Azure Scheduler.

Running SOA Applications

  • SOA clients use the Microsoft.Hpc.Scheduler and Microsoft.Hpc.Scheduler.Session APIs to send and receive messages from a service that is hosted on one or more compute nodes. These APIs leverage the Azure Scheduler infrastructure for identification of available service hosts, distribution of service requests, load-balancing, and error handling.
  • use the hpcpack and hpcsync CLUs to upload service DLLs to an Azure storage account and then deploy the service to each compute node. Hpcsync automatically deploys the DLLs to the expected location. 

to package a SOA service:

hpcpack create <folder.zip> <folder>
  • to upload a package to an Azure storage account, where <yourStorage> is the name of your storage account, and <yourKey> is the primary access key to your storage account:
hpcpack upload <folder.zip> /account:< Storage account name> /key:<storage account access key>
  • to deploy the package to all compute nodes:
clusrun hpcsync
  • Run the SOA client on the head node - To submit service requests , run the SOA client, that is installed on the head node.
  • To view the compute nodes that were allocated to process your service requests, you can use HPC Job Manager.
  • To view resource allocation - Start > All Programs > Microsoft HPC Pack 2008 R2 > HPC Job Manager > Job Management pane > All Jobs.
  • select a job from the list. View Job dialog box > Allocated Nodes - lists the resources that were used to process the service requests.
  • If the head node was enabled for SOA workloads, A deployment that supports SOA workloads provides broker and session management functionality to help distribute incoming service requests to the available service hosts and then return the messages to the client. This functionality can be enabled in the ServiceConfiguration.cscfg file for the deployment. The necessary elements can be added to the configuration file by calling the EnableSOA() method (in the Microsoft.Hpc.Azure.ClusterConfig namespace).

Deployment Configuration Settings

Subscription ID - Windows Azure subscription ID. Obtain from the Windows Azure Management Portal.

Management certificate - x.509 v3 certificate name that contains a public key, and is saved as a .cer file

Service name - The DNS name of a hosted service in your subscription - must be unique across Windows Azure services.

Storage account - A subdomain name used in URLs for a storage account in your subscription - must be lowercase alphanumerical & unique across Windows Azure services.

SQL Server location - The region selected for the SQL Azure Server that is used for the deployment

SQL database name

SQL Server administrator

SQL administrator password

Deployment name - The name of the job scheduler component that is installed on the head node role and that is used for the Windows Azure Scheduler deployment on the hosted service. Sets the CCP_SCHEDULER environment variable on the role instances

Administrator name - administrator of the job scheduler

Password

Head nodes - Number of instances of the HeadNode role that are in the sample Windows Azure Scheduler

Compute nodes - Number of instances of the ComputeNode role that are deployed in the sample Windows Azure Scheduler

Web frontend nodes - Number of instances of the FrontEnd role that are deployed in the sample Windows Azure Scheduler.

Conclusion

The Windows Azure Scheduler is basically a complete & modular deployment of all HPC Server components to run in the cloud, not just compute nodes, and without having to rely on a VM role to host the Head Node. Functionality includes the following: HPC Azure job scheduling and resource management, runtime support for MPI and SOA, web-based job submission interfaces, and persistent state management of job queue and resource configuration.

In this blog post, we have looked at using SDK plugins to extend Azure roles with HPC functionality. We have also examined build and deployment requirements and the installation process.

Good luck using the Windows Azure HPC Scheduler SDK to develop a complete HPC solution in the cloud!

Posted on Tuesday, December 6, 2011 6:36 AM Parallelism , Cloud | Back to top


Comments on this post: The Windows Azure HPC Scheduler SDK

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © JoshReuben | Powered by: GeeksWithBlogs.net | Join free