Skip to Content
Previous

Installing XS CLI Client

By Currie

Install the client package if you intend to develop XS applications on a machine that will not have a local SAP HANA 2.0, express edition installation. The clients let you access SAP HANA 2.0, express edition from your client machine.

Details

You will learn

How to install the The XS advanced client-tools bundle.


The server machine in these instructions refers to the machine on which SAP HANA 2.0, express edition is installed, while client machine refers to your local machine. You do not need to install the two on the same machine or VM.

Step 1: XS CLI client info.

The XS advanced client-tools bundle (xs.onpremise.runtime.client_<platform>-<version>.zip) also includes the Javascript bundle (xs_javascript-1.3.0-bundle.tar.gz), which includes a selection of mandatory Node.js packages developed by SAP for use with the Node.js applications running XS Advanced runtime.

You can use the XS command line client to perform a wide variety of developer- and administrator-related tasks. For example, in the role of a developer, you can use the XS CLI to connect to the XS Advanced runtime installed on the server machine, log on as a specific user, and deploy and manage your applications.

Step 2: Download the client package.

Install the Download Manager to your client machine and download the client package.

  1. Save the Download Manager installation files to your client machine and open it. For instructions on downloading and running the Download Manager, see either

  2. In Download Manager, in the Image pull-down, select either Virtual Machine or Binary Installer.

  3. Click Browse and select a directory where your client package will be saved.

  4. Select the Clients package that matches the machine you will be installing the clients on. Clear the Select boxes of all other packages.

  5. Click Download. The hdb_client_<OS>.tgz file, or clients_windows.zip for Windows, downloads to your save directory.

  6. Extract the compressed clients file:

    • For Windows and Mac machines, use a compression utility.

    • For Linux, navigate to the directory in which you wish to extract the client files and use the tar command.

    cd <preferred_filepath>
    sudo tar <download_filepath>/clients_<OS>.zip
    

    These files are extracted:

    clients_linux_x86_64.tgz

    • hdb_client_linux_x86_64.tgz

    • xs.onpremise.runtime.client_linuxx86_64.zip

    clients_linux_ppc64.le.tgz

    • hdb_client_linux_ppc64le.tgz

    • xs.onpremise.runtime.client_linuxx86_64.zip

    clients_windows.zip

    • hdb_client_windows_x86_32.tgz

    • hdb_client_windows_x86_64.tgz

    • xs.onpremise.runtime.client_ntamd64.zip

    clients_mac.tgz

    • hdb_client_mac.tgz

    • xs.onpremise.runtime.client_darwinintel64.zip

Step 3: Install the XS CLI client.

Use a compression utility to extract the file you downloaded for your platform:

  • (Windows) xs.onpremise.runtime.client_ntamd64.zip

  • (Mac) xs.onpremise.runtime.client_darwinintel64.zip

  • (Linux) xs.onpremise.runtime.client_linuxx86_64.zip

  • (PowerPC) xs.onpremise.runtime.client_linuxppc64le.zip

The system creates this folder:

xs.onpremise.runtime.client_<version>
Step 4: Verify XS Advanced runtime is installed.

Enter the following URL into your Web browser:

https://<hana_hostname>:3<instance_number>30/v2/info

For example:

https://my.hana.server:39030/v2/info

The response displayed in the Web browser is a JSON string with details that indicate whether there was a successful connection to the XSA controller. The connection must exists before you can connect from within the API command.

Step 5: Confirm XS Advanced is Available

On your client machine, open a command window and run the following.

xs help
xs -v

On Linux, run these as <sid>adm.

You see the Client Version in the output. If not, you cannot connect to XS Advanced runtime on SAP HANA to deploy your XS Advanced applications.

Step 6: Connect to XS Advanced controller.

Specify the URL of the API end point on the SAP HANA server you want to connect to:

xs api https://<hostname>:3<instance_number>30

Note:
If this step fails, it may be due to a missing SSL certificate. Continue on to the next step to add the SSL certificate, otherwise skip the next step.

Step 7: Add SSL certificate to connect to the server.

Open a command session on the server machine or open a PuTTY session to the server machine. From the command prompt, log in as sudo and go to the certificate default.root.crt.pem, which is typically located here:

<installation_path>/<SID>/xs/controller_data/controller/ssl-pub/router

For example, where <installation_path> is /hana/shared and <SID> is HDB the certificate location would be:

/hana/shared/HDB/xs/controller_data/controller/ssl-pub/router/default.root.crt.pem

Copy the certificate to a folder on the server where you can easily access it. Using an FTP client or the scp command, send a copy of the certificate from your server machine to a safe location on your client machine.

FTP:

/<path>/default.root.crt.pem

scp:

scp <server_machine_user>@<ip_address_server>:<file_destination>/default.root.crt.pem <client_machine_user>@<ip_address_client>:<your_desired_filepath>\

Exit your FTP and PuTTY sessions and return to your client machine. Try the previous command again, but use the -cacert option and specify the local certificate you just copied:

xs api https://<hostname>:3<instance_number>30 - cacert "<copied_filepath>/default.root.crt.pem"

Log on to the SAP HANA instance specified in the API end point that you set in a previous step. SAP HANA provides the default XSA_ADMIN user with administrator permissions. Although you can use this user ID to test the connection, you should create a new user with more limited permissions to use for developer tasks.

To log on, run the following:

xs login -u XSA_ADMIN -p "<password>"

Note:
A password is assigned to the XSA_ADMIN user during SAP HANA 2.0, express edition installation.

Step 8: Test the XS Advanced connection.

To test your connection to XS Advanced by running the following command on the SAP HANA 2.0, express edition server:

xs apps

Updated 04/25/2018

Time to Complete

10 min

Beginner

Tags

Next
Back to top