You are here: 1 – Setup > 1.2 Viewpoint installation and setup > Configuring Viewpoint for quoting

Configuring Viewpoint for quoting

Quoting allows you to view the price of a potential service before it is actually submitted to Moab.

Viewpoint Quoting is meant to be enabled by the Adaptive Computing Professional Services team. It is recommended that you contact that department to set up this feature.

To configure Viewpoint for quoting

Before you configure Viewpoint for quoting, make sure that you have configured NAMI in Moab. For more information, see "Charging a Workflow" in the Moab Workload Manager Administrator Guide.

  1. First, ensure all required dependencies are installed to run the bank.quote.viewpoint.pl script (located in your Moab install directory).
  2. When you run bank.quote.viewpoint.pl, you should see:

    [root]# /opt/moab/tools/mam/bank.quote.viewpoint.pl
    usage: bank.quote.viewpoint.pl <xml>

    If, instead, you see an error about missing Perl modules, please review the Moab Server Installation documentation on how to install the Perl modules required to run integration scripts.

  3. Make sure that bank.quote.viewpoint.pl is owned by root and that the SUID bit is on. For example:
  4. [root]# cd /opt/moab/tools/mam
    [root]# ls -l
    [root]# -rwsr-xr-x. 1 root root 3658 Oct  5 17:37 bank.quote.viewpoint.pl
  5. Edit the /opt/moab/etc/nami.cfg file to ensure that the Moab Accounting Manager user can write the NAMI logs. Do the following:
    1. If you followed the MAM installation documentation, the user running MAM should be named "moab." However, if you are not sure what the user is called, you can run the following command:
    2. [root]# ps -ef | grep gold
      moab      2203     1  0 20:43 pts/0    00:00:00 /usr/bin/perl -w /opt/mam/sbin/goldd
    3. Now that you know the MAM user, edit the nami.cfg file:
    4. [root]# vi /opt/moab/etc/nami.cfg
    5. Edit the line for LOG[config]:
    6. LOG[config]                         path=/tmp/nami.log
  6. To test that your log configuration worked, you can run bank.quote.viewpoint.pl with some sample text as the MAM user. For example:
  7. The script will scold you for not passing in XML, but you should be able to see lines output to the nami.log file.

    [root]# /opt/moab/tools/mam/bank.quote.viewpoint.pl someTestText
    :1: parser error : Start tag expected, '<' not found
    someTestText
    ^

    Now if you examine the nami.log file, you should see the sample text. For example:

    [root]# tail /opt/moab/log/nami.log
    2012-10-13 21:10:36,863 [3086] INFO Quote main::  - INPUT: someTestText
  8. Next, log in to Viewpoint as the super user and configure the Moab connection. For more information, see Setting the Moab connection (for quoting).
  9. Be sure to connect as the user running MAM.

  10. Set the mam.secretKey parameter in the mws-config.groovy file to match the token.value in /opt/mam/etc/site.conf. Do the following:
    1. Edit the mws-config.groovy file:
    2. [root]# vi /opt/mws/etc/mws-config.groovy
    3. Set the mam.secretKey parameter. For example, if site.conf has the line token.value = nIoyzXVi2iiSoybthygQEJsa, then edit (or add) this line to the mws-config.groovy file:
    4. mam.secretKey = "nIoyzXVi2iiSoybthygQEJsa"
  11. Configure the quoting section of the ViewpointConfig.groovy file so that the key points to the bank.quote.viewpoint.pl script, and set quoting_enabled to "true". For example:
  12. billing {
       quoting_enabled="true"
       quote="/opt/moab/tools/mam/bank.quote.viewpoint.pl"
    }
  13. Save your changes to the ViewpointConfig.groovy file.
  14. Validate that you configured quoting correctly by doing the following:
    1. Log in to Viewpoint as a user that exists in LDAP and in MAM.
    2. Request a service and navigate to the Cart Details page (for more information, see Using the cart).

If you have configured quoting correctly, you should see billing information on the shopping cart page. For more information, see Using the cart.

Related topics 

© 2015 Adaptive Computing