feat: updated viya deploy instructions
All checks were successful
Publish to docs.datacontroller.io / Deploy docs (push) Successful in 1m53s

This commit is contained in:
allan 2025-06-04 13:56:22 +01:00
parent 5715d17312
commit c6ef23d54b
2 changed files with 30 additions and 66 deletions

View File

@ -9,7 +9,7 @@ og_image: https://docs.datacontroller.io/img/dci_deploymentdiagramviya.png
## Overview
Data Controller for SAS Viya consists of a frontend, a set of Job Execution Services, a staging area, a Compute Context, and a database library. The library can be a SAS Base engine if desired, however this can cause contention (eg table locks) if end users are able to connect to the datasets directly, eg via Enterprise Guide or Base SAS.
A database that supports concurrent access is highly recommended.
A database that supports concurrent access is recommended.
## Prerequisites
@ -37,13 +37,15 @@ The below areas of the SAS Viya platform are modified when deploying Data Contro
<img src="/img/dci_deploymentdiagramviya.svg" height="350" style="border:3px solid black" >
!!! note
The "streaming" version of Viya uses the files API for web content, so there is no need for the web server component.
## Deployment
Data Controller deployment is split between 3 deployment types:
Data Controller deployment is split between 2 deployment types:
* Demo version
* Full Version (manual deploy)
* Full Version (automated deploy)
* Streaming (web content served from SAS Drive)
* Full (web content served from dedicated web server)
<!--
## Full Version - Manual Deploy
@ -52,14 +54,13 @@ Data Controller deployment is split between 3 deployment types:
There are several parts to this proces:
1. Create the Compute Context
2. Deploy Frontend
2a. Deploy Streaming version
2b. Deploy Full version
4. Prepare the database and update settings (optional)
5. Update the Compute Context autoexec
### Create Compute Context
The Viya Compute context is used to spawn the Job Execution Services - such that those services may run under the specified system account, with a particular autoexec.
### Create Shared Compute Context
We strongly recommend a dedicated compute context for running Data Controller. The setup requires an Administrator account.
@ -74,14 +75,28 @@ We strongly recommend a dedicated compute context for running Data Controller.
!!! note
XCMD is NOT required to use Data Controller.
### Deploy frontend
### 2a. Deploy Streaming version
Run the following in SAS Studio:
```sas
%let apploc=/Public/DataController; /* desired SAS Drive location */
filename dc url "https://git.datacontroller.io/dc/dc/releases/download/latest/viya.sas";
%inc dc;
```
At the end of the SAS log, there will be a link. Open this to perorm the configuration - such as:
* dcpath - physical path for depleyment
* Admin Group - will have full access to DC
* Compute Context - should be a shared compute for a multi-user deployment
### 2b. Deploy Full version
Unzip the frontend into your chosen directory (eg `/var/www/html/DataController`) on the SAS Web Server. Open `index.html` and update the following inside `dcAdapterSettings`:
- `appLoc` - this should point to the root folder on SAS Drive where you would like the Job Execution services to be created. This folder should initially, NOT exist (if it is found, the backend will not be deployed)
- `contextName` - here you should put the name of the compute context you created in the previous step.
- `dcPath` - the physical location on the filesystem to be used for staged data. This is only used at deployment time, it can be configured later in `$(appLoc)/services/settings.sas` or in the autoexec if used.
- `adminGroup` - the name of an existing group, which should have unrestricted access to Data Controller. This is only used at deployment time, it can be configured later in `$(appLoc)/services/settings.sas` or in the autoexec if used.
- `servertype` - should be SASVIYA
- `debug` - can stay as `false` for performance, but could be switched to `true` for debugging startup issues
- `useComputeApi` - use `true` for best performance.
@ -96,9 +111,9 @@ You will be presented with a deployment screen like the one below. Be sure to c
Your services are deployed! And the app is operational, albeit still a little sluggish, as every single request is using the APIs to fetch the content of the `$(appLoc)/services/settings.sas` file.
To improve responsiveness by another 700ms we recommend you follow the steps in [Update Compute Context Autoexec](/dci-deploysasviya/#update-compute-context-autoexec) below.
To improve responsiveness by another 700ms we recommend you follow the steps in [Update Compute Context Autoexec](/deploy-viya/#update-compute-context-autoexec) below.
### Deploy Database
### 3. Deploy Database
If you have a lot of users, such that concurrency (locked datasets) becomes an issue, you might consider migrating the control library to a database.
The first part to this is generating the DDL (and inserts). For this, use the DDL exporter as described [here](/admin-services/#export-database). If you need a flavour of DDL that is not yet supported, [contact us](https://datacontroller.io/contact/).
@ -132,54 +147,3 @@ To explain each of these lines:
* The final libname statement can also be configured to point at a database instead of a BASE engine directory (contact us for DDL)
If you have additional libraries that you would like to use in Data Controller, they should also be defined here.
<!--
## Full Version - Automated Deploy
The automated deploy makes use of the SASjs CLI to create the dependent context and job execution services. In addition to the standard prerequisites (a registered viya system account and a prepared database) you will also need:
* a local copy of the [SASjs CLI](https://sasjs.io/sasjs-cli/#installation)
* a Client / Secret - with an administrator group in SCOPE, and an authorization_code GRANT_TYPE. The SASjs [Viya Token Generator](https://github.com/sasjs/viyatoken) may help with this.
### Prepare the Target and Token
To configure this part (one time, manual step), we need to run a single command:
```
sasjs add
```
A sequence of command line prompts will follow for defining the target. These prompts are described [here](https://sasjs.io/sasjs-cli-add/). Note that `appLoc` is the SAS Drive location in which the Data Controller jobs will be deployed.
### Prepare the Context JSON
This file describes the context that the CI/CD process will generate. Save this file, eg as `myContext.json`.
```
{
"name": "DataControllerContext",
"attributes": {
"reuseServerProcesses": true,
"runServerAs": "mycasaccount"
},
"environment": {
"autoExecLines": [
"%let DC_LIBREF=DCDBVIYA;",
"%let DC_ADMIN_GROUP={{YOUR DC ADMIN GROUP}};",
"%let DC_STAGING_AREA={{YOUR DEDICATED FILE SYSTEM DRIVE}};",
"libname &dc_libref {{YOUR DC DATABASE}};",
],
"options": []
},
"launchContext": {
"contextName": "SAS Job Execution launcher context"
},
"launchType": "service",
}
```
### Prepare Deployment Script
The deployment script will run on a build server (or local desktop) and execute as follows:
```
# Create the SAS Viya Target
sasjs context create --source myContext.json --target myTarget
```
-->

View File

@ -50,7 +50,7 @@ nav:
- Macros: macros.md
- Installation:
- System Requirements: dci-requirements.md
- SAS Viya: dci-deploysasviya.md
- SAS Viya: deploy-viya.md
- SAS 9 EBI: dci-deploysas9.md
- SAS 9 STP Hardening: dci-stpinstance.md
- Troubleshooting: dci-troubleshooting.md