Sun Open Telecommunications Platform 2.0 Developer's Guide

Using Native N1 SPS Provisioning Features

To fully benefit from Sun OTP application provisioning service features, the target application deployment can be redesigned using native Sun OTP provisioning components. This can be done by mapping the application deployment elements to native provisioning components. Based on your application distribution model, these elements could be packages (Solaris SVR4, Linux RPM and Deb) or archives (such as zip, tar, jar, ear) or even individual files (like a library, a kernel module, or scripts).

The following sample code demonstrates package-based installation.

Example 1


<installList>
    <installSteps returns='false' name='default' requireLocking='true'>
        <execNative timeout='1800'>
            <inputText><![CDATA[>
                echo "Executing Pre-Install procedures before resource deployement"
                echo "This will be installed into: :[installPath]"
            ]]></inputText>
                   <exec cmd='/bin/sh'></exec>
        </execNative>
            <deployResource></deployResource>
        <execNative timeout='1800'>
            <inputText><![CDATA[
                 echo "Executing Post-Install procedures after resource deployement"
                 pkgadd -d :[installPath] SampleAppPkg
            ]]></inputText>
                   exec cmd='/bin/sh'></exec>
        </execNative>
    </installSteps>
</installList>

The following sample code demonstrates package-based uninstallation.

Example 2


<uninstallList>
    <uninstallSteps returns='false' name='default' requireLocking='true'>
        <execNative timeout='1800'>
            <inputText><![CDATA[>
                echo "Executing Pre-Uninstall procedures before resource undeployement"
            ]]></inputText>
                   <exec cmd='/bin/sh'></exec>
        </execNative>
            <undeployResource></undeployResource>
        <execNative timeout='1800'>
            <inputText><![CDATA[
                 echo "Executing Post-Uninstall procedures after resource undeployement"
                 yes | pkgrm SampleAppPkg
            ]]></inputText>
                   exec cmd='/bin/sh'></exec>
        </execNative>
    </uninstallSteps>
</uninstallList>

Refer to the following guides to create plans, components, and plug-ins using N1 SPS.