The SAS Viya platform administrator must update the SAS Viya platform deployment regularly. SAS expects customers to update their SAS Viya platform deployment at least every 4 months on stable or every 6 months on LTS. If the deployment method is using the SAS Deployment Operator or the sas-orchestration command, SAS Viya platform administrator has to ensure that the sas-orchestration tool image that is pulled is the same as the one required by the new SAS Viya platform deployment assets.
In this article, I will show you how to update the sas-orchestration tool and provide you with a script to help you in this task.
SAS Viya platform can be deployed using several deployment methods:
kustomize
and kubectl
.
The SAS Viya platform administrator could have to update the sas-orchestration tool before updating the SAS Viya platform deployment if it was deployed using the SAS Deployment Operator or the sas-orchestration command (This de facto includes the DAC method).
When the SAS Viya platform deployment must be updated, the SAS Viya platform administrator must:
The sas-orchestration tool version validation could be done using these two steps:
docker images */*/sas-orchestration | awk -F " " '{print $2}'
TAG
1.93.2-20230413.1681403534588
grep "docker pull" $deploy/sas-bases/examples/kubernetes-tools/README.md | awk -F ":" '{print $NF}'
1.97.4-20230503.1683146435603
If this sas-orchestration tool validation version is skipped but the sas-orchestration tool update is required, the next time the SAS Viya platform administrator runs a docker run sas-orchestration
command an error message is generated as illustrated below...
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
In this case, the SAS Viya platform administrator must update the sas-orchestration tool before re-running the command.
The sas-orchestration tool update process is documented only in the SAS Viya platform deployment assets inside the /sas-bases/examples/kubernetes-tools/README.md
file. This file contains the exact version of the sas-orchestration image and how to pull it into the SAS Viya platform deployment.
Assuming that the new SAS Viya platform deployment assets was downloaded...
/sas-bases/examples/kubernetes-tools/
.README.md
file. docker pull cr.sas.com/viya-4-x64_oci_linux_2-docker/sas-orchestration:[version specific to your deployment]
.docker tag cr.sas.com/viya-4-x64_oci_linux_2-docker/sas-orchestration:[version specific to your deployment] sas-orchestration
.cr.sas.com
with your mirror repository address in both commands above.Note: If you use a SAS Viya platform docker images mirror repository, you will have to replace cr.sas.com
with your mirror repository address in both commands above.
Because you will need to frequently update the sas-orchestration tool, I have written a bash
script that will update the sas-orchestration tool using the same steps I just described.
The script allows you to pass arguments to set:
#!/bin/bash
#
# This script is to update the sas-orchestration tool in your SAS Viya platform deployment using your latest deployment assets.
# Initialize environment variables
_deploy=~/project/deploy/gelcorp # You can replace this value with your default SAS Viya platform deployment assets path
_sasRepository=cr.sas.com # The default SAS Viya platform docker images repository
_repository=${_sasRepository}
_sasTag=sas-orchestration # The default SAS Viya platform sas-orchestration docker image tag
_tag=${_sasTag}
_otherParameters=
_debug=0
# Define functions
helpMessage () {
printf "
Usage: ./sas-orchestrationUpdate.sh [arguments]
Arguments:
-d or --debug : To list arguments values for validation, but do not execute the script.
-h or --help : To display the help message
-p or --path : To set your SAS Viya platform deployment assets path
-r or --repository : To set your SAS Viya platform docker images mirror repository
-t or --tag : To set the SAS Viya platform sas-orchestration docker image tag
Other parameters/arguments values are just ignored.
"
}
debugMessage () {
printf "
\n#############################
# current parameters values #
#############################
Deployment assets path : ${_deploy}
Deployment repository : ${_repository}
sas-orchestration tag : ${_tag}
Other bad arguments are: \"${_otherParameters[*]}\"
#############################\n\n"
}
# Parse script arguments
while [[ ${#} -gt 0 ]]
do
key="${1,,}"
case ${key} in
-d|--debug) # To use the debug mode. Nothing executed.
_debug=1
shift # Past argument
;;
-h|--help ) # To see this help message
helpMessage
exit 130
shift # Past argument
;;
-p|--path) # Set the path to the SAS Viya platform deployment assets
_deploy=${2}
shift # Past argument
shift # Past value
;;
-r|--repository) # Set the required SAS Viya platform docker images repository
_repository=${2}
shift # Past argument
shift # Past value
;;
-t|--tag) # Set the required SAS Viya platform sas-orchestration docker image tag
_tag=${2}
shift # Past argument
shift # Past value
;;
*) # Unknown option
_otherParameters+=("${1}") # Save it in an array for later
shift # Past argument
;;
esac
done
# Debug message
if [[ ${_debug} -ne 0 ]]
then
debugMessage
exit 130
fi
# Error message
if [[ "${_otherParameters[*]}" != "" ]]
then
debugMessage
helpMessage
exit 130
fi
# Script arguments validation
if [[ -z "${_deploy}" ]] || [[ ! -d "${_deploy}" ]];
then
echo "You have to pass a valid path for the SAS Viya platform deployment assets."
helpMessage
exit 128
fi
if [[ -z "${_repository}" ]] || [[ ${_repository} != *"."* ]];
then
echo "You have to pass a valid repository name to access the SAS Viya platform docker images."
helpMessage
exit 128
fi
# Pull the required sas-orchestration tool image
_dockerPullCommand=$(grep "docker pull" ${_deploy}/sas-bases/examples/kubernetes-tools/README.md)
echo "${_dockerPullCommand}"
if [[ ${_repository} != ${_sasRepository} ]];
then
# To use a specific SAS Viya platform docker images mirror repository
_dockerPullCommand=$(echo "${_dockerPullCommand}" | sed "s/cr\.sas\.com/${_repository}/g")
echo "${_dockerPullCommand}"
fi
${_dockerPullCommand}
# Tag the new sas-orchestration tool image as sas-orchestration (creates a kind of alias)
_dockerTagCommand=$(grep "docker tag" ${_deploy}/sas-bases/examples/kubernetes-tools/README.md)
echo "${_dockerTagCommand}"
if [[ ${_repository} != ${_sasRepository} ]];
then
# To use a specific SAS Viya platform docker images mirror repository
_dockerTagCommand=$(echo "${_dockerTagCommand}" | sed "s/cr\.sas\.com/${_repository}/g")
echo "${_dockerTagCommand}"
fi
if [[ ${_tag} != ${_sasTag} ]];
then
# To use a specific SAS Viya platform sas-orchestration docker image tag
_dockerTagCommand=$(echo "${_dockerTagCommand}" | sed "s/${_sasTag}/${_tag}/g")
echo "${_dockerTagCommand}"
fi
${_dockerTagCommand}
# Validate the docker image tag
docker image ls sas-orchestration*:*
docker images | grep "/sas-orchestration"
I hope this article has been helpful to you.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.