BookmarkSubscribeRSS Feed

SAS Viya Model Release Pipeline with Azure DevOps

Started ‎05-20-2022 by
Modified ‎06-22-2022 by
Views 2,109

What if you could use the SAS Model Manager “Publish” model button to automatically deploy your SAS model to Azure? It can be done, thanks to SAS Container Runtime (SCR) and an Azure DevOps release pipeline. SCR allows you to publish a SAS model as a container image in Azure. A release pipeline starts when a new image is published. It takes the image, and it automatically deploys it to a back-end Azure Web App. The app's role is to allow you to score the SAS model running in a container. When more models are published from SAS, the release pipeline handles their deployment. Scoring can continue, without interruption. Watch the video demonstrations in this post to find out more.

 

This is the third post in the series. The previous post demonstrated a SAS Viya with Azure DevOps Data Pipeline.

 

Watch the Release Pipeline in Action

 

This example shows how the Publish button in SAS Model Manager is "transformed" in an automatic deployment process. An Azure DevOps pipeline

deploys the model to Azure.

 

 

How the Model Release Pipeline Works?

 

To summarize what you have seen in the video:

 

  • A first SAS model or a new SAS model version is ready to be deployed.
  • Publish this model to an Azure publishing destination. The SAS model gets published as a Docker container image in an Azure Container Registry (ACR). The Azure destination is using SAS Container Runtime (SCR).
  • An Azure DevOps release pipeline is triggered when you publish a new container image in the ACR.
  • When the release pipeline is triggered, the web app is immediately updated. Its production slot will be refreshed with the latest container image. Therefore, the SAS model is running inside a SCR container, in the Azure app production slot.
  • Scoring against the model can continue. We observe a certain delay when the production slot is refreshed. However, everything goes back to normal soon after.
  • When a new SAS model is published, the release pipeline repeats the process all over again.
  • The scoring at the end demonstrates that the new model replaced the old one, in the production slot, without any human intervention.

 

What Are the Steps to Create a Model Release Pipeline?

 

This video shows the steps to set-up a model release pipeline:

 

 

To summarize the steps in the video:

 

  1. Create an Azure publishing destination.
  2. Publish at least one SAS model to Azure.
  3. Create an Azure App service plan. The plan allows you to use deployment slots with Azure Web Apps.
  4. Create an Azure Web App in your service plan.
  5. Create a release pipeline in Azure DevOps. The release pipeline has a trigger, an artifact and at least a stage, with one task.
    • The trigger is when a new Docker container image is published to the Azure Container Registry (ACR).
    • The artifact is the container image itself.
    • The task is to publish the container image to an Azure web app, in the production slot.

 

Conclusions

 

The post demonstrated an automatic model release process from SAS Model Manager to Azure. SAS Container Runtime in SAS Viya and an Azure DevOps release pipeline were the key ingredients.

 

What about decisions from SAS Intelligent Decisioning? Is a decision release pipeline feasible? Yes, it is. You can apply the same approach to deploy decisions to Azure.

 

Additional Resources

SAS Viya with Azure DevOps:

SAS Container Runtime

 

Thank you for your time reading this post. If you liked the post, give it a thumbs up! Please comment and tell us what you think about this topic.

 

If you wish to get more information, please write me an email.

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎06-22-2022 07:46 PM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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