SAS Viya Quickstart for Google Cloud Platform

SAS Viya Quickstart for Google Cloud Platform


RAPHAEL POUMAREDE: Hello. My name is Raphael Poumarede. I’m going to give you a quick
introduction for the GCP, Google Cloud Platform,
Quickstart for Viya 3.4. So Quickstart is a
template for doing an automated
deployment of Viya 3.4 in the Google Cloud Platform. It is automated,
and no intervention is required while the
software is installed. There is a template in
the configuration file. Once you have provided the input
parameters in the configuration file, the process is automated. It provides a new
build from scratch. So all the GCP resource
will be built and configured as part of running the template. So virtual servers,
VMs, will be set up. The networking storage,
the network security groups will all be configured and set
up as part of this process. Also, it is templated,
but extensible. The template keeps the process
simple with several options pre-coded, so we don’t have to
ask you for a lot of questions in order to be able to
kick off the deployment. However, if you need a
more custom installation, the code is available. And you can download
it from GitHub and update it to meet
your specific needs. And finally, it is supported. As running the template uses a
standard deployment approach, you end up with a standard
supported Viya environment. Some considerations
for the Quickstart. It supports both SMP
and MPP deployment. So you can have either a CAS
single machine deployment or multiple CAS
nodes deployed for massively parallel processing. It is not for all Viya project. As you can see, it
supports vision analytics, visual statistics, visual data
mining, and machine learning. And importantly, it is not the
only way to deploy Viya in GCP. You can still do
your own deployment using the standard approach
and techniques, provision your virtual machines, the
storage networking in GCP, then install Viya with Ansible. It’s still fully supported. Finally, it is not
free of charge. The cost of the
GCP infrastructure will be billed by Google. You also require a valid SAS
Viya license for the software. However, the Quickstart code
itself is available on GitHub. And you can download and
use it free of charge. So what do I need to know
to use the Quickstart? Firstly, you must be
familiar with GCP. You will be using the GCP
portal, and particularly the gcloud command line, which
is part of the ongoing running and maintenance
operations of the system. You need to have access
to a GCP project, ideally with a GCP
user account who has the owner role in the project. So GCP project’s
default service account must be granted the
Project IAM Admin role. You need access to the
Google Storage bucket service for this GCP project. And we will use the storage
to upload the software order for SAS. Then for the secure installation
and management of the services, you will have to
define SSH keys. And finally, you
need an awareness of your own IP address. This is required so we can
setup the network security rules and the firewall
rules to allow access to your environment. There’s a couple of
notes at the bottom here that I want to point out. First, the Quickstart
template supports the usage of a local euro
for the package repository. You can define the location
in a Storage bucket where you will upload the
mirror repository content, then your deployment can
point to this local mirror to get and install
the SAS packages. Also, it is important to notice
that an openLDAP server is installed as the
default user repository during the automated deployment
process a few simple users will be registered by default.
And the README file, available on the
Quickstart GitHub page, provides instructions on how
to add supplementary users. But if the customer utilizes
Google Cloud VPN or Cloud Interconnect
services, for example, he can also use his own on-prem
corporate Active Directory as their user repository. What does a
deployment look like? This graphic illustrates
what is built as part of running the template. Firstly, there is an ansible
bastion host that gets created. This will run the
Ansible controller and provides a bastion, or
[INAUDIBLE] host if you prefer, for accessing the Viya machines. So in this case, SMP,
the Viya software is installed on two
virtual machines. There is the SAS Viya services
machine and the CAS controller machine. Several block storage
devices are also created as part of
the installation and associated to the VM. For access to the
web applications, a load balancer is provided
as part of this setup and will be used by the visual
interfaces’ applications to access the platform. On the second graphic
we have the MPP variant of the Quickstart. The main difference is that
instead of one VM for CAS, we can have multiple VMs
for multiple CAS nodes. So provided block
storage will also be different and assign in
a different way for the CAS controller and the CAS worker. It’s time for a demo. What we would like
to do is take you through the steps involved
with create the Viya Quickstart deployment. But first, I
created a cheat list for all the steps we need
to go through in order to deploy our Viya Quickstart
in the Google Cloud Platform. So the five eye-level or key
areas that you can see here are some prep work that
we need to do in GCP. Once we have done that, we can
execute the Quickstart template from our local workstation. Once the Quickstart
installation is running, we can monetize a deployment. I’ll show you how to do that. And finally, you want to
validate the deployment. You want to know if it has
been successfully installed. So let’s start by logging
into the GCP portal and upload the SAS license file. OK, so let’s start the demo
with the GCP preparation step. First step, so as
you can see, I’m already logged in into the GCP
console in the ace-dev project as Raphael Poumerade,
who’s my Google account. So the first thing
that I can do here is to check one of
the key requirements in terms of identity and
role and permissions. So if I go into IAM & admin
page, and if I select IAM, I can see here my Google APIs
Service Agent, also known as @cloudservices
service account. As a project, IAM Admin. So you might remember that it
is one of the key requirement. So now what I want
to do is simply to upload my SAS
deployment data file, which contains my SAS
license and which is attached to the software order email. So what I want to
do is to upload this file, this data
deployment, data zip file to a storage bucket. And now what I can do
here is create a bucket. I will give it a name,
and I click on Continue. So I want to attach it to a
specific region, us-east1. So I click on Region. Let’s say it is the us-east1. We can continue. I choose a Standard
default storage class. And I choose a Uniform
control access. I will let the Google-managed
key choice by default. And then we just
click on Create. OK, so a new storage
bucket has been created called qs-gcp-demo2. OK, so what I want
to do is simply to upload my SAS
deployment data zip file. So I click on Upload Files. I will go on my C
drive, GCP folder, and I have my SAS Via
deployment data zip file. Well, this zip file, again, is
coming from the software order email as an attachment. And it contains a SAS
license and different things that are required to
download the SAS packages. So now I can see it
here in my bucket. If I click on it, I
can see the URI, which is a way to access this file. So what I will do, I will
copy the location of the file and I will keep it
somewhere, say, here. OK, that’s good. So the next thing to do is
to create a SSH key pair. We did the first to point A and
B, and let’s do point C now. So I need to create
an SSH key pair that will be used for secure
access to my environment. So what I can do if I don’t
already have an SSH key pair, I can use the Cloud Shell
utility to generate the key. So I click on the
Activate Cloud Shell. It will start up a temporary
instance, Linux instance. And from there I can run some
command to generate my keys. Let me check it. OK, it seems good. OK, so now I need to enter
a name for the SSH key. Let’s call it qs-gcp-demo. All right, yes. On top as phrase, I don’t need
to have a passphrase there. If I type ls -l, I can
see that my two keys– well, my public key
and my private key have been generated. So what I want to do now is
just to download these two keys and save them somewhere. So Download Files. And it provides the path. This is my private key. And I will do the same
for the public key. It seems to be good
for the first step. Let me check that. So we logged in into
the GCP project, we uploaded the software
order in the storage bucket, and we created the SSH key pair. OK, so let’s continue with the
second part of the deployment steps. Configure the QuickStart
so we will not install the Google Cloud SDK
because it’s already installed but we point to the GCP project
that we have chosen instead. And we will clone the
GitHub repository. So the first thing is to
install the Google SDK. So it’s really easy. You can just look
for Google Cloud SDK. So you can install it on
Linux, Windows, or even Mac. So let’s go for
Windows, Cloud SDK. Yeah, you can see
you can install it. Yeah, so you can
download the version that you want for the
platforms that you want to use and simply install it. So in my case, it’s
already installed. So I can run some
G Cloud command. If I type this, I
get something, OK. It’s report so I can do a lot
of things in the GCP platform with this command line. But for now, what
I want to do is to point to my AS dev project. So I can run the
command, G Cloud Config set project AS dev. OK, I can check that I’m
using the correct project with another G Cloud Command. G Cloud Config get value
core project AS dev. OK, it seems good. What I can do also is
to list the running of the available VMs instances,
running those with G Cloud compute instances list. It shows me the running
instances in this project, in this GCP project. So it’s very
important to be sure that you are using the right
GCP project before starting the deployment. So the second thing to do
that we want to do here is to clone, to get clone
the quick start itself. So QuickStart forces via. So the QuickStart
is a Git project. So you can either download the
zip file and unzip it manually. Or if you have Git
installed, also it’s something that you can
easily install on Windows, you can run the Git command. So it is installed there. So let’s use it to
clone the project, ger the URL from there. I just copy this. And I would just do get,
clone of clone, paste. So good project URL that I got. And if we download
all the project, all the templates that we need
to use to deploy via in GCP. So now if I look at
my folder in C drive, GCP, I can see that I have the
QuickStart survey at GCP folder where I will be able to
configure my template here before doing the deployment. So I think that’s
it for step two. We installed Google
Cloud SDK is installed. We point to the
GCP project and we cloned that GitHub repository. So the next step would be
to configure and execute the via QuickStart. So in this third step,
execute the Viya Quickstart. We will open the
Viya template file. So if add Quickstart
template file and provide some information. Fill all the required
parameters, so zone, SSH public key that we
created before, deployment data location is information that
we captured before, also, AdminigressLocation
and WebingressLocation. I will explain what it is. And finally, we will simply
launch the deployment and that’s it. Let’s start by opening
the configuration file. So we’ve seen that we
have cloned a project. So in the project, in the
template for your file name sas-viya-config.tml, let’s
open this file and look at the parameters. So the first thing we need
to change is the zone. In which zone do we want our
Viya implement to be running? So we use the us-east1-b
zone which is in the US. So it depends on the
physical location maybe of your customer. SSH public key so you remember
that we created the key. We downloaded the
key so I want to see the content of the public key. So what I’ll do is that I
will open it with a good text editor, and I will simply
copy the contents from here into my configuration file
in my template definition. OK? It’s important that it
stays on one single line. And you can leave the account
information in the public key. SAS admin password,
it’s the password that we’ll use that will be
associated to the SAS admin users. So let’s type
lmesas, for example, and let’s use the
same for the default SAS user account
that will be created. Deployment location,
so you remember that we kept track of that
when we uploaded the SAS Viya deployment data zip file. So let’s place a value there. OK? AdminingressLocation
and WebingressLocation those are information that
used to secure unlimited access to the environment. So AdminingressLocation
will be used to restrict with an IP or an IP
range which machine can connect to our Ansible controller. The WebingressLocation
will control or restrict which machine can access to
successful applications via web application. OK? So what I need to know is
what is my current IP address. Because depending where you
are, if you are behind a VPN, for example, it might not be so
simple to get your IP address. So what you can use
here is a website, which is whatsmyip.com
which will tell me what is my IP address. I just copy this and I
will put it in there. Now I can restrict
to only my IP address using 32 in the
CIDR location or I can open to all the addresses
in this range from 0 to 256 with 24. OK, it’s a CIDR notation. OK? And you have a CIDR calculator
that can be useful for that. So the CIDR is Classless
Inter-domain Routing. it’s a convention to define
range of IP addresses, basically. If I say 0/24, Calculate. OK, it shows that all the
IP address from 0 to 255 can be used here. Let’s see if there was
a parameter to fill in. The last one is the
number of CAS instances. So let’s put four here
and let’s save this file. The last step will be simply
to run the deployment, launch the template,
if you prefer. So I named my deployment
my-qs-gcp-demo and what I need to provide is simply the
location of the configuration file. So you can see that the process
has been started running. And if I come back
to my slides, we can see the next step is
to monitor the deployment. So I would show you two ways to
monitor it in the GCP console. So if we come back here
and go into Deployment, there it is, Deployment
Manager, Deployments. I can closer this console. I can see that my deployment
is running at the moment. I can click on it to have a
little bit more of details. So I can see a lot
of task that are being executed at the moment. So there’s a warning
regarding Python 3, but it’s not really an issue. Another way to monitor it is to
go into the Compute Engine page where we can see all
the instances that are being created for us. So as you can see, an Ansible
control mission has been created already for us
called my-qs-gcp-demo Ansible controller. And if I go in there, I can
click on serial port console to see like a real-time log. OK? So I can see what’s going
on inside the VM, basically. OK? So I can refresh
it, and that’s a way to follow what’s going on. So now, I will wait a
little bit and hopefully, in about one hour or
maybe a little bit more, I would have a Viya deployment
up and running in GCP. I’m back one hour
and a half later, and I want to see how
my deployment went. OK? So still in my
Google Cloud console, I go into the Deployment page,
Deployment Manager, Deployment. OK. So I see that my deployment
seems to be completed. I don’t observe a spinning
sign, so let’s go into it there. OK. I see some warnings because
of Python 3, but no error. So let’s double check
that the deployment has completed with success. Coming back in to the
VM Instances pages. OK. So let’s filter to
see only my instances. Because my deployment is called
my-qs, I can filter with that and I can see all the VMs
that have been created as part of the template deployment. So let’s go under Controller,
and let’s look at the log. OK. So when I see this,
it seems good. I don’t see any error. It’s the same kind
of logs that you see with a standard
[INAUDIBLE] deployment using and NT Builder. But basically,
everything seems OK. All right. This is one, this one is here
a high number of change task. It corresponds to the deployment
itself, and because failed, you can see row everywhere. I can have some confidence in
the fact that it should work. It seems to have taken,
I’d say, 68 minutes. OK. So let’s see if we can connect
to our brand new environment. So a way to connect to it
is to find the load balancer information because the access
is done through the load balancer, if you remember one
of the first of the first step in the explanation. So Network Services,
Load Balancing, if I look at the Frontend tabs,
I have an IP address here. I can copy. It is in the HTTPS port, I need
to copy paste the address here. OK. I can see the
local manager page. I will log in as the SAS admin. So this is a
default account that has been created as
part of the deployment. You might remember that we
used lnesas as a password. I can sign in. I want to be part of the
SASAdministrator group. OK. Seems good. I’m connected into SAS drive. What I want to do is to have
a quick look, a quick overview of the environment state. OK. So all the services
seems to be green, so up. And I can see that I have my CAS
controller and the four workers just as us asked
it in my template. OK. So the last thing
that I’d like to do is to make sure that I can
connect to my bastion host where we have the
Ansible controller. So to do that I need
to have an SSH client, and I need to use SSH private
key that I created previously. On my machine, I have the
Windows Linux subsystem. So I can use things like
SSH comments from there. So where is my private key? So private key that I
downloaded previously, you should remember. I placed it in C, GCP folder
and it’s called qs-gcp-demo. So if I type ssh -i /mnt/c/gcp/
qs so I’m pointing on the file that contains my
SSH private key. And I’m looking at
sasinstall and I want to connect to the machine. So I need the
external IP of the VM that is running the
Ansible controller. So if I come back
into a GCP console, I go Compute Engine,
VM Instance here. If I click on my controller,
I see the external IP. Copy. Paste it there. Yes, accept the key. OK. And now I’m connected
to my bastion hosts. And from here, I can interact
with my Viya environment in a secure way. So that’s the end of the demo. So let’s wrap up. As we’ve seen, the GCP
Quickstart for SAS Viya can be used to automate
the deployment a Viya environment with a SMP single
machine or MPP CAS server. It to tested up to
10 CAS worker nodes. You might have noticed
that a template also exposes the VM instance
types and the storage, so you can customize it
to fit your own needs. If you need to have bigger
machines, it’s possible. If you need to have more space,
it’s possible very easily. But if you are familiar
with GCP and Ansible, and also understand the
Viya deployment process, you can modify the
code and templates to extend the capability and do
even more complex deployment. That’s it. I hope it has been
helpful and informative, and I thank you
for your attention.

Author: Kevin Mason

Leave a Reply

Your email address will not be published. Required fields are marked *