Skip to Content
Previous

Check your environment (MovieLens App)

By Abdel DADOUCHE

Check your environment before starting the MovieLens tutorial series for SAP HANA, express edition

Details

You will learn

  • Which flavor and version of SAP HANA, express edition is needed to complete this tutorial series
  • Complete a series of required post-installation task
  • Enable the builders for the development space
  • Add a connection in the Database Explorer
  • Enable the Script Server to allow the execution of AFLs functions
Step 1: Which SAP HANA flavor and version?

In order to complete this tutorial series, you need to use as a minimum version:

  • SAP HANA, express edition 2.0 SPS03

This version will allow you to complete all the steps described in the series. And thanks to the availability of the SAP HANA Automated Predictive Library (APL), you will be able to compare different predictive libraries.

As you may already know, SAP HANA, express edition comes in two different flavors. In this series, you will be leveraging the SAP Web IDE to complete both the execution of SQL and SAP HANA XSA development tasks. Therefore, you will need:

  • Server + XSA Applications

You can check the SAP HANA, express edition installation flowchart to find all the installation details.

If you don’t have an instance up and running, be aware that you don’t need to complete the installation of all optional packages (this will be described when needed).

Please log in to access this content.
Step 2: Setup the XS CLI API endpoint and login

In order to complete the next steps, you will be using the XS CLI client which is locally installed with your SAP HANA 2.0, express edition instance.

Therefore, you can run these commands on the server using a terminal console, or remotely using PuTTY for example.

If you running the commands remotely using PuTTY, make sure to switch to the hxeadm user:

sudo su - hxeadm

Note: You may prefer to run XS CLI commands remotely (from your local desktop for example). To do so, you can complete the XS CLI Client installation

Execute the following series of XS CLI commands.

Set the API endpoint:

xs api https://hxehost:39030

Note: if you receive the following error when executing the previous command:

 

FAILED: SSL connection error (supposedly untrusted connection, check the certificates)

As describe in the XS CLI Client installation tutorial, you will need to use the SSL certificate with the cacert command switch, and issue a command like this instead:
 

xs api https://hxehost:39030 -cacert <path>/default.root.crt.pem

Where the default path for the certificate on the server is:

  • /hana/shared/HXE/xs/controller_data/controller/ssl-pub/router

Login to your organization and space:

xs login -o HANAExpress -s SAP -u XSA_ADMIN

Note:

You will be prompted for the XSA_ADMIN password (which is initially set to the master password during the first boot initialization).
 
You can get the list of organizations using the following command:
 

xs orgs

and the list of spaces using:
 

xs spaces
Please log in to access this content.
Step 3: Verify the builders deployment

With some installations, the builders are not deployed in the development space which will prevent you from successfully building and running your projects in the SAP Web IDE.

Before deploying the builder, you will need to start the di-space-enablement-ui application which might be stopped be default.

Get the current status:

xs app di-space-enablement-ui

The output should look like this:

Showing status and information about "di-space-enablement-ui"
  name:             di-space-enablement-ui
  requested state:  STOPPED
  instances:        1
  memory:           16.0 MB
  disk:             <unlimited>
  buildpack:        ***************
  urls:             https://hxehost:510XX

Start the app:

Run the following command if the requested state is STOPPED.

xs start di-space-enablement-ui

The output should look like this:

Starting app "di-space-enablement-ui"...
 Starting instances with the default OS user
 1 of 1 instances running

Showing status and information about "di-space-enablement-ui"
  name:             di-space-enablement-ui
  requested state:  STARTED
  instances:        1
  memory:           16.0 MB
  disk:             <unlimited>
  buildpack:        ***************
  urls:             https://hxehost:510XX

Instances of droplet 1 created at Apr 4, 2018 5:36:52 PM
index  created                 state    os user
----------------------------------------------------
0      Jun 4, 2018 1:35:36 PM  RUNNING  <not set>

Check the builder status:

You can now access the application urls displayed in the previous command output.

From the previous output, the URL is: https://hxehost:510XX (make sure to adjust the URL based on your current output).

Login using the XSA_ADMIN credentials.

Login

Verify that the status for the development space is Enabled.

If not click, on Enable.

builders

Stop the app:

In order to release the resources used by the di-space-enablement-ui application, you should stop if this one was stopped initially.

xs stop di-space-enablement-ui

Based on the outputs returned previously, provide an answer to the question below then click on Validate.

What buildpack value is returned from the xs start di-space-enablement-ui command?
×
Step 4: Rescale processes

If your environment is limited in term of memory resources and in order to ensure a smooth experience, you can execute the following commands to stop certain services, rescale the memory used by some processes and run the memory collector.

Stop services:

The following services can be stopped as you won’t leverage them in this tutorial series.

xs stop sap-portal-static-resources
xs stop cockpit-telemetry-svc

