< Previous | Next >

Task 3-1: Deploying the solution

You deploy a solution so that it is ready for use.

About this task

In this lesson, you start the Insight Server and deploy the solution. Then, you optionally use the REST API to verify some details about your solution.

Procedure

  1. Start the sample server:
    1. Open the Samples Console perspective. The samples console provides access to all the samples and tutorials that can help you to learn about the product and provides a way to start the sample server.
    2. In the Sample Server view, click the Start the sample server icon.

      After a few moments, the message Server cisDev started is displayed in the Console view.

  2. Deploy the solution:
    1. Switch to the Decision Insight perspective.
    2. In the Solution Map view, click Manage deployment configurations.
      The solution map contains the link to configure and deploy a solution
    3. In the Deployment Configurations wizard, click New. Enter Redeploy MyCreditCardSolution as the deployment configuration name, click OK, then click Next.
    4. Keep the default setting of Local server and the default server name cisDev.
    5. Specify the path to the administrator toolkit. The default is <InstallDir>/runtime/ia/bin.
    6. Click Next.
    7. Select Use existing properties file and specify the location <InstallDir>/runtime/ia/etc/connection.properties. This file specifies several properties of the server.
    8. Click Finish.
    9. In the pop-up window, click Yes to confirm the immediate deployment of the solution.

    The solution is exported to a solution archive and deployed to the server cisDev. After a few moments, the message Server configuration file successfully updated for server: cisDev is displayed in the console.

    By giving the name Redeploy MyCreditCardSolution as the deployment configuration name, a shortcut menu item is added to the Deploy menu that is available by right-clicking the project in the Solution Explorer view. Use this menu item if you want to update and redeploy the solution later on.

  3. Verify the deployment by using the REST API:
    1. Go back to the Samples Console perspective.
    2. In the Sample Server view, click Insights sample server > View the deployed solutions by using the REST API
    3. Accept any security exception that is displayed.
      Output similar to the following XML is displayed in your default browser, indicating that the solution is deployed:
      <solutions>
         <solution name="MyCreditCardSolution" version="MyCreditCardSolution-0.0"/>
      </solutions>
      If the correct XML is not displayed, wait a few moments and refresh the page.
    4. Enter the following URL: http://localhost:9080/ibm/ia/rest/solutions/MyCreditCardSolution/entity-types

      The default port is 9080. If the default is not valid, use the value that is specified in the <WLP_USER_DIR>/servers/cisDev/bootstrap.properties file.

      Output similar to the following XML is displayed in your browser, showing the customer and account entities that you created:
         ...
         <attribute name="entityTypes">
            <collection type="entityTypes">
                  <string>creditcard.Customer</string>
                  <string>creditcard.Account</string>
             </collection>
         </attribute> 
        <attribute name="query">
            <string>?solution=MyCreditCardSolution</string>
        </attribute>

      The URL changes to port 9443 because HTTPS is used for secure traffic.

    5. Enter the following URL: http://localhost:9443/ibm/ia/rest/solutions/MyCreditCardSolution/aggregate
      Output similar to the following XML is displayed in your browser, showing the global aggregates that you created:
      <object type="Collection[aggregate]">
        <aggregates>
          <collection>
            <object type="aggregate">
              <attribute name="id">
                <string>defvarAveragex95Riskyx95Accountx95Balance</string>
              </attribute>
              <attribute name="value">
                <double>0.0</double>
              </attribute>
            </object>
            <object type="aggregate">
              <attribute name="id">
                <string>defvarAveragex95Transactionx95Amountx95Perx95Day</string>
              </attribute>
              <attribute name="value">
                <double>0.0</double>
              </attribute>
            </object>
          </collection>
        </aggregates>
      </object>
  4. Optional: Verify the deployment by reviewing the log in the file system:
    1. Navigate to the <InstallDir>/runtime/wlp/usr/servers/cisDev/logs directory.
    2. Use a text editor or other tool to open the file console.log.

    3. Scroll to the bottom of the log and look for the following message:
      CWMBD0060I: Solution MyCreditCardSolution-0.0 ready.
      The ready message indicates that the solution is deployed.
    4. Close the console.log file.

What to do next

In the next step, you test your solution.
< Previous | Next >