Recently I worked on refreshing a tutorial Use JupyterLab with SAP HANA, express edition. At the beginning of that tutorial, we need to install some OS packages to make further steps possible. And for that, your HANA’s host OS needs to be registered.
There is a video SAP HANA Express Edition: Setup, Register VM from Denys van Kempen on how to register SUSE OS. But in my case, I was running HANA Express on a VM in Google Cloud Platform (GCP). And, accordingly to SUSE support notes I’ve found, GCP is handled here differently than Azure and AWS.
So, on GCP the OS license is included already in a pay-as-you-go model.
You can see attached licenses using
gcloud CLI logged into your account:
gcloud compute instances \ describe <<vm-name>> \ --project <<project name>> \ --zone <<vm-zone>> \ --format="flattened(disks.licenses)"
In the instance’s shell…
…switch user to
root and check available repositories with
The OS on this VM is SUSE Linux Enterprise Server (aka SLES) and there is a
SUSEConnect utility already preinstalled. With
SUSEConnect --status-text you can check the status of your system registration.
Let’s re-register the OS…
…using SUSE process for cloud pay-as-you-go system.
1. Clean-up and check
sudo SUSEConnect --cleanup sudo SUSEConnect --status-text
Remark: I will include
sudoin commands to make it easier to use with another user who can have
2. Get “the public key and the instance data”…
…as requested if you check the flag
sudo SUSEConnect --help command.
And for that you need
gcemetadata utility from https://github.com/SUSE/Enceladus/tree/py2-sle11/gcemetadata.
/usr/bin/gcemetadata was preinstalled on my instance already. But on other instances, I was able to set it up from Github with:
git clone https://github.com/SUSE/Enceladus.git -b py2-sle11 Enceladus/gcemetadata # python ./setup.py install
Like me, you might be overwhelmed with the output of
gcemetadata --help and it took me some time to get it under control.
To get the instance’s identity I had to run:
gcemetadata --query instance --identity http://smt-gce.susecloud.net --identity-format full --xml
where IP address of
smt-gce.susecloud.net was already in the instance’s
If it is not there, then you need to find the IP address of the SUSE registration server using their other utility
3. Register your SUSE OS from a cloud instance
Generate the instance key…
sudo gcemetadata --query instance \ --identity http://smt-gce.susecloud.net \ --identity-format full \ --xml > myhxeongcp.xml
…and use it in the registration string.
sudo SUSEConnect --url https://smt-gce.susecloud.net \ --instance-data myhxeongcp.xml
Bingo! Let’s check with
sudo SUSEConnect --status-text:
This registration should as well create a config file
4. Register required extensions
Some activities (like the tutorial mentioned at the beginning of this post) may require you to use some of the SUSE extensions. You can:
- see available extensions with
sudo SUSEConnect --list-extensions,
- register required extensions with
--product <product identifier>from the list of extensions above, e.g.
sudo SUSEConnect --product sle-sdk/12.3/x86_64.
Update and patch your SUSE system…
sudo zypper lp sudo zypper patch
…and keep digging into SAP HANA, express edition!
PS. Versions of software used:
- SAP HANA, express edition:
SUSE Linux Enterprise Server for SAP Applications 12 SP3
Ok, it’s time to take a break and to enjoy the weekend!
-Vitaliy (aka @Sygyzmundovych)