BookmarkSubscribeRSS Feed

How SAS Viya Platform Updates Affect CAS Servers

Started ‎11-29-2023 by
Modified ‎11-29-2023 by
Views 491

SAS recommends updating the SAS Viya platform at least every 4 months on stable cadence or every 6 months on Long-term Support (LTS) cadence. The SAS Viya platform administrator must understand the SAS Viya platform deployment update process, most specifically regarding the CAS servers. CAS servers will be updated only when their associated CASDeployment custom resources are updated and the CAS server restarted to use the new CASDeployment custom resources version.

In this post, I will share with you key considerations you must know to successfully update CAS servers in your SAS Viya platform deployments.
 

Update the SAS Viya Platform Deployment

 

When the SAS Viya platform administrator needs to update the SAS Viya platform deployment, the SAS® Viya® Platform Administration guide suggests the following process.

  1. Download the new SAS Viya platform deployment assets.
  2. Review the SAS Viya platform deployment notes.
  3. Inform the SAS Viya platform users and administrators about the upcoming software update.
  4. If you have multiple CAS servers in the SAS Viya deployment, regenerate their set of manifests using the create-cas-server.sh script.
  5. Re-deploy SAS Viya platform.
  6. Restart the CAS servers after the SAS Viya platform deployment is updated.


This process is well described but as a SAS Viya platform administrator, I would like to provide you with more detailed processes regarding steps 4 and 6, including when you need to restart CAS servers and some of the CAS server features that affect your restart decisions.

 

How CAS Servers Are Impacted by SAS Viya Platform Updates

The manifests that define CAS servers are provided by SAS with each SAS Viya platform deployment assets in the /sas-bases/overlays/cas-server/ directory. These manifests are potentially updated with each SAS Viya platform update. Normally, the manifests in that directory are only used by the default CAS server.

 

gc_1_BlogPost20230915_0000-01_25.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

If additional CAS servers were added to the SAS Viya platform deployment, they were created by the SAS Viya platform administrator using the create-cas-server.sh script. This script copies the SAS provided set of CAS server manifests to a new directory, typically in /site-config, to create the new CAS server.

 

 

gc_2_BlogPost20230915_0001-01_25.png

 

When the SAS Viya platform deployment is updated, the SAS Viya platform deployment assets are replaced. All SAS Viya platform deployment customizations, typically in /site-config, are not updated.

gc_3_BlogPost20230915_0002-01_25.png

 

Because the default CAS server directly uses the manifests provided with the new assets in the /sas-bases/overlays/cas-server/ directory:

    • The default CAS server CASDeployment custom resource is always updated after the SAS Viya platform deployment is updated.

      gc_4_BlogPost20230915_0003-01_25.png

       

  • After the SAS Viya platform is redeployed, the default CAS server is updated when restarted.


Regarding additional CAS servers, each CASDeployment custom resource was generated from its own set of manifests that were copied from /sas-bases/overlays/cas-server/ directory by the create-cas-server.sh script. These additional CAS server manifests are not updated automatically when the SAS Viya platform deployment assets are updated. To update the additional CAS servers:

    • Each additional CAS server set of manifests must be regenerated by re-executing the create-cas-server.sh script from the updated SAS Viya platform deployment assets. This updates each additional CAS server CASDeployment custom resource.

      gc_5_BlogPost20230915_0004-01_25.png

       

  • After the SAS Viya platform is redeployed, each additional CAS server must be restarted to be updated.

 

CAS Server Restart Options

How a CAS server is restarted depends on how CAS is configured and how the deployment is managed. See SAS Viya – CAS Server Life Cycle Management for details on stopping and restarting CAS servers.

At least, the CAS server can be restarted using Kubernetes commands. The SAS Viya platform administrator just must delete the existing CAS pods that will restart automatically using the latest CASDeployment custom resources. Using this restart method, all CAS tables must be reloaded, and all CAS sessions are lost.

If the SAS Viya platform was deployed using the Deployment Operator or the sas-orchestration command, the following features can be enabled by the SAS Viya platform administrator and affect the CAS server restart options.

    • CAS Auto-Restart
    • When the SAS Viya platform deployment is updated, by default the CAS servers are not automatically restarted. To change this default, it is possible to enable the CAS Auto-Restart which forces the CAS servers to restart automatically during the SAS Viya platform deployment update.
      But be careful, if CAS Auto-Restart is enabled, this will cause CAS servers disruption since the loaded CAS tables need to be reloaded and the CAS sessions are stopped.

 

    • CAS State Transfer
    • To be able to restart CAS servers preserving all loaded CAS tables and active CAS sessions, it is possible to enable the CAS state transfer feature.
      In this case, the CAS servers must be restarted after the SAS Viya platform deployment is updated. To do that, the SAS Viya platform administrator must initiate the state transfer for each CAS server that is active in the SAS Viya platform deployment.

 


Note: It is not possible to enable CAS auto-restart and state transfer in the same SAS Viya platform deployment.xxx

Click here to see how to enable CAS Auto-Restart or CAS State Transfer.

Enable CAS Auto-Restart

    1. The SAS Viya platform administrator must copy a provided example from the SAS Viya platform deployment asset into the deployment sas-config directory. This file is named cas-auto-restart.yaml and is located in the sas-bases/examples/cas/configure/ directory.
    2. Eventually change the target for this patch applies that is to all CAS servers by default.
    3. Reference this new sas-config/cas-auto-restart.yaml manifest must be referenced into the transformer field of the kustomization.yaml file.
    4. Finally, the SAS Viya platform administrator must build and apply the new SAS Viya platform deployment manifest using the specific deployment method (Deployment Operator or the sas-orchestration tool).

 

Enable CAS State Transfer

    • For the default CAS server:
      1. The SAS Viya platform administrator must reference two CAS server overlays into the kustomization.yaml file:
        • The sas-bases/overlays/cas-server/state-transfer manifests into the resources field.
        • The sas-bases/overlays/cas-server/state-transfer/support-state-transfer.yaml manifests into the transformer field.
      2. Finally, the SAS Viya platform administrator must build and apply the new SAS Viya platform deployment manifest using the specific deployment method (Deployment Operator or the sas-orchestration tool).
    • For other CAS servers:
      1. The SAS Viya platform administrator must create the new CAS server set of manifests using the create-cas-server.sh script and its -r or --transfer option to enable the CAS server state transfer.
      2. Reference this new CAS server set of manifests into the resources field of the kustomization.yaml file.
      3. Finally, the SAS Viya platform administrator must build and apply the new SAS Viya platform deployment manifest using the specific deployment method (Deployment Operator or the sas-orchestration tool).

 

In Summary...

In the table below, I tried to summarize all the steps you must pass through to update your SAS Viya platform deployment depending on the SAS Viya platform deployment methods you used, and the restart features you enable for your CAS servers.

This table will help you define the SAS Viya platform update process that you must use in your specific environment.

Kubernetes Commands (kustomize and kubectl) Deployment Operator with or without using Deployment as Code (DAC) sas-orchestration command with or without using Deployment as Code (DAC)
Download the new SAS Viya platform deployment assets.
Review the SAS Viya platform deployment notes.
If you have multiple CAS servers in the SAS Viya deployment, regenerate their set of manifests using the create-cas-server.sh script.
Inform the SAS Viya platform users and administrators about the upcoming software update.
Re-deploy SAS Viya platform
Deployment Using Kubernetes Commands
Deployment Using the SAS Viya Platform Deployment Operator
Deployment Using the sas-orchestration Command
Create the Kubernetes manifest (site.yaml). Create the new SASDeployment Custom Resource.  
Deploy the new version by applying the new Kubernetes manifest (5 steps). Apply the SASDeployment Custom Resource. Deploy the software by running the deploy command using the sas-orchestration tool.
Restart all CAS servers after the SAS Viya platform deployment is updated.
  CAS Auto-Restart CAS State Transfer CAS Auto-Restart CAS State Transfer
All CAS servers must be restarted. All CAS servers restart automatically after the SAS Viya platform deployment is updated. CAS state transfer has to be initiated for each CAS server. All CAS servers restart automatically after the SAS Viya platform deployment is updated. CAS state transfer has to be initiated for each CAS server.
All CAS tables must be reloaded, and all CAS sessions are lost. All CAS tables must be reloaded, and all CAS sessions are lost. All loaded CAS CAS tables and CAS sessions are persisted. All CAS tables must be reloaded, and all CAS sessions are lost. All loaded CAS CAS tables and CAS sessions are persisted.

 

 

I hope this article has been helpful to you.

 

References:

      SAS documentation:

 

 

        Additional Articles
Version history
Last update:
‎11-29-2023 11:07 AM
Updated by:
Contributors

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!

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