Click to Rate and Give Feedback
MSDN
MSDN Library
Online Services
Windows Azure SDK
 CSPack Command-Line Tool
Collapse All/Expand All Collapse All
CSPack Command-Line Tool

The CSPack command-line tool (CSPack.exe) prepares a service for deployment. How you use the CSPack tool depends on where you intend to deploy the service.

  • To prepare the service for deployment to the local development fabric, use the CSPack tool to copy the service binaries to a directory layout.

  • To prepare the service for deployment to the data center fabric, use the CSPack tool to generate a package file that may be uploaded to the cloud.

If you have installed the SDK to the default location, the CSPack tool can be found at C:\Program Files\Windows Azure SDK\v1.0\bin\cspack.exe.

CSPack <service-definition-file> [options]

To view the most current option list, type CSPack /? at a command prompt from the installed location.

 

Option Description

/copyOnly

When this option is specified, the CSPack tool creates a directory layout for the role binaries, which the development fabric can use to run the service locally.

If no output location is specified with the /out option, the CSPack tool creates a directory named <service-name>.csx, where <service-name> is the name specified for the service in the service definition file.

/out:<file | directory>

This option indicates the output format and location for the role binaries.

When the /copyOnly option is specified together with this option, the CSPack tool creates the named output directory and copies the role binaries to that directory.

If /copyOnly is not specified, this option specifies the file name for the deployment package. If no file name is specified, the deployment package is created as <service-name>.cspkg.

/role:<rolename>;<role-binaries-directory>;[<role-entrypoint-DLL>]

This option specifies the directory where the binaries for a role reside and the DLL where the entry point of the role is defined. The command line may include one /role option for each role in the service definition file.

The name of the role must match the role name in the service definition file. If <role-binaries-directory> is not specified, this option defaults to a subdirectory named after the role in the directory where the service definition file is located.

The <role-entrypoint-DLL> parameter is required for a worker role. For a web role, it is optional.

/generateConfigurationFile:<configuration file>

This option is used to generate a skeleton configuration file for a service. Edit the generated file to specify the values of the settings and number of role instances in the service before deploying the service.

/sslthumbprint:<thumbprint>

This option is obsolete. See Managing SSL Certificates for information on associating certificates with your service.

/certui:<thumbprint>

This option is obsolete. See Managing SSL Certificates for information on associating certificates with your service.

None.

  1. This example assumes that a service definition file, HelloWorld.csdef, defines a web role called HelloWorldService. Calling the CSPack tool as shown here creates a deployment package named HelloWorld.cspkg that contains binaries from a subdirectory called HelloWorldService:

    cspack HelloWorld.csdef

  2. This example assumes that a service definition file, WebAndWorker.csdef, defines a service with a web role called WebApp and a worker role named WorkerProcess. Calling the CSPack tool as shown here creates a directory named WebAndWorker containing the role binaries ready for deployment to the development fabric. The binaries for the web role are deployed from a subdirectory named WebApp, while the binaries for the worker role will be taken from a directory named WorkerProcess. The entry point for the worker role resides in the WorkerProcess\WorkerRole.dll directory. The command also generates a skeleton configuration file named WebAndWorkerDefault.cscsfg.
    cspack WebAndWorker.csdef /role:WorkerProcess; WorkerProcess;WorkerRole.dll /generateConfigurationFile:WebAndWorkerDefault.cscfg /out:c:\WebAndWorker /copyonly

  3. This example assumes that a service definition file, SSLService.csdef, defines a service with an input endpoint with the HTTPS protocol. Calling CSPack creates a package named SSLServiceProduction.cspkg and includes an SSL certificate from the personal certificate with the given thumbprint in the package.

    cspack SSLService.csdef /sslthumbprint:<hexadecimal string> /out:SSLServiceProduction.cspkg


Copyright © 2009 by Microsoft Corporation. All rights reserved.
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker