Skip to Content

Hi everyone,

in the last post of this series, we covered how to install the xs command-line interface (xs cli) in order to administrate SAP HANA XS Advanced. This time we’re going to describe how to get started and how to log in.

Hope you’ll enjoy!

Getting Help

The xs command-line interface (cli) provides a comprehensive help for each command. To get an overview of all available commands issue the following command:

$ xs help -a

To get detailed help for a specific command use the following command:

$ xs help <command>

In order to find out the current version of XS advanced, use:

$ xs version

Also, there’s a comprehensive reference of all available xs cli commands in the SAP HANA Developer Guide.

Login

During login, the xs cli will connect to the so called API URL provided by the XS Controller. That means the API URL must be known and distributed to all users of the xs cli. Note, that the API URL varies from system to system as it is highly dependent on the default domain and the routing mode that was chosen during installation of XS advanced.  In order to find out the API URL for a particular SAP HANA system, login at the system as sidadm and run the following command:

$ xs-admin-login --api
https://api.example.org:8080

This command returns the API URL which you can now use to login by means of the xs cli:

$ xs login -a https://api.example.org:8080

API_URL: https://api.example.org:8080

If not specified on the command-line, the xs cli will prompt for the username and the password interactively. For example, in order to login as user XSA_ADMIN, which is the default admin user created during installation:

USERNAME> XSA_ADMIN
PASSWORD> *********
Authenticating...
ORG: myorg

It automatically targets the default organization that was created during installation. At first login, it interactively asks for the space you want to target. Therefore, choose the space you would like to explore:

Existing spaces:
0.      PROD
1.      SAP
SPACE> 0
SPACE: PROD

After successful login, it displays a summary of the login:

API endpoint:   https://api.example.org:8080 (API version: 1)
User:           XSA_ADMIN
Org:            myorg
Space:          PROD

After login, you can start to explore the XS advanced platform and like getting a system overview or navigate through organizations and spaces, which will be covered by one of the following blog posts.

Trust Certificates

If used remotely, the xs cli needs a trust certificate to establish a secure connection. This public trust certificate is stored on the SAP HANA system at the following location:

/hana/shared/<SID>/xs/controller_data/controller/ssl-pub/default.root.crt.pem

This file can be distributed to the clients and consumed via the --cacert option:

$ xs login -a https://api.example.org:8080 --cacert <PATH>

where PATH points to the location of the file default.root.crt.pemon the client side.

Alternatively, in case you fully trust the network connection to the server, you can skip SSL validation, although this is not recommended for productive use:

$ xs login -a https://api.example.org:8080 --skip-ssl-validation

Note: This step can be omitted if a certificate signed by a well-known CA is used for the XS advanced default domain. We’ll cover this topic in one of the upcoming blog posts.

Local Login

There is a convenient way to login at XS advanced if you are already logged in as sidadm at the SAP HANA system:

$ xs-admin-login

This command will automatically set up the xs cli and log in as XSA_ADMIN after prompting the password.

Wrap-up

That’s it for this time. Next time, we’ll have a look at how to get an XS advanced system overview using the cli.

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply