Skip to content

Commit abeb96c

Browse files
committed
Enhancement to Deployment Options
Signed-off-by: David Weik <geekupyourlife@gmail.com>
1 parent 9dac081 commit abeb96c

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
This changelog documents all the different updates that occur for this framework.
44

5+
## [0.1.33] - 2025-12-16
6+
7+
In order for these changes to take effect you need to update the source code of the [SAS Portalframework for SAS Viya](https://github.com/sassoftware/sas-portal-framework-for-sas-viya). If you have deployed the LLM containers in kubernetes no additional changes are required, if you have deployed them as an Azure Container App or Azure Container Instance please utilize the [prompt-builder-json.py](./utility/prompt-builder-json.py) utility script with the additional option -dt aca in order to enable the prompt builder for this as well.
8+
9+
### Added
10+
11+
- Ability for the prompt builder to also communicate with LLM containers deployed as Azure Container Apps or Azure Container Instances
12+
- Prompt Templates now include a check for an environment variable called LLMCONTAINERPATH that can be set in order to provide an environment independant path to the endpoint where the LLMs are hosted.
13+
- Documentation on how to set environment variable
14+
15+
### Changed
16+
17+
- None
18+
19+
### Fixed
20+
21+
- None
22+
523
## [0.1.32] - 2025-12-07
624

725
No changes are required at this time.

website/docs/Administration-Guide/Container-Deployment.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ sidebar_position: 8
66

77
For the creation of the SAS Container Runtime publishing destination it is recommended to use the [SAS Viya CLI](https://go.documentation.sas.com/doc/en/sasadmincdc/default/calcli/titlepage.htm). The command detailed below is used to create a publishing destination that is using a Azure Container Registry:
88

9+
### Kubernetes deployment
10+
911
There are example deployment YAMLs provided in the *SCR-LLM-Deployment-YAML* folder which are build for Azure. The following assumptions are made:
1012

1113
- Namespace called *llm* in which the SCR containers will be deployed.
1214
- No resource limits are currently imposed, that is why we recommend having a separate node pool for this workload - in non production environments it is recommended to use a spot-instance with a lot of available CPU and RAM, e.g. Standard_D64s_v5.
13-
- The URL endpoint schema looks like this *host/llm/model_name* here the container will be reached, that means the full address for a container is *host/llm/model_name/model_name*.
15+
- The URL endpoint schema looks like this *host/llm/model_name* here the container will be reached, that means the full address for a container is *host/llm/model_name/model_name*.
16+
17+
### Azure Container Apps/Instances
18+
19+
If you want to deploy the LLM containers as Azure Container Apps or Azure Container Instances than please make sure that when you follow the [Deploying the LLM Prompt Builder](./Setup-Additional-UIs.md) that your `llm-prompt-builder.json` contains the attribute *deploymentType* and its value is set to *aca*.
20+
21+
Please also note that the attribute *SCREndpoint* contains the value *randomString.region.azurecontainerapps.io* from the https://model.randomString.region.azurecontainerapps.io/model URL of your Azure Container App.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
sidebar_position: 11
3+
---
4+
5+
This page details considerations when deploying the decisions in MAS/SCR.
6+
7+
Every prompt template checks for an environment variable called *LLMCONTAINERPATH*. If this variable does not exist it will default to the value that was provided as an endpoint for the LLM Prompt Builder where that prompt template was created. Setting this environment variable will enable you to deploy the same decision across multiple environments and also changing the LLM endpoints in case you have fully isolated environments.
8+
9+
## Kubernetes vs Azure Container Apps/Instances
10+
11+
Please note that it is not supported to change the type of deployment between environments so if you have the LLM containers deployed in Kubernetes in one environment, they will have to be deployed in the same fashion in all other environments as well.
12+
13+
If you have selected a Kubernetes based deployment set the variable value to the corresponding of this: *https://base-url/llm*.
14+
15+
If you have selected an Azure Container Apps/Instaces based deployment set the variable value to the corresponding value of this: *randomString.region.azurecontainerapps.io* from the https://model.randomString.region.azurecontainerapps.io/model URL.
16+
17+
## MAS vs SCR
18+
19+
Please note that you do not have to set this environment variable if you are ok with utilizing the hardcoded value provided by LLM Prompt Builder.
20+
21+
If you are deploying the decisions to a SCR destination than just add the *LLMCONTAINERPATH* environment variable as part of the **env** definition in the *YAML* file. That means you can give every instance potentially a different endpoint!
22+
23+
If you are deploying the decisions to MAS you will have to add the *LLMCONTAINERPATH* environment variable to the *sas-microanalytic-score* pod via a PatchTransformer. That means you can only have one instance of this per MAS deployment and if it is set once it will apply to all.
24+
25+
Here is an example of a PatchTransformer:
26+
```yaml
27+
apiVersion: builtin
28+
kind: PatchTransformer
29+
metadata:
30+
name: mas-llm-transformer
31+
patch: |-
32+
# Add LLM environment variable
33+
- op: add
34+
path: /spec/template/spec/containers/0/env/-
35+
value:
36+
name: LLMCONTAINERPATH
37+
value: <YOURVALUE>
38+
target:
39+
group: apps
40+
kind: Deployment
41+
name: sas-microanalytic-score
42+
version: v1
43+
```

website/docs/Administration-Guide/Setup-SAS-Model-Manager.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@ This script creates the new SAS Model Manager repository and the SAS Model Manag
99
```bash
1010
# Run the setup script with the help (-h) flag to get more information on each parameter
1111
# Run the setup script - make sure to update the parameter values that are passed into the script
12+
# If you are planning on deploying your LLM containers not in kubernetes but rather as Azure Container Apps/Instances use -dt aca
1213
python ./Model-Manager-Setup.py -vs sas-viya-url -u username -p password -rp responsible_party -e endpoint_from_scr_deployment
1314
```
1415

1516
Running this script will produce two additional json files as outputs, that are required for the steps on the page [Setup Additional UIs](Setup-Additional-UIs.md):
1617
- *llm-prompt-builder.json*, this will enable your users to do No-Code Prompt Engineering.
1718
- *rag-builder.json*, this will enable your users to do No-Code RAG pipeline setups.
1819

20+
Explanation of the different available options:
21+
- -vs, short for --viya-server, is the URL for your SAS Viya server. The argument is required.
22+
- -u, short for --username, is the username to authenticate with SAS Viya. The argument is required.
23+
- -p, short for --password, is the password to authenticate with SAS Viya. The argument is required.
24+
- -rp, short for --responsible_party, is the person or group that will be listed in SAS Model Manager as a point of contact. The argument is required.
25+
- -e, short for --scr_endpoint, is the base URL where the LLM containers will be published. The argument is required.
26+
- -dt, short for --deployment_type, can be set to k8s (default) if you are deploying the LLM containers to kubernetes or aca if you are deploying the LLM containers to Azure Container Apps/Instances. This argument is optional as it defaults to k8s. For k8s please paste the full link e.g. https://base-url/llm and for Azure Container Apps please only provide the following *randomString.region.azurecontainerapps.io* from the https://model.randomString.region.azurecontainerapps.io/model URL.
27+
- -k, short for --verify_ssl, should only be changed to false if you have a self-signed certificat on SAS Viya that your machine doesn't recognize. This argument is optional as it defaults to true.
28+
1929
### Authorizing the Repository
2030

2131
By default newly created SAS Model Manager repositories are only authorized for access for the *SAS Administrators* group, please adjust the access rights as you require it for your environment - it is recommended add authorization on a group basis.

0 commit comments

Comments
 (0)