docs.datacontroller.io/docs/dci-deploysas9.md

155 lines
7.8 KiB
Markdown
Raw Normal View History

2020-09-26 14:51:37 +00:00
---
layout: article
title: DC SAS 9 Deployment
description: How to deploy Data Controller in a production SAS 9 environment
og_image: https://docs.datacontroller.io/img/dci_deploymentdiagram.png
---
2020-07-15 10:33:21 +00:00
# SAS 9 Deployment
2021-06-11 09:11:15 +00:00
## Deployment Process
2020-07-15 10:33:21 +00:00
2023-02-06 21:20:11 +00:00
There are two ways to deploy Data Controller on SAS 9:
2020-07-15 10:33:21 +00:00
2023-02-06 21:50:36 +00:00
* Full Deployment (preferred)
* Streaming (for quick demos)
2020-07-15 10:33:21 +00:00
2023-02-06 21:29:27 +00:00
### Full Deployment
2023-02-06 21:50:36 +00:00
2023-02-06 21:29:27 +00:00
#### 1 - Deploy Stored Processes
2020-07-15 10:33:21 +00:00
2023-03-30 12:26:28 +00:00
The Stored Processes are deployed using a SAS Program. This should be executed using an account that has WRITE METADATA (WM) permissions to the necessary root folder (`appLoc`) in metadata.
2021-06-11 09:11:15 +00:00
2023-02-06 21:20:11 +00:00
```sas
%let appLoc=/Shared Data/apps/DataController; /* CHANGE THIS!! */
2023-08-02 17:31:43 +00:00
filename dc url "https://git.datacontroller.io/dc/dc/releases/download/vX.X.X/sas9.sas; /* use correct release */
2023-02-06 21:20:11 +00:00
%inc dc;
```
2020-07-15 10:33:21 +00:00
2023-08-02 17:31:43 +00:00
If you don't have internet access from SAS, download `sas9.sas` from [here](https://git.datacontroller.io/dc/dc/releases), and change the `compiled_apploc` on line 2:
2021-06-11 09:11:15 +00:00
2023-02-06 21:20:11 +00:00
![](img/sas9_apploc.png)
2021-06-11 09:11:15 +00:00
2023-02-06 21:20:11 +00:00
You can also change the `serverName` here, which is necessary if you are using any other logical server than `SASApp`.
2023-02-06 21:29:27 +00:00
#### 2 - Deploy the Frontend
2020-07-15 10:33:21 +00:00
2023-02-06 21:51:23 +00:00
The Data Controller frontend comes pre-built, and ready to deploy to the root of the SAS Web Server (mid-tier).
2020-07-15 10:33:21 +00:00
Deploy as follows:
2023-08-02 17:31:43 +00:00
1. Download the `frontend.zip` file from: [https://git.datacontroller.io/dc/dc/releases](https://git.datacontroller.io/dc/dc/releases)
2023-02-06 21:51:23 +00:00
2. Unzip and place in the [htdocs folder of your SAS Web Server](https://sasjs.io/frontend-deployment/#sas9-deploy) - typically `!SASCONFIG/LevX/Web/WebServer/htdocs`.
2023-02-06 21:50:36 +00:00
3. Open the `index.html` file and update the values for `appLoc` (per SAS code above) and `serverType` (to `SAS9`).
2023-02-06 21:20:11 +00:00
You can now open the app at `https://YOURWEBSERVER/unzippedfoldername` and follow the configuration steps (DC Physical Location and Admin Group) to complete deployment.
2020-07-15 10:33:21 +00:00
2023-02-06 21:29:27 +00:00
#### 3 - Run the Configurator
2023-02-06 21:20:11 +00:00
2023-02-06 23:22:34 +00:00
When opening Data Controller for the first time, a configuration screen is presented. Be sure to log in with an account that has WRITE METADATA (WM) on the following metadata folders:
* `services/admin` - so the configurator STP can be deleted after being run
* `services/common` - so the `Data_Controller_Settings` STP can be updated
* `Data` - so the library and tables can be registered (using proc metalib)
There are two things to configure:
2023-02-06 21:20:11 +00:00
1. Path to the designated physical staging area. Make sure that the SAS Spawned Server account (eg `sassrv`) has WRITE access to this location.
2023-02-06 23:22:34 +00:00
2. Admin Group. ⚠️ Note that anyone in this group will have unrestricted access to Data Controller! ⚠️ "Unrestricted access" is provided by code logic. Post installation, Data Controller will never update nor modify metadata.
2023-02-06 21:20:11 +00:00
2023-02-06 23:22:34 +00:00
!!! note
If you do not see any groups, then it is possible your Stored Process is running from a different metadata repository to the location of your SAS users (eg Foundation). To fix this, update the `services/admin/configurator` STP with this code: `%let dc_repo_users=YOUUSERRMETAREPO;`
2023-02-06 21:20:11 +00:00
After you click submit, the Stored Process will run, configure the staging area and create the library tables (as datasets).
2020-07-15 10:33:21 +00:00
2023-02-06 21:20:11 +00:00
You will then be presented with three further links:
2020-07-15 10:33:21 +00:00
2023-02-06 21:20:11 +00:00
1. Refresh Data Catalog. Run this to scan all available datasets and update the catalog.
2. Refresh Table Metadata. Run this to update the table-level data lineage.
3. Launch. Currently this feature only works for streaming apps - just refresh the page for a full deployment.
2021-06-11 09:11:15 +00:00
2023-08-02 17:31:43 +00:00
#### 4 - Performance Enhancement
The most common performance bottlenecks (# of available connections, memory in each connection) can be addressed by the following (administrator) actions:
* Increasing the number of multibridge connections in SMC
* Increasing MEMSIZE (eg `-memsize 4G`) in the STP Options file
2023-02-06 21:20:11 +00:00
### Streaming
The streaming approach is optimised for rapid deployment, and works by bundling the frontend into metadata. This is a highly inefficient way to serve web content, and thus should only really be used for demos / evaluation purposes.
Deployment is very easy - just run the SAS code below (after changing the `appLoc`):
```sas
%let appLoc=/Shared Data/apps/DataController; /* CHANGE THIS!! */
2023-08-02 17:31:43 +00:00
filename dc url "https://git.datacontroller.io/dc/dc/releases/download/vX.X.X/demostream_sas9.sas"; /* use actual version number */
2023-02-06 21:20:11 +00:00
%inc dc;
```
2023-08-02 17:31:43 +00:00
If you don't have internet access from your SAS environment, just download `demostream_sas9.sas` from [https://git.datacontroller.io/dc/dc/releases](https://git.datacontroller.io/dc/dc/releases) and modify the `appLoc` on line 2, as follows:
2023-02-06 21:20:11 +00:00
![](img/sas9_apploc.png)
After that, continue to the configuration as described above.
2020-07-15 10:33:21 +00:00
2020-09-26 14:51:37 +00:00
## Deployment Diagram
2023-02-06 21:30:00 +00:00
A Full Deployment of Data Controller for SAS 9 consists of:
* Frontend on the web server
* Stored Processes (+ Library & Table definitions) in metadata
* Staging Area on the physical filesystem
* Database _or_ SAS Base library
2020-09-26 14:51:37 +00:00
The below areas of the SAS platform are modified when deploying Data Controller:
2023-02-06 23:30:49 +00:00
![](img/dci_deploymentdiagram.svg)
<!--img src="/img/dci_deploymentdiagram.svg" height="350" style="border:3px solid black" -->
2020-09-26 14:51:37 +00:00
### Client Device
Nothing needs to be deployed or modified on the client device. We support a wide range of browsers (the same as SAS). Browsers make requests to the SAS Web Server, and will cache assets such as JS, CSS and images. Some items (such as dropdowns) are kept in local storage to improve responsiveness.
### SAS Mid Tier
2023-02-06 21:29:27 +00:00
A single `index.html` file plus several CSS / JS / image files are served from a subfolder in the static content area SAS Web Server.
This is served up by the _existing_ SAS Web Server, no additional server (running) process is required.
If you are running more than one web server, you will need to deploy to them all.
2020-09-26 14:51:37 +00:00
### SAS Application Server
Given the enhanced permissions needed of the system account, a dedicated / secured STP instance is recommended as described [here](/dci-stpinstance).
2023-02-06 21:29:27 +00:00
All deployments of Data Controller also make use of a physical staging directory. This is used to store staged data, logs, plus CSV and Excel files as uploaded by end users. This directory should NOT be accessible by end users - only the SAS system account (eg `sassrv`) requires access to this directory.
2020-09-26 14:51:37 +00:00
A typical small deployment will grow by a 10-20 mb each month. A very large enterprise customer, with 100 or more editors, might generate up to 1 GB or so per month, depending on the size and frequency of the Excel EUCs and CSVs being uploaded. Web modifications are restricted only to modified rows, so are typically just a few kb in size.
2023-02-06 21:29:27 +00:00
2020-09-26 14:51:37 +00:00
### SAS Metadata Server
The items deployed to metadata include:
* Folder tree
* Stored Processes
* Library Object & tables
2023-02-06 21:29:27 +00:00
All SAS code is embedded in Stored Processes (so there is no need to deploy programs to the file system, no SASAUTOs). There is no use of X commands, no use of external internet access, full LOCKDOWN is supported.
2021-06-11 09:11:15 +00:00
After the installation process (which updates `public/settings` and removes the `admin/makedata` STP), there are no write actions performed against metadata.
2020-09-26 14:51:37 +00:00
### Databases
2023-02-06 21:29:27 +00:00
We strongly recommend that the Data Controller configuration tables are stored in a database for concurrency reasons.
2020-09-26 14:51:37 +00:00
2023-02-06 21:20:11 +00:00
We have customers in production using Oracle, Postgres, Netezza, SQL Server to name a few. Contact us for support with DDL and migration steps for your chosen vendor.
2020-09-26 14:51:37 +00:00
2021-06-11 09:11:15 +00:00
!!! note
2023-02-06 21:20:11 +00:00
Data Controller does NOT modify schemas! It will not create or drop tables, or add/modify columns or attributes. Only data _values_ (not the model) can be modified using this tool.
2023-02-06 21:29:27 +00:00
To caveat the above - it is also quite common for customers to use a BASE engine library. Data Controller ships with mechananisms to handle locking (internally) but it cannot handle external contentions, such as those caused when end users open datasets directly, eg with Enterprise Guide or Base SAS.