Stop services:

The following services can be scaled up to ensure a better user experience during this tutorial series.

xs scale di-runner -m 512M -f -w
xs scale di-core -m 512M -f -w

Run the memory collector script:

The following script can be executed at any time to collected back unused process memory.

/usr/sap/HXE/home/bin/hxe_gc.sh
Please log in to access this content.
Step 5: Access the SAP HANA XS Advanced Cockpit

From the XSA Controller page, access the SAP HANA XS Advanced Cockpit.

As a reminder the default URL for the SAP HANA XS Advanced Cockpit is:

  • https://hxehost:39030
XSA Controller

Login using the XSA_ADMIN credentials.

Login

Once logged in, you will get access to the SAP HANA XS Advanced Cockpit:

SAP HANA XS Advanced Cockpit
Please log in to access this content.
Step 6: Update the XSA tenant configuration

By default, the SYSTEMDB will be used when deploying or running your XSA application using HDI containers.

However, in order to leverage the SAP HANA AFL libraries, you will need to enable the Script Server, which is not possible on the SYSTEMDB.

Therefore, you will need to map the HXE tenant to your development space.

On the left side bar, click on Tenant Databases.

SAP HANA XS Advanced Cockpit

As you can notice, by default, the HXE tenant is not enabled for XSA and is not mapped for the development space.

SAP HANA XS Advanced Cockpit

Click on the Enable icon SAP HANA XS Advanced Cockpit for the HXE tenant.

Provide the SYSTEM user credentials for the HXE tenant ( Tenant Database ) and the SYSTEMDB ( Physical Database ).

SAP HANA XS Advanced Cockpit

Wait for the activation process to complete.

Click on the Map icon SAP HANA XS Advanced Cockpit for the HXE tenant.

Set the following details:

Property Value
Organization HANAExpress
Space development
SAP HANA XS Advanced Cockpit

Click on Save.

Once completed, the configuration should look like this:

SAP HANA XS Advanced Cockpit
Please log in to access this content.
Step 7: Access the Web IDE

From the XSA Controller page, access the Web IDE.

XSA Controller

Login using the XSA_DEV credentials.

Login

Once logged in, you will get access to the Web IDE:

Web IDE

As a reminder the default URL for the Web IDE is:

  • https://hxehost:53075
Please log in to access this content.
Step 8: Add the database connection

On the left side bar, click on the Database Explorer icon Web IDE icon.

Web IDE

Add the SYSTEMDB connection

If you don’t have any database listed you will receive the following popup message:

Web IDE

Click on Yes.

If not, then use the Add a database to the Database Explorer icon Web IDE.

Select SAP HANA Database (Multitenant) as Database Type.

Enter the HXE host name and instance number (default value is 90).

Select System Database.

Enter the SYSTEM user name and password (which is initially set to the master password during the first boot initialization).

You can also check the Save user and password to avoid entering credentials in the future.

Web IDE

Click on OK.

Web IDE

Add the HXE tenant connection

Use the Add a database to the Database Explorer icon Web IDE.

Select SAP HANA Database (Multitenant) as Database Type.

Enter the HXE host name and instance number (default value is 90).

Select Tenant Database and enter HXE as name.

Enter the SYSTEM user name and password (which is initially set to the master password during the first boot initialization).

You can also check the Save user and password to avoid entering credentials in the future.

Click on OK.

Web IDE
Please log in to access this content.
Step 9: Check the Script Server

The Script Server is an auxiliary service that is required to execute Application Function Libraries ( AFL ).

For example, this applies to the SAP HANA AFL component like the SAP HANA Predictive Analysis Library (PAL) and other similar libraries.

By default, the Script Server is not activated on the HXE tenant.

Select the HXE tenant connection in the Database Explorer panel, then click on the Open SQL Console icon Database Explorer (or press CTRL+ALT+C).

Paste the following SQL statement in the console and click on the Run icon Database Explorer icon:

SELECT SERVICE_NAME, PORT, ACTIVE_STATUS FROM SYS.M_SERVICES ORDER BY 1;

If no rows is returned for the scriptserver, then it means that the Script Server is not enabled on the HXE tenant.

To enable it, you will have to run the following SQL statement on the SYSTEMDB.

Select the SYSTEMDB connection in the Database Explorer panel, then click on the Open SQL Console icon Database Explorer (or press CTRL+ALT+C).

Paste the following SQL statement in the console and click on the Run icon Database Explorer icon:

ALTER DATABASE HXE ADD 'scriptserver';

Now, you can now verify that the service is started using the first SQL statement.

The result should return a list of service names, their associated port numbers and their statuses including an entry for the scriptserver.

Provide an answer to the question below then click on Validate.

From the previous result, which service is NOT part of the returned list?
×
Next
Back to top