In-Database Deployment Package for Aster nCluster

Prerequisites

SAS Foundation and the SAS/ACCESS Interface to Aster nCluster must be installed before you install and configure the in-database deployment package for Aster nCluster.

Overview of the In-Database Deployment Package for Aster nCluster

This section describes how to install and configure the in-database deployment package for Aster nCluster (SAS Embedded Process 9.3).
The in-database deployment package for Aster nCluster must be installed and configured before you can use the %INDAC_PUBLISH_MODEL scoring publishing macro to create scoring files inside the database.
The scoring publishing macro is included in the SAS/ACCESS Interface to Aster nCluster. For more information about using the scoring publishing macro, see the SAS In-Database Products: User's Guide.
The in-database deployment package for Aster nCluster contains macros, run-time libraries, and other software that is installed on your Aster nCluster system so that the SAS scoring files created in Aster nCluster can access the routines within its run-time library.

Aster nCluster Installation and Configuration Steps

  1. If you are upgrading from a previous release or installing a maintenance release, follow the instructions in Upgrading from Previous Versionsbefore installing the in-database deployment package.
  2. Install the in-database deployment package.

Upgrading from Previous Versions

Follow these steps to upgrade from a previous release.
  1. Log in to the queen node.
    ssh -l root name-or-ip-of-queen-node
  2. Move to the partner directory.
    cd /home/beehive/partner
  3. If a SAS directory exists in the partner directory, enter this command to remove an existing installation from the queen.
    rm -rf SAS
    If you want to perform a clean install, you will also want to enter these command to remove the SAS directory from all the workers.
    for ip in `cat /home/beehive/cluster-management/hosts | grep node |
       awk '{print $3}'`; \
    do \
       echo $ip; \
       ssh $ip "rm -r /home/beehive/partner/SAS/"; \
    done

Installing the In-Database Deployment Package Binary Files for Aster nCluster

The in-database deployment package binary files for Aster nCluster are contained in a self-extracting TAR file named tkindbsrv-9.3-1_lax.sh. The TAR file is located in the SAS-install-directory/SASTKInDatabaseServer/9.3/AsternClusteronLinuxx64/ directory.
To install the in-database deployment package binary files for Aster nCluster, you need root privileges for the queen node. Once you are logged in to the queen node as root, you need to create a directory in which to put tkindbsrv-9.3-1_lax.sh, execute tkindbsrv-9.3-1_lax.sh,. Then install the SAS_SCORE SQL/MR function.
Enter these commands to install the SAS System Libraries and the binary files:
  1. Log in to the queen node.
    ssh -l root name-or-ip-of-queen-node
  2. Move to the parent of the partner directory.
    cd /home/beehive/
  3. Create a partner directory if it does not already exist.
    mkdir partner
  4. Move to the partner directory.
    cd partner
  5. Use Secure File Transfer Protocol (SFTP) to transfer the self-extracting TAR file to the partner directory.
    1. Using a method of your choice, start the SFTP client.
      Here is an example of starting SFTP from a command line.
      sftp root@name-or-ip-of-queen-node:/home/beehive/partner
    2. At the SFTP prompt, enter this command to transfer the TAR file.
      put tkindbsrv-9.3-1_lax.sh
  6. (Optional) If your SFTP client does not copy the executable attribute from the client machine to the server, change the EXECUTE permission on the TAR file.
    chmod +x  tkindbsrv-9.3-1_lax.sh
  7. Unpack the TAR file in the partner directory.
    ./tkindbsrv-9.3-1_lax.sh
  8. Change to the directory where SAS is installed.
    cd /home/beehive/partner/SAS/SASTKInDatabaseServerForAster/9.3-1/sasexe
  9. Install the SAS_SCORE and other SQL/MR functions.
    1. Start the ACT tool.
      /home/beehive/clients/act -U db_superuser -w db_superuser-password
      -d database-to-install-sas_score-into
    2. (Optional) If this is not the first time you have installed the in-database deployment package for Aster nCluster, it is recommended that you remove the existing SQL/MR functions before installing the new ones.
      \remove sas_score.tk.so
      \remove sas_put.tk.so
      \remove sas_row.tk.so
      \remove sas_partition.tk.so
    3. Enter the following command to install the new SQL/MR functions. The SQL/MR functions need to be installed under the PUBLIC schema.
      \install sas_score.tk.so
      \install sas_put.tk.so
      \install sas_row.tk.so
      \install sas_partition.tk.so
  10. Exit the ACT tool.
    \q
  11. Verify the existence and current date of the tkast-runInCluster and tkeastrmr.so files. These two binary files are needed by the SAS SQL/MR functions.
    for ip in \
    `cat /home/beehive/cluster-management/hosts | grep node | awk '{print $3}'`; \
       do \
       echo $ip; \
       ssh $ip "ls -al /home/beehive/partner/SAS/SASTKInDatabaseServerForAster/9.3-1 |
          grep tkeastrmr.so"; \
       ssh $ip "ls -al /home/beehive/partner/SAS/SASTKInDatabaseServerForAster/9.3-1
          /utilities/bin/ | grep tkast-runInCluster"; \
    done

Validating the Publishing of the SAS_SCORE() Function

To validate that the SAS_SCORE() function was installed, run the \dF command in the Aster nCluster Client or through the following views:
  • nc_all_sqlmr_funcs, where all returns all functions on the system
  • nc_user_sqlmr_funcs, where user returns all functions that are owned by or granted to the user
  • nc_user_owned_sqlmr_funcs, where user_owned returns all functions that are owned by the user

Aster nCluster Permissions

The person who installs the in-database deployment package binary files in Aster nCluster needs root privileges for the queen node. This permission is most likely, but not necessarily, needed by the Aster nCluster system administrator.
For Aster nCluster 4.5, no permissions are needed by the person who runs the scoring publishing macros, because all functions and files are published to the PUBLIC schema.
For Aster nCluster 4.6, the following schema permissions are needed by the person who runs the scoring publishing macros, because all functions and files can be published to a specific schema.
USAGE permission
GRANT USAGE ON SCHEMA yourschemaname TO youruserid
INSTALL FILE permission
GRANT INSTALL FILE ON SCHEMA yourschemaname TO youruserid
CREATE permission
GRANT CREATE ON yourschemaname TO youruserid

Documentation for Publishing SAS Scoring Models in Aster nCluster

For information about how to publish SAS scoring models, see the SAS In-Database Products: User's Guide located at http://support.sas.com/documentation/onlinedoc/indbtech/index.html