Hello and welcome to the SAP HANA Academy.
The topic of this video tutorial series is Getting Started with SAP HANA on the Google Cloud Platform
and in the next couple of videos we will take a look at how to start and stop an SAP HANA system.
In the previous video, we have seen how you can stop and start HANA using cockpit for HANA 2.0
and studio for HANA 1.0.
This video will be about using the SAP HANA cockpit for offline administration tool
- we also looked at this briefly -
to stop and start our SAP HANA, express edition VM on the Google Cloud Platform,
as created by Cloud Launcher.
Hi, I am Denys van Kempen.
OK.
SAP HANA cockpit for offline administration.
I mentioned, in our previous video that, for HANA 2.0, the offline cockpit is considered
to be a bit of a legacy tool.
It was deprecated, if not mistaken, with the SPS 02 release recently, July 2017, and so
is typically mainly used only in the later editions of SAP HANA 1.0.
However, it is still available for HANA 2.0 and still works as advertised.
So, in our case, for the SAP HANA, express edition VM as created by the Google Cloud Launcher,
in my view, you might actually still find it quite useful.
The reason is that both the regular HANA 2.0 cockpit and HANA studio require an additional
installation on a separate system or some other computer;
they are not bundled with SAP HANA, express edition.
So, that means we will have to do a bit of work before we can start to use them.
Also, we even will need to spend a little bit of extra cash if we want to run it in GCP as,
like I said, we need another VM where we can then install the software on.
OK.
Granted.
In theory, you could install HANA studio on the HANA server directly, and configure the
required X-Window environment for graphic display on the HANA SUSE Linux server and
also somehow get your SSH shell to redirect the output to a remote display or,
failing that, get VNC working for a remote desktop but,
as you probably guessed, not only would this cause a bit of headache but also it would
add some overhead on your HANA server, which apart from acting like a blazingly fast in-memory
database server, would suddenly also have to start worrying about displaying graphics and all.
Not such a great idea; I would not recommend it.
Apart from our offline cockpit then, HANA express comes with command line tools only.
In the next video, we will explore these command line tools in some more detail but for now
let’s focus first on the offline cockpit.
To get it to work is very easy.
All we have to do is create an additional firewall rule.
The SAP HANA cockpit for offline administration is a web tool and it uses port 1128 for HTTP
and 1129 for HTTPS to connect to the SAP host agent running on your HANA system.
If we take a look at the firewall rules in the Google Cloud Platform console:
[Products & Services > VPC networks > Firewall rules]
we can see that Cloud Launcher for HANA express edition has not defined rules for the offline cockpit.
Not surprising, really.
First of all, as I’ve mentioned, it is a bit of a legacy tool and secondly, more important,
you may want to think twice before exposing the SAP host agent to the external network.
For our training purposes, no big deal, but in practice, you might only want to use this
if you have set up a bastion host, for example, as the only access point to the external network
and allow access to the HANA VM from this protected host exclusively.
We will show you how you can set this up in one of the upcoming videos.
Let’s take a look, first, at the rule for the application server xsengine: tcp-4390.
As an example how this is setup.
It is for HTTPS.
Uses default network with a certain priority.
Direction Ingress, Action on match: Allow.
The targets tag is the same as the name of the rule.
IP ranges is any network: 0.0.0.0/0 (the most insecure setting you can have, make note)
The most secure would be to only allow traffic from you own computer with fixed IP.
Depends a bit on what your goal is.
For SSH and also for our offline cockpit, allowing traffic only from a certain IP range
maybe the most appropriate configuration.
On the contrary, the HANA web server; you may want this to be accessible everywhere.
So, the right setting here depends on your objective.
Finally: Protocols and ports.
Uses tcp : port.
OK.
Let’s copy the first part.
Return.
Create firewall rule.
Name: paste from clipboard, append minus 1129.
I will just create the rule for HTTPS.
You may remember from the previous video, that we have to provide user name and password
to connect to the offline cockpit, so the least we can do is to have this encrypted.
I would keep port 1128 for regular HTTP shut.
We don’t need it.
You can add a description, if you want.
Maybe as a reminder.
Non-default setting: port for SAP HANA cockpit for offline administration.
Network and Priority we can leave unchanged; same for Direction of traffic and Action on match.
Target tags: past from clipboard again and append the port.
Source IP ranges; I will enter the whole wi de world: 0.0.0.0/0.
You might want to be more prudent here if you are doing anything serious.
Protocols and ports. Enter tcp:1129.
If you want, you can select the command line link and copy and paste it to a script file,
so you can easily recreate it next time, if needed.
Click Create.
Then select VM instances
the sap-hanaexpress VM.
EDIT
and again past from clipboard here in the Network tags box.
Click Save.
If it is running, the VM needs to be restarted to pick up the new firewall rule
and you might want to copy the external IP.
So, let’s test it.
Let’s open our browser and build the URL.
Enter https://
Paste the external IP from clipboard.
Port 1129 - this is a fixed SAP host agent port.
It is always the same, for SSL.
Not specific to HANA express, not even to HANA.
The host agent is installed on any SAP system.
Enter /lmsl (lifecycle management software logistics, that’s were this is coming from)
/hdbcockpit
/HXE - this is the SID, system identifier, uppercase.
So, should you have multiple HANA systems running on a single server, this is how you
tell the host agent which one you want to connect to -
And finally /index.html - required; needs to be exactly like this.
Enter.
“Et voilà”.
Authentication Required.
You may remember from the previous video that we need to provide the user name and password
from the operating system administration account, sid+adm, for HANA express that’s hxeadm.
The password is the one set when you connected the first time to your HANA express system
on the command line - the same as the database master password, if you recall.
This should return the SAP HANA Cockpit for Offline Administration
for our HANA express system HXE.
Google is proposing to save the password, you might want to think about whether this is a good idea here.
Also, the browser warns us that the connection is not secure.
This is normal in our case, as SAP HANA is using a self-signed certificate, there is
no upstream authority that has validated the certificate, hence the message.
Fine for test and training but if you want to do anything serious, of course, you will
need to set this up properly.
If the connection is refused, by the way, you can always reset the hxeadm password on the command line
as root with ‘sudo passwd hxeadm’.
You can do this as often as you want.
You won’t break anything.
OK.
We can stop and restart our system here, from the System Operations page.
You should be familiar by now with the processes. If not, you might want to review the previous video,
where we discussed this.
Note that the HXE tenant only has an indexserver here on HANA express, there is no separate
process for the XSEngine app server, classic model.
There is one embedded in the name server, by the way, but that will take us a bit off topic.
OK.
Here you stop your system or restart, whatever you feel like today.
All using the friendly web interface of SAP HANA Cockpit for Offline Administration.
You can also take a look at the log and trace files. Click Diagnosis Files.
Pretty advanced stuff, typically used for support cases.
Same for the other tile here: Troubleshooting Unresponsive System.
But to have a web tool allowing you to restart your HANA system could be useful.
Let’s give it a try and restart our HANA system.
I will pick 'Immediately' as I am the only user on the system and there are no transactions.
Normally, you might prefer a Soft restart.
The page gets a refresh if a component changes state.
So, we slowly see all processes come up again. I will fast-forward this a bit but you get the idea.
Easy does it.
OK, to recap: to start, stop or restart the SAP HANA, express edition system on the Google
Cloud Platform you can use the web interface of the SAP HANA cockpit for offline administration.
There is nothing to configure or install.
It comes with the system.
To access the tool, however, you may need to add an additional firewall rule.
In the next video, we will take a look at the command line tool to start, stop or restart
an SAP HANA system.
You can find more video tutorials on our YouTube channel.
If you would like to be informed about new video tutorials, please subscribe to our channel.
You can connect with us on LinkedIn or follow us on Twitter, as well for updates.
And we also have a page on Facebook and Google+.
If you are watching this video on YouTube, do not hesitate to leave your comments to
the video page and, if you like, give us your vote on his video.
Thank you for watching.