Administer > Content utilities > IDK > IDK quick start

IDK quick start

This section shows how to create, build, and upload a simple ISM. After the upload operation, you can run the SA Client and examine the software policy containing the uploaded ISM.

Perform the following steps in a terminal window of the host where you have installed the IDK. Unless otherwise noted, the commands are the same on Unix and Windows.

  1. Unix: Log in as root to the server where you installed the IDK.

    If you cannot log in as root, then log in as another Unix user and set the CRYPTO_PATH environment variable as described in CRYPTO_PATH.
  2. Windows: Open a terminal window and make sure that the CRYPTO_PATH environment variable is set.
  3. Grant your user the privilege to upload ISMs by entering the ismusertool command, for example:
    ismusertool --addUser johndoe

    This command asks you to confirm that you are contacting the core through an agent gateway:

    Using an agent gateway to reach an Opsware Core.
    Is this correct? [y/n]: y


    Next, the command prompts for the Opsware admin user name and password:

    Enter Opsware Admin Username: admin
    Enter admin's Opsware Password:

    For more information, see ISMUser tool.
  4. Create a new ISM.

    For example, to create an ISM named foo, enter the following command:

    ismtool --new foo

    This command creates a directory named foo at the current directory level. The ISM is made up of the contents of the foo directory. You’ll specify the foo ISM in the subsequent ismtool commands.
  5. Add the application files to the ISM.

    One way to add the application files is to copy one or more archives to the bar subdirectory. For example, if the application bits are in a file named mytest.zip, you might add them to the ISM as follows:

    Unix:
    cp /tmp/mytest.zip foo/bar

    Windows:
    copy c:\temp\mytest.zip foo\bar
  6. Set the path to the software policy that will contain the ISM you upload in a later step.

    You must have Write Objects Within Folder permission to the folder that contains the software policy. Folder permissions are set on the Folder Properties window of the SA Client.

    The following ismtool command sets the path to the software policy named Quote Policy:
    Unix:
    ismtool --opswpath '/My Kit/Service/Quote Policy' foo
    Windows:
    ismtool --opswpath "/My Kit/Service/Quote Policy" foo

    On Unix you enclose the path in single quotes, but on Windows you use double quotes. For both Unix and Windows, the path contains forward slashes.

  7. Build the packages within the ISM by entering the following command:
    ismtool --build foo

    This command creates three packages in the foo/pkg subdirectory. On a Linux system, these packages are as follows:

    foo-1.0.0-1.i386.rpm
    foo-ism-1.0.0-1.i386.rpm
    ismruntime-rpm-3.0.0-1.i386.rpm


    The foo-1.0.0-1.i386.rpm package contains the application bits, which in this example were copied to the foo/bar subdirectory in Add the application files to the ISM.One way to add the application files is to copy one or more archives to the bar subdirectory. For example, if the application bits are in a file named mytest.zip, you might add them to the ISM as follows:Unix:cp /tmp/mytest.zip foo/barWindows:copy c:\temp\mytest.zip foo\bar. The foo-ism-1.0.0-1.i386.rpm package holds the installation hooks and control scripts. (Because this example is simple, it has no control scripts.) The ismruntime-rpm-3.0.0-1.i386.rpm package contains the SA shared runtimes that the Server Agent will use when it installs the package on a managed server.

    Note that the package type (RPM) corresponds to the native packaging engine of a Linux System. On Windows, the --build command creates following MSI packages in the foo\pkg subdirectory:

    foo-1.0.0-1.msi
    foo-ism-1.0.0-1.msi
    ismruntime-msi-3.0.0-1.msi
  8. Upload the ISM into the software policy by entering the following command:
    ismtool --upload foo

    This command generates several prompts. First, it asks you to confirm the core into which you are uploading the ISM:
    Using the following Opsware Core:

    Data Access Engine : d02 192.168.198.91:1004
    Software Repository: d02 192.168.198.91:1003
    Command Engine : d02 192.168.198.91:1018

    Is this correct? [y/n]: y


    Next, the --upload command prompts for the Opsware user and password:

    Enter Opsware Username: johndoe
    Enter johndoe’s Opsware Password:
    .. .
    Success!
  9. In the SA Client, open the software policy and verify that it contains the ISM you uploaded in the preceding step.