Hi, I am Philip from the HANA Academy.
In this series of videos, we are looking at the XS advanced model.
In this video, we are going to get started using XS advanced when you are with HANA 2.0
SPS 0.
Now there is some initial configuration you will need to do once XS advanced has been
installed and that’s what we are going to look at in this video.
Then you will be able to get going using Web IDE for HANA, for example,
the web-based developer tooling.
Let’s assume that HANA has been installed and XS was installed with all components,
that’s one of the options in installation, an admin user will have been created, typically
XSA_ADMIN, that is the default name, with the password, that’s something you are going
to want to know to do this configuration, and also you will know the fully qualified
domain name, or the URL effectively, we are going to use to connect to XS.
Now I am going to assume that it has been installed using a port-based routing and that
otherwise, pretty much the defaults for XS installation have been taken place, so it
is kind of a vanilla system.
So, the first thing we are going to need to do is to connect to the XS controller and
we can do that through a URL.
Now, by default, HTTPS is used.
So, I am going to do HTTPS.
So, let’s do that, colon, forward slash, forward slash
then I am going to paste in, basically, the URL, the machine where XS has been installed
and it does need to be the fully qualified domain name.
Then I am going to put in colon for a port, and then 3, and then the instance number,
that typically is going to be 00, but it could be anything between 00 and 99, so your HANA
instance number, and then 30, and then forward slash, v2, forward slash, info.
Now this should allow us to connect to the controller.
Now, you may well get a message in your browser saying that this connection is not private.
That’s because it is an HTTP site and by default the installation will use a self-signed
certificate.
So your browser naturally wants you to be weary.
There are two way around this.
One is that the administrative person that set up and installs HANA, well if it is not
yourself, will actually go and create a correct certificate and configure XS with that certificate,
or, for us, for this example, you can just bypass the issue by going to ‘advanced’
when I am using Chrome, and then going ‘Proceed to the site’ and it will warn you that is
unsafe but we know in our case that actually it is a system we are comfortable with.
Now, what we will see normally behind here is some JSON, and in the JSON, we can see
we got the XS Controller and all sorts of good information about it, and what we are
looking here is the service URLs item, and we can see we got “xsa-admin” and this
is where we get the URL of the Administrator and effectively because it is using port-based
routing, it is the same URL we were using, the difference is just the port number is different.
In my case, it is 51019.
So, I am going to copy that and then paste that in, as I want to be able to connect to
the Administrator.
So, I am going to log in and this is where I need to use that XSA_ADMIN, or whatever
the admin user was when XS was installed, with the password that was specified at that point.
So we can see that the Administrator comes up.
We see we have got an Application Monitor.
We are going to need this shortly.
We can see what we will see here are all the different apps that are up and running.
For us to go back we will see that we got organisations and spaces and also built roles.
So, we go into the Application Role Builder and we need to go to the ‘Configure Role
Collections’, here at the bottom, and I see that we have a number of role collections
but we don’t have anything for Web IDE for HANA.
So, what we need to do is add one: one for developer, one for administrator.
So, go to the bottom, hit the + sign I am going to add a new role collection, for
example, WEBIDE_DEVELOPER.
OK, with a description.
Hit create, and I am going to need to specify the roles that belong in there and for that
one I am going to go to the Roles tab and then hit + to add and I am going to look for
the template actually that started WebIDE and that’s the name and then the template,
you will see it has got WEBIDE_DEVELOPER already defined, application role.
So select everything basically ‘WebIDE developer’.
So that’s now done, I can save it
and I am also going to add one for the WebIDE Administrator.
So WEBIDE_ADMINISTRATOR, of course you can call it whatever you want,
and I am going to add the appropriate roles for that.
So in the Roles tab, I am going to add, and here, again, it is ‘webide’
we need to select it as the application name and in the template, there are two available,
and we choose the ‘WebIDE_Administrator’ and then the application role that belongs
with it as well, and save.
So, we have basically now setup a couple of roles that we can then use to assign to different
users in the system to give them either developer or admin rights on WebIDE for HANA.
So, let’s go back to the Home.
We can go to our User Management page and we can look at actually our own user XSA_ADMIN
and we can see the role collections that it has got.
So, we are missing WebIDE Administrator here.
We are going to want to do some administration.
So, what we can do is choose the ‘Add’ button and we can add role collections and
I am going to choose specifically WEBIDE_ADMINISTRATOR.
Hit OK, so that’s now done and we need to save that.
Now, whilst I am here, perhaps I want to make a developer user as well that can do development
with XSA.
So, I am going to add a new user and to do that I can use New.
Now, you don’t need to go into HANA studio or use SQL to create the users, there is something
great with SPS 0 of HANA 2, you can just create them directly here.
So, a new user.
So, maybe I call it XSA_DEV, but of course you can call it whatever you want, XSA, Developer,
xsadev@myorg.com, etc., etc., and give it a password.
Bear in mind that this initial password will by default need to be changed on the first
login.
So, we have created our XSA developer user.
Now let’s go and administrate it.
We need to set a role and specifically as well as this default user public role we want
to make sure that this user is allowed to do WebIDE development but not administration.
So we add that one.
But what we should also do is make sure he gets access to use the XS Controller.
So as a user, we also should select the XS_CONTROLLER_USER role.
So, we see those two have been added.
We need to go and save that.
OK, so we have now created our users.
We need to find somewhere that our XSA developer can actually do his development.
So for that, we can go to the Organisation and Space Management area.
Now, when HANA was installed and XS was installed, a default org will have been setup, in my
case the org was called ‘saphanaacademy’ .
You can have multiple orgs.
So you can create more orgs here, in fact, as you want but we can see that the orgname
I have got is ‘saphanaacademy’ and within that we have a couple of spaces: one called
SAP, which is where the SAP-provided apps including things like the WebIDE for HANA
and the Administrator that we are using right now belong, and there is one that was created
by default called PROD, maybe for productive use, but I want a space where we can do development.
You can create any number of spaces that you want within an organisation.
So, I am going to create a new space and I’ll call it DEV, but of course, you can call it
whatever you like, and within that new space I need to define who can use it and what roles
they have.
So, I’ll click on DEV and go to the Users area and I am going to add a couple of users.
In fact, we have got two in our system: XSA admin and developer.
So, I am going to add them both, and then in terms of the roles I am going to give them,
well for XSA Admin I am going to give him Manager, Auditor and Developer rights.
For the Developer user, just going to have Developer rights.
So I need to save that.
So now we have got a XSA developer user that is able to use this new developer space that
we have created.
Now all of this is possible using the command line but actually I think you will find it
is much easier with HANA 2 to do it through this XS Advanced Administrator application.
So, that’s now done.
We have created our users, we have created our space.
However, before we actually can go building things, within that space using Web IDE for HANA
we need to do one further bit of configuration and that is basically to enable the space
for development and to do that we need to use a special UI called the Space Provisioning UI
or the Space Enablement tool.
Now it is not on the menu here, what you need to do is go into the Application Monitor and
look for an application called di-space-enablement or space provisioning ui.
So let’s have a look down and there we got di-space-enablement-ui.
This is the app that you need to use and as the XS administrator we can use it as we just
have set ourselves up as an administrator for the development space.
So, you can go directly to it, just go the URL, it will tell you the URL, in this case
it is port 51027, but just click on it and it will open it up in a new tab.
So, we can see we now got the Space Enablement UI
The Development space exists, because we created it, but it is not enabled.
So, what we need to do is enable it by clicking the Enable button and then you need to wait
a few minutes for that enablement to take place.
But this is a very important step that you will need to do before you can meaningfully
work using WebIDE for HANA.
So, we can see that the status is now changed to enabled.
We got some nice messages further down.
So, the work has been done.
Basically, an application has been deployed into the developer space, which is the application
that is used by WebIDE for HANA when you actually want to build your own applications in that
space.
So, basically, everything is very neatly sandboxed between the different spaces and organisations
on your XS advanced system.
So, now we are good with that.
We can close that window.
What we now need to do is find WebIDE for HANA and for that you will need to look again
in the Application Monitor and here we can see that it is webide, that’s the name of
the app, and there is a URL, again if you want you can click on it, and it will open
it up.
Now in our case, it says Forbidden because we haven’t actually authorised the XS administrator
user to be a developer fully within this.
So you can see it is forbidden but you can see we have got the URL.
In fact, it is port 57305.
So, I am going to maybe bookmark that URL.
So, let’s go and bookmark it.
So, we got it for next time.
We can call it WebIDE4HANA and then the easy way, we could open a new incognito tab
or I could just close all of this, which will effectively log me out and come back into Chrome
and hit this and this time I am going to log in as my developer user, XSA_DEV, with the
password we specified.
Now the first time, as I mentioned, you are going to need to change it.
So, let’s do that.
So this is WebIDE for HANA.
You can see you get some tips and tricks the first time.
You can turn that off if you want or you can look at it or you can close.
So, I have just closed it.
Now if you wanted absolutely verify that the configuration has been done because quite
often it can be omitted to do the space enablement, for example, on your space.
What you can do is actually just build a very quick test application.
So, if I right-mouse button on my workspace, I can choose New, then Project from Template
and I am going to choose a Multi-Target Application Project.
Let’s give it a name.
Let’s call it test, for example.
OK.
Now, you should see at the bottom it is asking for a space and here you should be able to
select that space that you setup and configured.
So, DEV in our case.
So the space is set up.
Hit Next and hit Finish.
So, we are working within that space and then within test we want to maybe built a micro
app.
So we can start with something just like a simple Node.js Module.
It is a good one to test with.
We can call this one test.js, for example and we can enable XSJS support.
That is a detail for now, it is just a test app.
Hit Finish.
The important part having built that, we need to built it.
This is where we are able to see if the built actually works.
So, we can see that it actually worked: completed successfully.
So, we should be able to go ahead and actually start working with this.
So, we can actually choose the Run option.
So, for that let’s go to Run.
Run as: Node.js Application So, we can see the application is now running.
That’s in the console and if you want to open it we can just click on this, this is
the URL that was assigned, 51009 and it opens up our app, index.js, and we can see Hello
World.
So, we have been able to come in into WebIDE for HANA and actually built an application.
So our configuration is complete.
We have a got a user, XSA_DEV, that is able to go ahead and built applications in the
DEV space that we also just configured.
Thanks for watching.
You will find more videos and playlists on our YouTube channel.
Also, consider following us on Twitter or connect with us on LinkedIn.