Deploying a new application

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

About this task

At a glance
  1. Create the service package
  2. Create the application
  3. Configure the client to run with the new application

Procedure

  1. Create the service package.

    Before you can deploy a service, you must create a service package.

    Packaging a IBM® Spectrum 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 preinstalled 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 decompression 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
  2. Create the service package on Windows:
    1. Go to the directory in which the service is located.

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

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

      gzip SampleServiceCPP

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

  3. Create the service package on Linux®:
    1. Go to the directory in which the service is located.

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

    2. Create the service package by compressing the service executable into a tar file:
      tar -cvf SampleServiceCPP.tar SampleServiceCPP
      gzip SampleServiceCPP.tar

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

  4. Create the application.

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

    In IBM Spectrum Symphony DE, the Wizard deploys your service package and registers your application. In IBM Spectrum 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 for more details.

    1. In the cluster management console, click Workload > Symphony > Application Profiles.

      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 cluster management console. Your new application is displayed as enabled.

  5. 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", linebreak pdf"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.