BookmarkSubscribeRSS Feed

Scripting SAS 9.4 License Updates (quietly)

Started ‎09-11-2017 by
Modified ‎09-12-2017 by
Views 7,827

One of the regular tasks of managing a SAS 9.4 deployment is updating licenses in the appropriate locations when a license is about to expire or has expired.  For those of you who have applied these licenses you know that the SAS Deployment Manager (SDM) is the tool to get the job done.  Although applying the new SID file is a fairly straightforward task, there may be a need or a preference to run the SDM without the GUI.  In this blog we will review a method of applying licenses without the GUI that you may not have encountered before now.

 

The Requirement

The SAS Global Enablement and Learning team creates and manages many collections of multi-machine SAS environments to enable the technical services community at SAS.  As you are probably aware, the license file associated with a new SAS 9.4 deployment is valid for one year, plus a warning and grace period.  Therefore there is a need to update the licenses of those collections as efficiently as possible and with little to zero errors. In operational/production environments, automation and efficiency are typically key aspects of maintaining a deployment. Therefore the administrators of such environments may prefer to execute a command/script  to accomplish the update in a repeatable and timely manner..  

 

The Solution

By now you have figured out where this is headed.  Yes, it is accomplished using "quiet" mode.  Just as you can capture a response file for the SDW and use it for playback of a deployment, you can capture the responses from the SDM for playback.  However to do so on a repeated basis you will need tweak the response files.  This capability has been around since the SAS 9.3 days.

  

mdt_33_sid_01b.png

  

 

 The examples in this blog are for a Visual Analytics deployment on RHEL. And if you are familiar with Visual Analytics 7.x deployments, you are probably aware that there are three separate components that are licensed when using the SDM:

 

  • Foundation
  • LASR
  • Metadata

Updating the licenses for a VA deployment requires two passes through the SDM.  One for Foundation and LASR and one for Metadata.  The update of Foundation and LASR requires all services be stopped before applying.  And the update of Metadata obviously requires that the Metadata server be started.  

 

Shown below is the architecture of an environment that required an update of licenses.  The environment consists of five Red Hat machines with SAS Visual Analytics and SAS EBI deployed across them.  Machine sasserver01 contains the metadata server and VA compute server, as well as the LASR root node and Hadoop name node.  Machines sasserver02-sasserver04 contain the LASR worker and Hadoop data servers.  And sasserver05 houses the VA and EBI middle tier as well as the EBI compute server.  As a result of this configuration license updates are required on sasserver01 and sasserver05. GATE Enterprises - SAS_Visual_Analytics_7.3_Architecture_Views.v1.04.png

 

 

Capture the responses for Foundation and LASR

To apply a license via a response file, it is first necessary to capture the responses using the same method as the SDW.  Execute the SDM as the SAS installer account with the -record and -responsefile parameters.

 

cd /opt/sas/sashome/SASDeploymentManager/9.4/ ./sasdm.sh -record -responsefile ~/Response_Base_TKLASR.txt

 

Once the prompts have been select, view the response file to familiarize yourself with the parameters. Notice that "renewalLicense" is the task that is chosen.

 

 

Apply the new Foundation/LASR license

Now that the response file has been created, run the SDM again as the SAS installer account in quiet mode and reference the response file.

 

./sasdm.sh -responsefile ~/Response_Base_TKLASR.txt -quiet

 

The quiet SDM execution does not provide a response back to the session when it completes, but the log for it can be found in the .SASAppData subdirectory of the home directory for the account used to apply it.

 

/home/sasinst/.SASAppData/SASDeploymentWizard/IT_2017-08-02-14.37.58_install.log

 

This install log doesn't show the results of the setinit job, but the path of the SETINIT log can be found in the IT install log.  Although you must view a second for the Foundation update, the results of applying the LASR license can be viewed in this (IT install) log.

 

