BookmarkSubscribeRSS Feed
freshstarter
Quartz | Level 8

Hello,

 

We are currently building a SAS Viya environment and need to schedule overnight (batch) jobs.

 

In our setup, batch jobs require access to certain secrets that should not be available in interactive user sessions. To handle this in Kubernetes, we have separated pod templates as follows: a compute pod template for interactive user sessions, and a batch pod template for batch jobs where the required secrets are mounted as files onto the pod.

 

Additionally, we have configured sas.batch.server (autoexec) with several  libname statements to assign authenticated libraries when a batch session starts.

When users schedule jobs via SAS Studio or SAS Environment Manager, the jobs are executed using the Job Execution Launcher context, which currently uses the compute pod template. While we can modify this context to use the batch pod template, we are concerned that the sas.batch.server (autoexec) configuration may not be executed as part of these scheduled jobs.

 

To address this, 

 

  • Create a new batch context based on the Job Execution Launcher context
  • Configure the Job Execution Launcher context to use the batch pod template

With this setup, any job execution from SAS Studio or SAS Environment Manager would use the Job Execution Launcher context, which in turn would use the batch pod template. This should also ensure that the sas.batch.server autoexec is triggered as part of the batch execution.

 

 

Could you please confirm whether this is a valid and recommended approach for separating batch and interactive workloads in SAS Viya? Also, how can we verify which context is being used for job execution, and what is the correct way to configure or enforce the use of a specific context (such as the new batch context) for scheduled jobs?

 

Finally, we would prefer not to use the SAS Viya CLI for submitting batch jobs. Is it possible to submit and schedule batch jobs via the UI, similar to how it is done in SAS 9?

 

Any guidance would be greatly appreciated.

2 REPLIES 2
davidzanter
SAS Employee

For the Last Question about a UI; Does this help: The Job Scheduler in Environment Manager:

https://www.youtube.com/watch?v=JHh4kFGLEw0&t=362s

gwootton
SAS Super FREQ
In the SAS Viya Platform, batch servers are run by the batch service in response to calls made by the batch plugin of the CLI.
Compute servers are run by the compute service, and can be interactive (e.g. SAS Studio) or scheduled.
So if you are looking to have whatever custom settings you are applying available to jobs scheduled through the SAS Viya Platform, you would be using compute contexts, servers, pod templates and the sas.compute.server configurations.
As far as limiting who has access to start a compute server on a given context and under what conditions, that would be controlled through rules applied to the Create permission on the /compute/contexts/<contextid>/sessions endpoint.
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

Learn how to explore data assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 284 views
  • 0 likes
  • 3 in conversation