Package and deploy the sample service

Package and deploy the sample Java service

When you built the sample, the service package was automatically created for you. It is the .zip file located in $SOAM_HOME/5.1/samples/Java/SampleApp.

  1. Copy the service package SampleServiceJavaPackage.zip and the sample application profile SampleAppJava.xml to any host in your cluster that has Symphony commands installed.
  2. On the host to which you have copied the files, set the Symphony environment. For example, if your cluster is installed under /opt/ego directory:
    • For csh or tcsh, use cshrc.platform:

      source /opt/ego/cshrc.platform

    • For sh, ksh, or bash, use profile.platform:

      . /opt/ego/profile.platform

  3. Deploy the service package with the soamdeploy command.
    Note:

    If the SampleAppJava consumer does not exist in the cluster, you must create it using the PMC before issuing the soamdeploy command.

    soamdeploy add SampleServiceJava -p SampleServiceJavaPackage.zip -c /SampleAppJava

    The service package is deployed.

  4. Check the list of deployed services with the soamdeploy view command:
    soamdeploy view -c /SampleApplications/SampleAppJava
  5. Register the application with the soamreg command:
    soamreg SampleAppJava.xml

    The application is registered and enabled.

  6. Check the list of registered applications with the soamview app command:

    soamview app

    You should be able to see an enabled application with the name SampleAppJava on the list.

    If the SampleAppJava application is not enabled, use the soamcontrol app enable command to enable to the application.

    soamcontrol app enable SampleAppJava

Package and deploy the sample C++ service

You must package the files required by your service to create a service package.

For C++, you must create your own service package.

  1. Change to the directory in which the compiled samples are located:

    cd $SOAM_HOME/5.1/samples/CPP/Output/

  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.

  3. Copy the service package SampleServiceCPP.tar.gz and the sample application profile SampleApp.xml to any host in your cluster that has Symphony commands installed.
  4. On the host to which you have copied the files, set the Symphony environment. For example, if your cluster is installed under /opt/ego directory:
    • For csh or tcsh, use cshrc.platform:

      source /opt/ego/cshrc.platform

    • For sh, ksh, or bash, use profile.platform:

      . /opt/ego/profile.platform

  5. Deploy the service package with the soamdeploy command.
    Note:

    If the SampleAppCPP consumer does not exist in the cluster, you must create it using the PMC before issuing the soamdeploy command.

    soamdeploy add SampleService -p SampleServiceCPP.tar.gz -c /SampleAppCPP

    The service package is deployed.

  6. Check the list of deployed services with the soamdeploy view command:
    soamdeploy view -c /SampleAppCPP
  7. Register the application with the soamreg command:
    soamreg SampleApp.xml

    The application is registered and enabled.

  8. Check the list of registered applications with the soamview app command:

    soamview app

    You should be able to see an enabled application with the name SampleAppCPP on the list.

    If the SampleAppCPP application is not enabled, use the soamcontrol app enable command to enable the application.

    soamcontrol app enable SampleAppCPP