Welcome to the SAP HANA Academy. My
name is Bob and in this series of videos
we'll be looking at SAP Vora 2.0. In
this series of videos we're going to be
looking at installation. And in the
second of a five video series we're
going to be looking at preparing an
Ubuntu server which we created within
the Google Cloud Platform so we can
install a Kubernetes single node cluster
within a Minikube virtual machine.
Ultimately we'll also be looking at
installing SAP Vora on a Docker
container within this server. To give
some background what we've done in the
previous video is we created an
Ubuntu instance within the Google Cloud
Platform. Then we looked at how to get
the SAP HANA Vora installation files
from SAP service marketplace and where
to locate the scripts that you can use
to copy and paste into your server. Now
we can use those scripts in order to
prep the server. So we're going to run
through these scripts. The first one is
to update your various packages by
running an app get update. You just have
to run that script. It’s gonna again, it
doesn't really install new versions. It
simply updates the package lists for
upgrades for any packages on the server.
Once you've done that then we'll need to
install a tool called JQ. Now JQ is like
sed but for using JSON data. So I’m
gonna run that command. And why are we
installing it? Well we're going to use it
for a command later on when it comes to
restarting our Ubuntu server so we can
restart the Vora servers easily.
That's why we're installing this JQ tool.
And then I'll run a clear. So this second
command is going to execute and update
our packages for some of the missing
things that we need. So to highlight some
of them you've got ATP transport HTTP,
which enables you to connect to those
HTTP sites.
We're also going to be using a tool
called curl. So curl is the tool that's
used to transfer data using
various protocols
via command line. So we need that
tool as well. So this just gets those
packages. So we need to execute that.
There we go. It executes very quickly.
I'll run a clear. Now because we're using
Docker we need to download this specific
key. So this next command will add that
key into our system using curl again.
We're connecting with HTTPS. So that's
why we need to run this curl command.
This is primarily used for the Docker
engine or for the Docker repository and
now what we can do is we can add the
Docker repository to our server. So I'll
run a clear and I'll run this command.
It simply adds that Docker version 1.1 2
to our repository. So I'll run that
command. It basically gets that file and
it puts it on our server. So now what
we'll do is we'll update our list of
packages again with that app get update
command. That just makes sure everything
is up to date on this server. Once we've
done that we can then install our Docker
engine. So the specific version I'm using
is 1.12.6. Again this is if you follow
along with these scripts everything will
work. I'll just click yes to install that
engine. It takes a few seconds to install.
So there we can see it installed with no
issues. These next command simply
allocate our existing user, which for me,
is SAP HANA Academy to our Docker
group. So we need that in order to run
Docker from this user. Now that we've
installed Docker it will be a good idea
to test that it works. So we can do this
with this command which is a Docker run
and I'm simply executing a typical
Hello World just to make sure that
Docker’s up and running. So it should
create it. It should run it and there you
can see that we've got no issues. We’ve
got a hello from Docker.
So I'll run a clear. There's a few more
packages we need to install. One of them
is called socat. We’re going to use
this later on when we use helm. So I will
install socat and we'll also need to
install Python.
So there's a few things we'll have to
install. Firstly, we'll have to install
Python as you can see here. We’re also
gonna need Python pip - pip.
So I'll install that again. We’ll click
on yes to install. It'll take a few
seconds to install that. So while it's
installing, why do we need Python? Well in
order for Vora security to work we need
to install Python. So that's the only
real reason we're installing it. Next
release we'll need to install py yaml
which is a yaml parser and also an
emitter for Python. So this commands
installs this package. So I'll just
execute. It’s also telling us we should
consider upgrading. It’s a good idea to
upgrade. So I'll just copy this command
quickly and I'll paste it in and
we'll execute and then we've upgraded
our py yams.
So now we've prepped our machine. What we
can deal with is the Kubernetes cluster.
What we'll need to do next is
install a tool called kube CTL. Which is
essentially a command-line interface for
running commands against a Kubernetes
cluster. So to get this package we're
going to use curl. Again the commander is
in that GitHub file. So if I'd run a curl
with our connection to Kubernetes. Then
what we're doing is installing kube CTL
from this location.
We're just here changing the rights on
executable and we're moving that
executable to a folder called user bin
kube CTL. Like so. Now that we've
installed or essentially downloaded the
kube CTL file the good idea to test it.
So to do that I can run a kube CTL
cluster - info and it's telling us that
there's a Kubernetes master running at
this location. So that's a simple test to
make sure that your kube CTL command
line interface works. So up to now what
we've done is we've prepped the image
and we've installed some packages and
also we’ve looked at installing Docker
and also kube CTL so we can interact
with a Kubernetes cluster. Of course now
what we want to do is create that Kubernetes
cluster on this singular server. So
how are we going to do that? Because
normally Kubernetes has to run on a
series of servers. Well in order to run
it on a single server we can use this
tool called Minikube. So Minikube is a
tool that makes it easy to run
Kubernetes locally on a single server.
And it runs a single node Kubernetes
cluster literally inside a VM on this
server. Again we're going to utilize curl
to get hold of Minikube. So this is the
command. We’re going to run. A curl and
we're going to basically get Minikube
and just copy the executable on our
server. Then we're gonna run a chmod to
change the rights of that executable and
we're going to move it to our user local
bin folder. That's what those three
commands do. Of course once you've copied
that executable you're going to want to
test it. So we can test that Minikube
works by running a Minikube version and
here you can see the version that we've
got and of course we're testing that the
executable works. So we can run a clear.
So now that we've got Minikube
installed what we need to do is create a
Minikube virtual machine on this Ubuntu
server which is going to house our
Kubernetes single node cluster. So
essentially this command carries out
that task. We’re running a sudo Minikube.
We're starting that virtual machine. And
what you need to do is allocate some
things to that machine. So we're
allocating 4 CPU. For me because I
created a 52 gigabyte RAM server, Ubuntu
server, in Google Cloud Platform. I'm
allocating 48 megabytes, 48 gigabytes of
RAM to that server. We’re making the disk
size 50 gigabytes. Which should be fine.
I'm specifying the Kubernetes version
which is 164. Because that's the version
of Kubernetes I want to run. And lastly we're
just saying that we don't want to use
any virtual machine driver. So this is
the command. What I'll do is, I'll execute
and it's going to start up that server
and you should see that it's starting
that server
and we can… it’s setting up Kube config
which means we can connect. If you
can also of course run that again and
run a clear in case it doesn't appear.
But how do you know if it's appeared or
not? What we'll need to do is connect and
we'll need to get a status. So what these
four commands do is change the rights on
these various executables. So we can run
them. We’re just changing groups and
changing the owner. I'll run a clear and
then lastly what we'll need to do is run
a Minikube status. And the Minikube
status will show us that Minikube is
running correctly. The cluster is running.
Of course the Kubernetes cluster. And
that Kube CTL which is that command line
can correctly point to our Minikube VM
which is running locally on port, on IP
one two seven zero zero one.
So to recap in this video we've looked
at installing various packages needed in
order to use Minikube and Kubernetes on
a single node cluster. We’ve also
installed Docker which we're going to
use later on when were installing Vora.
And lastly what we did is we installed
Kube CTL which is a command line tool to
access your Kubernetes cluster. And
normally Kubernetes was drawn on a multi
node cluster but because we're using a
Minikube virtual machine it can run on
a single node instance. Of course what
you're going to want to do is test that
your Kubernetes cluster is indeed working.
So in the next video, what we're going to
do is we're going to have to open up
some ports within the Google Cloud
Platform and then test via a URL that we
can connect to Kubernetes. And again
we'll cover that in the next video.