XS Advanced Administration: Login
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!
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.
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.
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:
This file can be distributed to the clients and consumed via the
$ xs login -a https://api.example.org:8080 --cacert <PATH>
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.
There is a convenient way to login at XS advanced if you are already logged in as
sidadm at the SAP HANA system:
This command will automatically set up the xs cli and log in as XSA_ADMIN after prompting the password.
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.
I installed Hana Express on Ubuntu 18.04LTS. Everything is working fine so far, I can reach the xs engine in the web browser, it's up and running. WHen I try to execute the command "xs login" in the shell I get a python error:
Fatal Python error: Py_Initialize: Unable to get the locale enconding
File "/usr/sap/HXE/HDB90/exe/Python/lib/python2.7/encodings/__init__py", line 123
Syntax Error: invalid syntax
There is a "^" under the comma in the line with the syntax error.
I searched the web, most articles say that is has to do with the PYTHONPATH variable, but it contains the correct path.
Could you please give advice?
I need this to install the dwf package.
Thanks in advance for your help!
Where did you execute
There are two options:
for more / detailed information follow these discussions