Deploying a new application

Goal

You developed a new service, compiled it, and are now ready to use it in your cluster. To use the new service, you need to deploy it to compute hosts and associate it with an application.

At a glance

  1. Create the service package

  2. Create the application

  3. Configure the client to run with the new application

Create the service package

Before you can deploy a service, you need to create a service package.

Packaging a Symphony application for deployment involves putting all service files and any dependent files associated with the service in a package.

Important:

Verify that all dependencies are either pre-installed or deployed with the service. For example, if your application is .NET, ensure that the .NET Framework is installed and that it is the correct version for your application.

Compress into a package:

  • Service executables

  • Additional files required for the services to work.

It is not required to use gzip as indicated in the example to package a service. You can use any supported format. If using a utility other than gzip, ensure the compression and uncompression utility is in your Path environment variable when using soamdeploy.

Supported package formats:

  • .zip

  • .tar

  • .taz

  • .tar.zip

  • .tar.Z

  • .tar.gz

  • .tgz

  • .jar

  • .gz

On Windows

  1. Go to the directory in which the service is located.

    For example, %SOAM_HOME%\4.1\win32-vc7\samples

  2. Create an application package by compressing the service executable into a zip file:

    gzip SampleServiceCPP.exe

    You have now created your first service package SampleServiceCPP.exe.gz. Next, create the application.

On Linux

  1. Go to the directory in which the service is located.

    For example, $SOAM_HOME/4.1/linux2.4-glibc2.2-x86/samples

  2. Create an application package by compressing the service executable into a tar file:

    tar -cvf SampleServiceCPP.tar SampleServiceCPP

    gzip SampleServiceCPP.tar

    You have now created your first service package SampleServiceCPP.tar.gz. Next, create the application.

Create the application

Add the application with the Add Application Wizard. After completing the Wizard, your application should be ready to use.

In Symphony DE, the Wizard deploys your service package and registers your application. In Symphony grid, the Wizard in addition creates a consumer with your application name and allocates resources,

You can also use commands to deploy a service package and register an application. See soamdeploy and soamreg in the Symphony Reference for more details.

  1. In the Platform Management Console, click Configure Applications.

    The Applications page displays.

  2. Select Global Actions > Add/Remove Applications.

    The Add/Remove Application page displays.

  3. Select Add an application, then click Continue.

    The Adding an Application page displays.

  4. Select Create new profile and add application wizard.
  5. Enter your application name, then click Continue.

    The Define the Service window displays.

  6. Enter service information, then click Continue.
    1. Change the Service name to the name you want to assign to your new service.
    2. In command to start this service, enter the command to run your service executable.

      For example, if in your service package you have the directory structure \myservice\myservice.exe, indicate: ${SOAM_DEPLOY_DIR}/myservice/myservice

    The Define session type window displays.

  7. If you have defined session types in your client application, select Define a custom session type, fill in the desired information, then select Continue.

    The Confirm application profile details window displays.

  8. Review your selections, then click Confirm.

    The window displays indicating progress. Your application is ready to use.

  9. Click Close.

    The window closes and you are now back in the Platform Management Console. Your new application is displayed as enabled.

Configure the client to run with a new application

Ensure client parameters match application profile parameters.

You created an application profile, indicated a service in the profile, and deployed the service package. You now want to use your new application with a client.

  1. Check the client code to ensure the application name specified in the connection is the same as that specified in the application profile.

    For example, if your application name is myapp, your client code must also contain myapp:

    ...
    // set up application specific information to be supplied to the System        
    char * appName = "myapp";...
    ...
  2. Ensure the session type in the client code matches that specified in the application profile.

    For example, if in your application profile you have the session type ShortRunningTasks, your client code must also specify the same session type:

    ...
    // Create a synchronous Session        SessionPtr sesPtr = conPtr->createSession("mySession", "ShortRunningTasks",SF_RECEIVE_SYNC);
    ...
    Note:

    If you have not selected to create a custom session type and used the default session type, specify DefaultSession as the type.

  3. Compile your client and run it on any host in the cluster.