2017-08-02 14:38:01    InstallationTask - tkelic.so is to be Changed 2017-08-02 14:38:01    LogLineWriter - info: Applying license. 2017-08-02 14:38:01    LogLineWriter - info: SiteID: 700***** 2017-08-02 14:38:01    LogLineWriter - info: Expiration: Thu Nov  1 01:00:00 2018 2017-08-02 14:38:01    LogLineWriter - info: LASR MPP CPUS: 2048 2017-08-02 14:38:01    LogLineWriter - info: LASR SMP CPUS: 2048 2017-08-02 14:38:01    LogLineWriter - info: HPA MPP CPUS: 0 2017-08-02 14:38:01    LogLineWriter - info: HPA SMP CPUS: 0 2017-08-02 14:38:01    ApplyTKLasrLicenseTask - /opt/sas/sashome/SASFoundation/9.4/utilities/bin/applylasrlic 2048,2048,0,0,1541048400,,700*****,bb2e3c9*******335ee0c26f3c542895 was done successfully.

 

To verify that the SETINIT was successful for Foundation, you can review the setinit log at this location /opt/sas/sashome/SASFoundation/9.4/install/admin/logs/setinit_2017-08-02-14.37.58.log.  Here is a snippet from that log.

 

Site validation data before saving/zapping Current version: 9.04.01M4P110916 Site name:    'GEL 17w31 VA VS EBI DI EG DLH - LAX Prod'. Site number:  700*****. Expiration:   24JUL2018. Grace Period:  45 days (ending 07SEP2018). Warning Period: 55 days (ending 01NOV2018). System birthday:   17JUL2017. Operating System:   LIN X64 .

 

Future invocations of the SDM to update the licenses would just require a change to the path of the new SID file within in the response file.  

 

Apply the license to Metadata

Some solutions require license updates to Metadata.  Therefore a second execution of the SDM with the -record and -responsefile options will be required to capture the responses.  The SDM metadata update contains several additional prompts, some of which will automatically be supplied.  They can be seen in the example below.

 

 

Once responses have been captured you will have to apply the license.  Note that this update takes longer than updating Foundation and LASR.  This update may take a minute or two as opposed to the Foundation update that takes seconds.  If necessary it will start the metadata server.

 

./sasdm.sh -responsefile ~/Response_Metadata.txt -quiet

 

Like the Foundation/LASR update, there is no indication that is written back to the session.  The SDM log can be scanned to verify it completed successfully.

 

/home/sasinst/.SASAppData/SASDeploymentWizard/SDM_2017-08-02-15.49.41.log

 

The log for the loadSetinitintoMetadata task can be found at this location:

 

/opt/sas/config/Lev1/Logs/Configure/cfgwizard_loadSetinitintoMetadata_2017-08-02-15.50.20.log

 

But the easiest way to verify that the setinit was updated in metadata is use the SAS Management Console.  Drill down to Metadata Utilities under Metadata Manager, right click on the utilities folder and select "View metadata setinit details".

 

mdt_33_sid_02.png

   

 

The resulting window will show the updated setinit with each product number.

 

mdt_33_sid_03b.png 

Since the response file contains the encrypted SAS administrator password, you'll want to ensure that the file is secured so that only the installer account running the SDM has access to it.  And future updates will require that the SID file path and file name be updated to reflect the current SID file.  Finally you'll need to restart all of the services. That's all there is to it.  

 

Final Thoughts

Although the license file update process is a well-known process for any installer or administrator, the capability to run in quiet mode may not be so popular.  Once the response files are generated, it is easy to tweak them to invoke in quiet mode for future updates.  This assumes the configuration has not changed. The examples in this blog reflect a deployment on RHEL, but a similar process can be followed on other platforms.  

 

References

SAS® Deployment Wizard and SAS® Deployment Manager 9.4: User’s Guide (Chapter 7)

Software License Renewal for Planned Unix Deployments

Software License Renewal for Planned Windows Deployments

Comments

Thanks Mark for sharing. This is very helpful.

 

--Simon

 

Recording a response file is something many might not realize the SAS Deployment Manager is even capable of.  Many likely have used that functionality with the Deployment Wizard.  So updating the licenses is one use case, there are many other opportunities as well.

 

=G=

Thank you @MarkThomas.

 

Let me cross reference with a post recently shared by @MichelleHomes and @PaulHomes about ensuring to check the license in the SAS metadata: https://communities.sas.com/t5/Administration-and-Deployment/Admin-Tip-How-to-check-a-SAS-Setinit-Li...

Version history
Last update:
‎09-12-2017 12:06 PM
Updated by:
Contributors

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags