I hear that question and wonder why people would ask. SAS Viya products can be installed on a virtual machine (VM) that meets the software requirements. Google Cloud Platform (GCP) has an Infrastructure as a Service (IaaS) capability, Google Compute Engine (GCE), which can create a VM instance with the required OS and resources for SAS Viya products. So what is the issue?
But the question is really “how can GCP make the SAS Viya product deployments easier” to allow me to go from zero to running the SAS solution in GCP.
This post takes you through the steps on how to achieve this goal. Keep in mind this is a simple deployment, not focused on creating a production environment. This environment does not include the required security considerations necessary to protect your environment and your assets. In addition, prior to deploying SAS Viya product, an infrastructure-sizing exercise should be performed so your environment meets your performance expectations.
To be able to go from zero to running, we have to look at SAS Viya products’ install and configuration capabilities. If this is not easily automatable, then we would be stuck. SAS designed the SAS Viya products to use Ansible, open-source automation engine, which installs and configures the SAS Viya product on one or more operating systems. Now that we can automate the software deployment, what about the cloud deployment?
With Google, GCP has a Cloud Deployment Manager capability which allows you to create a template of the whole deployment so you can use one command to standup everything. But I did something even simpler with GCP and used the Google Cloud Shell with the Google Cloud APIs. The Google Cloud APIs provide simple commands to create GCP objects and execute commands inside GCE instances.
With SAS using Ansible and Google Cloud APIs, I can easily automate the deployment of a SMP and MPP SAS Viya product from zero to running with a few simple steps. Below are the detailed steps to automate SAS Visual Data Mining and Machine Learning (VDMML) in Google. I started with no VM(s) and about 30 mins later I had a running ready to use VDMML Visual system.
Step 1 - Pre-Steps
These are items that need to be done to allow for end-to-end automation of the SAS Viya product in Google Cloud allowing the resulting deployment be a system ready for users to access.
Some SAS people might be asking, what about the SAS Software Depot? With SAS Viya products, we moved this to a RPM repository that is on the internet. Now, GCE instances can go directly to SAS to pull down the specific packages needed versus setting up a special local SAS Software Depot. Note, you can create a mirror RPM repository, similar to other repositories like RedHat, and point the deployment to use the mirror (please refer to the SAS Deployment Guide for more details on how to create a mirror repository).
Here is a screen shot of my GCP project where I just created one instance for my LDAP:
Step 2 – Storing Files in Google Cloud Platform Storage
To automate the deployment in Google Cloud, we use the GCP Storage bucket for all the files the automation pushes into the GCP Compute Engine instances. The user would create a Google Cloud Platform Storage bucket and place the following files:
Here is a screen shot of my GCP Storage bucket with the files:
Step 3 - Google Cloud API commands
In the Google Cloud Shell, you will access the Google Cloud SDK for Cloud APIs or you can install the Google Cloud SDK on your own system. The following commands are how you can deploy a SMP or MPP VDMML environment with Google Cloud APIs:
# Create instance and wait to running
gcloud compute instances create "${instanceName}" --zone "us-east1-c" \
--machine-type "n1-standard-32" --subnet "default" --tags "https-server" \
--image "rhel-6-v20170829" --image-project "rhel-cloud" --boot-disk-size "200"\
--boot-disk-type "pd-ssd" --boot-disk-device-name "${instanceName}"
# Move files from Google Storage bucket into the GCE instances
# Copy the SAS playbook and uncompress the file so it is ready to be use:
gcloud compute ssh ${instanceName} --zone us-east1-c --command \
"gsutil cp gs://${gstorageLoc}/SAS_Viya_playbook.tgz ~/SAS_Viya_playbook.tgz;tar xzvf ~/SAS_Viya_playbook.tgz"
# Copy the LDAP configuration file to the appropriate directory
gcloud compute ssh ${instanceName} --zone us-east1-c --command \
"gsutil cp gs://${gstorageLoc}/sitedefault.yml ~/sas_viya_playbook/roles/consul/files/sitedefault.yml"
# Copy the SAS deployment script and make it executable on the OS
gcloud compute ssh ${instanceName} --zone us-east1-c --command \
"gsutil cp gs://${gstorageLoc}/SASDeploy.sh ~/SASDeploy.sh;chmod 777 ~/SASDeploy.sh"
# Execute the SAS deployment script
gcloud compute ssh ${instanceName} --zone us-east1-c --command "~/SASDeploy.sh"
Resulting deployment in GCP:
Note, some tweaks for MPP deployment:
And that’s it
This post shows how a simple VDMML Visual environment can stand up quickly in GCP for a play environment. The SMP deployment took around 22 mins and the MPP took around 30 mins. This is not focused on the production environment where a client will have more security wrapped around and a sizing done. But this shows two things:
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.