In a multi-tier deployment of the SAS Intelligence Platform, starting and stopping the SAS servers has to follow a specific order.
Until recently, I thought that the only choices for starting and stopping the servers in a multi-tier SAS deployment was to do it manually (ugh!), write custom scripts (fun, but time-consuming), or look for a third-party tool to manage the process. None of these choices is ideal in terms of being easy to use and easy to implement.
Then I came across the SAS Global Forum Paper, An Oasis of Serenity in a Sea of Chaos: Automating the Management of Your UNIX/Linux Multi-tiered SA..., which describes the SAS Local Services Management (SAS_lsm) utility.
A quick summary of the SAS_lsm utility is that it uses a configuration file customized to your deployment and ssh commands to orchestrate the operation of the SAS servers. It leverages the sas.servers script on each machine and offers a single command to start, stop, and check the status of the SAS servers across all the tiers in your deployment. For more details see Usage Note 58231: Utility that manages multi-tiered SAS® services for Unix/Linux deployments.
After reading about the SAS_lsm utility, it seemed like it would be easy to use and easy to install, and much better than the methods I'd used previously. Of course, the best way to get familiar with the SAS_lsm utility is to try it.
I decided to try the SAS_lsm utility on a SAS deployment with six Linux machines: three of the six Linux machines are used for a Metadata cluster, two of the Linux machines are used as Application servers, and the remaining Linux machine is used for the Middle tier. The start-up order, tier name and a short description for each machine is listed in the table below; the shut-down order will be the opposite of the start-up order.
Start-up Order |
Tier Name |
hostname |
Description |
1 |
Meta |
meta.demo.sas.com |
Metadata node (first configured node) |
2 |
Meta2 |
meta2.demo.sas.com |
Metadata node |
3 |
Meta3 |
meta3.demo.sas.com |
Metadata node |
4 |
AppSrv |
compute.demo.sas.com |
SAS Application Server (general application server) |
5 |
AppSrvVA |
va.demo.sas.com |
SAS Application Server (supporting Visual Analytics) |
6 |
MidTier |
webapp.demo.sas.com |
Middle Tier |
There were only two prerequisites listed for installing and using the SAS_lsm utility:
Both of these prerequisites were met in my SAS environment, therefore, I didn't need to spend any time setting them up . If your environment doesn't meet these prerequisites, a quick Internet search will give you instructions on installing the BASH shell or setting up SSH.
I followed the steps outlined in Usage Note 58231: Utility that manages multi-tiered SAS® services for Unix/Linux deployments for downloading and installing the SAS_lsm utility to the Meta machine. The installation, including the download and running the installation script, took just a few minutes.
The configuration was also very straight forward. The Global Forum Paper contained detailed examples that were easy to adapt for my environment. Here is the configuration file for my deployment:
You may use any name for the configuration file; I used the default name of multi-tier-MCM.template.
Setting up the configuration file, including time spent referring to examples in the Global Forum Paper , took me between 15 and 20 minutes. I had already read through the paper once and had a good idea what the configuration file needed. You should plan for a little longer setup for your first time configuring the utility.
Once I had the SAS_lsm utility configured, the commands to start, stop, and check the status of the SAS servers worked flawlessly.
Executing the SAS_lsm command without any argument will give these brief usage notes:
<<USAGE>> [bash | sh] SAS_lsm [-a <NUM> | -o <NUM> | -s] -c <CFG>
WHERE
-a NUM start deployment tier services from tier NUM to MAXTIERS
-o NUM stop deployment tier services from MAXTIERS to tier NUM
-s provide status of all deployment tier services
-c CFG specify configuration file
NOTE
-a, -o, and -s options are not to be run concurrently
For my environment, here are the exact commands I used to control the SAS servers across all machines in the deployment:
Start the SAS servers
Check the status of the SAS servers
Stop the SAS servers
Refer to the Global Forum Paper for more on the SAS_lsm command and its options.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.