I have been wanting to get SAS® Viya 4 running locally on our lab hardware to further investigate the REST APIs, and having just finished the installation, I thought I’d jot down a few notes.
SAS Viya 4 has initially been released for the main cloud providers: Microsoft Azure (AKS) first, and now Amazon (EKS) and Google (GKE) too. I understand that RedHat OpenShift support will be coming later this year.
I’d heard it was also possible to get it running in a local on-premise Kubernetes (K8s) environment with some prep work to get all the requirements setup (this is sometimes referred to as “bare metal” installation in K8s resources I have seen).
Whilst I could have set it up in Azure, it would have been a more expensive platform choice considering we only wanted a small installation for dev/test work, have no real users, and already have lots of spare capacity on our own private servers. Being keen on technical challenges I set aside a few days to see how far I could get. It was a great learning experience and now it’s working I wanted to outline what I used.
I created a 4 node cluster using virtual machines on a reasonably sized host server (Ubuntu 20.04 LTS KVM guests on an Ubuntu 20.04 LTS KVM host using local LVM storage):
- K8s Master Node (4x vCPU, 4GB RAM, 500GB local storage) used for deployment, hosting NFS and haproxy
- K8s Worker Node #1 (6x vCPU, 28GB RAM, 200GB local storage) for SAS non-CAS workloads
- K8s Worker Node #2 (6x vCPU, 28GB RAM, 200GB local storage) for SAS non-CAS workloads
- K8s Worker Node #3 (4x vCPU, 28GB RAM, 200GB local storage) labelled and tainted for SAS CAS workloads
This sizing was based on getting the Viya 4 ARK pre-install report happy and overcoming a few pod deployment failures, in earlier iterations, due to insufficient resources. I tried about 3 or 4 deployments before I got it working. I am hoping to reduce this sizing down in future as it will ultimately have very low usage, essentially just exercising the SAS Viya 4 REST APIs.
These are the main steps I went through to get it deployed:
- Installed Docker 20.10.7 (via apt) on all nodes: https://docs.docker.com/engine/install/ubuntu/
- Installed Kubernetes 1.21.3 (via apt) on all nodes, created a cluster on the master node, and joined each worker node: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/
- Installed a Container Network Interface (CNI) using Calico: https://docs.projectcalico.org/getting-started/kubernetes/self-managed-onprem/onpremises
- Installed MetalLB, a software load-balancer for bare-metal deployments: https://kubernetes.github.io/ingress-nginx/deploy/baremetal/
- Installed Helm to simplify other installations: https://helm.sh/docs/intro/install/
- Installed NGINX Ingress Controller (via Helm): https://kubernetes.github.io/ingress-nginx/deploy/#using-helm
- Installed haproxy 2.0.13 (via apt) on the master node for TLS termination using private server and CA certificates (could have done this instead with nginx during SAS deployment)
- Installed and configured an NFS server on the master node (via apt) for K8s persistent volumes
- Installed nfs-subdir-external-provisioner (via Helm) to make NFS available within K8s: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
- Configured NFS as the default K8s storage class for the cluster
- Created a dedicated namespace for the SAS viya deployment (sasviyadev)
- Installed the SAS Viya 4 Administration Resource Kit (ARK): https://github.com/sassoftware/viya4-ark
- Ran the SAS Viya 4 ARK pre-installation check until there were no remaining issues
- Installed Kustomize 3.7.0 as detailed in the SAS Viya Operations documentation
- Installed cert-manager (via Helm): https://cert-manager.io/docs/installation/kubernetes/
- Deployed the SAS Viya Deployment Operator as detailed in the SAS Viya Operations documentation
- Installed SAS Viya 4 (2021.1.2) as detailed in the SAS Viya Operations documentation
- Configured SAS Viya 4 to authenticate users, via LDAPS, against Windows 2012 R2 Active Directory, as explained in the SAS Viya Operations documentation
Whilst it took a while to research and get all the components working together, it turned out to be easier than I initially expected. Most of the work was preparing for the SAS installation. The SAS installation part was relatively straightforward in comparison. You can understand why a cloud deployment would be the best and easier choice for most businesses.
I hope you found this post interesting, and if you’ve also installed SAS Viya 4 in-house on your own private hardware, and you have any tips or tricks to share, then please let me know by posting a comment below or contacting me directly.