sassoftware / sas-container-recipes

A collection of recipes and other resources for building containers that include SAS Viya software.
https://www.sas.com
Apache License 2.0
89 stars 42 forks source link
analytics build-tools cas-server docker-image docker-registry dockerfile kubernetes sas sas-containers sas-quest sas-studio sas-viya

SAS® Viya® Container Recipes -- Archived Repository

SAS has archived the SAS Viya 3.5 for containers repository in the sassoftware organization on GitHub. No further changes or issues will be allowed in this repository. We recommend exploring the new cloud-ready version of SAS Viya for future deployments.

---
SAS Containers Icon

A framework to build SAS Viya Docker images and create deployments using Kubernetes.

SAS Viya Version Docker Version Kubernetes Version


Container deployments are more lightweight and don't have as much overhead as traditional virtual machines. By running a SAS engine inside a container, you can provision resources more efficiently to address a wide variety of SAS workloads. Select a base SAS recipe and create custom containers that include access to different data sources (PC files, Oracle, Hadoop, etc.), the addition of a Jupyter Notebook with Python 3, and more.

For more information, see SAS for Containers.


Quick Start

Use the following instructions to quickly build and launch SAS Viya containers. For extensive information about building and running SAS Viya containers, see the documentation wiki. For single and multiple containers, addons found in the addons directory can enhance the base SAS Viya images with SAS/ACCESS software, LDAP configuration, and more. For information about how to use the addons and any prerequisites, see the documentation about addons.

  1. Locate your SAS Viya for Linux Software Order Email (SOE), and retrieve the SAS_Viya_deployment_data.zip file from it. Not sure if your organization purchased SAS Software? Contact Us or get SAS License Assistance. If you have not purchased SAS Software but would like to give it a try, please check out our Free Software Trials.

  2. Download the latest Latest Release or git clone git@github.com:sassoftware/sas-container-recipes.git

  3. Choose your flavor and follow the recipe to build, test, and deploy your container(s).

    a. If you are looking for an environment tailored towards individual data scientists and developers, you will be interested in a SAS programming-only deployment running on a single container.

    b. If you would like an environment suitable for collaborative data science work, then you may be interested in a SAS programming-only deployment or a SAS Viya full deployment on multiple containers.




For a Single User - SAS Viya Programming-Only Deployment Running on a Single Container

Use these instructions to create a SAS Viya programming-only deployment in a single container for an independent data scientist or developer to execute SAS code. All code and data should be stored in a persistent location outside the container. This deployment includes SAS Studio, SAS Workspace Server, and a CAS server, which provides in-memory analytics for symmetric multi-processing (SMP).

Prerequisites

Build the Image

Run the following command to build the container image and add a default user ID (sasdemo) and password (sasdemo), which can be used to sign in to SAS Studio after the container is running. A non-root user is recommended for executing the build command.

 ./build.sh --type single --zip ~/path/to/SAS_Viya_deployment_data.zip --addons "auth-demo"

Run the Container

After the container image is built, the instructions for running the container will be printed at the end of the build.sh output.

mkdir -p run
cp samples/viya-single-container/example_launchsas.sh run/launchsas.sh
cd run
sed -i 's|@REPLACE_ME_WITH_TAG@|19.05.0-20190509195121-d991185|' launchsas.sh
./launchsas.sh

Use the docker images command to see the images that were built and the most recent tag (example: tag 19.05.0-20190509195121-d991185).

After the launchsas.sh command is completed, use docker ps to list the running container.

Sign In to SAS Studio

Go to http://<myhostname>:8080, and then sign in with the sasdemo user ID and the sasdemo password to start using SAS Studio!

SAS Logon Screen

For more information, see the documentation wiki.




For One or More Users - SAS Viya Programming-Only or SAS Viya Full Deployment Running on Multiple Containers

Use these instructions to build multiple Docker images and then use the images to create a SAS Viya programming-only or a SAS Viya full deployment in Kubernetes. These deployments can have SMP or massively parallel processing (MPP) CAS servers, which provide in-memory analytics and can be used by one or more users.

A programming-only deployment supports data scientists and programmers who use SAS Studio or direct programming interfaces such as Python or REST APIs. Note that a programming-only deployment does not include SAS Drive, SAS Environment Manager, and the complete suite of services that are included with a full deployment. Make sure that you provide your users with the features that they require.

Prerequisites

Note: Users of Kubernetes clusters running v1.16.0+ should use the "kubernetes-1.16.0-compat" branch.

How to Build

Examples of running build.sh to build multiple containers are provided below. A non-root user is recommended for executing the build command.

Tip: For the list of all required and optional arguments, see the docs/usage.txt file, or run ./build.sh --help .

Example One: Programming-Only Deployment, Multiple Containers

  ./build.sh \
  --type multiple \
  --zip /path/to/SAS_Viya_deployment_data.zip \
  --docker-registry-namespace myuniquename \
  --docker-registry-url myregistry.myhost.com \
  --addons "auth-demo"

Here's a summary of what this command does:

Example Two: Full Deployment, Multiple Containers (Experimental)

Considerations for a Full Deployment
  ./build.sh \
  --type full \
  --zip /path/to/SAS_Viya_deployment_data.zip \
  --docker-registry-namespace myuniquename \
  --docker-registry-url myregistry.myhost.com \
  --addons "auth-sssd"

Here's a summary of what this command does:

Note: Before you use the auth-sssd addon, see the documentation wiki for prerequisite information.

Running Multiple Containers

The build process creates Kubernetes manifests that you use to run multiple containers.

For information about using the manifests, see Build and Run SAS Viya Multiple Containers.

Sign In to SAS Studio

After the containers are running, users can sign on to SAS Studio.

Here are some examples of how to sign in:

SAS Logon Screen




Additional Resources




Copyright

Copyright 2018 SAS Institute Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.