Skip to Content
Technical Articles

SAP HANA Cockpit Access on Google Cloud Platform

I am sharing my personal experience on Google Cloud for SAP HANA Cockpit Access(Post Installation).

In case you have not already signed up for GCP account, you can enable GCP from any of your gmail account from here and get $300 free credit for first year.

You will need to setup your billing info but Google won’t charge you anything unless you run out of your free credits and give your explicit consent for charge, till then enjoy the FREE GCP Tier but it’s provide limited CPU Quota (Due to Free Credit)

For Access GCP VM – Follow Below Steps

Please follow the below steps –

  1. Register your GCP account
  2. Setup Billing ( (Don’t worry, they will charge 1 INR & you will get back the same)
  3. Create a Project
  4. Enable Compute Engine API (as below)
  5. Once enable, Navigate to Compute Engine – VM Instances
  6. Create a New VM as per below specs – (I prefer to choose)
    1. e2-highmem-4 (4 vCPUs, 32 GB memory)
    2. SLES 12 SP5
    3. Add Standard Persistent Disk –
      1. SWAP – 100 GB
      2. hana –  500 GB
    4. Choose Network – Default
  7. Save & Start the VM

Once you create the VM in GCP then you need to enable SSH to access from outside & create SWAP size & also HANA partition – To do this perform SSH locally from Google Cloud Console

  1. Enable SSHD
    1. vi /etc/ssh/sshd_config
    2. Change PasswordAuthentication to yes
    3. save & exit & Restart the VM.
    4. Verify the SSH access from outside.
  2. Create SWAP for entire partition
    1. lslbk
    2. mkswap /dev/sdb
    3. swapon /dev/sdb

make permanent in /etc/fstab

/dev/sdb               swap                    swap    defaults        0 0

Restart the VM & verify SWAP partition should exists.

3. To create /hana/shared or any other partition in linux (I used EXT4, you can use XFS also)

    1. lsblk –  /dev/sdc (is free)
    2. mkfs -t ext4 -L “HANA” /dev/sdc
    3. mkdir /hana/shared
    4. mount /dev/sdc /hana/shared
    5. get the UUID – blkid /dev/sdc  (it will show the UUID)
    6. Add permanent entry in fstab file

UUID=48*****************      /hana/shared   ext4     defaults         0 0

Restart the VM & verify the access via Public IP from SSH(22) Port.

Please Note – It will only allow 22 Port, if you want to access other ports(50127, 51029, 39630) also which requires later after SAP HANA Cockpit Installation, you need to create new Firewall Rule as per your port requirement or any:any in GCP – create a TAG & assign the same TAG to your VM.

 

Follow the below nice SAP detailed blog to perform the SAP HANA Cockpit Installation.

https://blogs.sap.com/2017/12/14/sap-hana-2.0-cockpit-installation-and-configuration-how-to-guide/

 

Once HANA Cockpit installed Successfully, it will start the Cockpit HANA system & share the URL to access the SAP HANA Cockpit Page.

You will see below 2 URL in the end of the Installation –

Launch SAP HANA cockpit by opening https://<Local Host Name>:51027

Launch SAP HANA cockpit manager by opening https://<Local Host Name>:51029

 

Change this URL to VM Public IP & try to access the same but still not working.

https://PUBLIC IP:51029/

 

Reason –

As we have installed HANA cockpit in Cloud VM we need to update the below file with Public IP & restart the HANA box to make it working from Public IP.

/usr/sap/<SID>/SYS/global/hdb/custom/config/xscontroller.ini

Make a copy of above file & change the below 2 configuration from LOCAL Host Name to PUBLIC IP

default_domain = <Local Host Name>

api_url = https://<Local Host Name>:39630

Save the File & Restart the VM.

 

Verify the XSA URL Post Restart –

https://PUBLICIP:39630/

Now you are able to access your Test Environment of SAP HANA Cockpit from PUBLIC IP.

 

Please Note – if you are using Dynamic Public IP then after restart of VM, you need to update the above file again to get it working.

 

Thanks for reading..

3 Comments
You must be Logged on to comment or reply to a post.