Welcome to this series of hands-on tutorials from the SAP HANA Academy.
I'm Philip Mugglestone. In this series we're covering the SAP Business Technology Platform.
In this video tutorial we're going to get started with using SAP HANA Cloud.
We're going to see how you can create an SAP HANA Cloud instance.
We'll also see how you can use that both from the SAP BTP, Cloud Foundry and the SAP BTP, Kyma runtimes.
Now the first thing you'll need to do is make sure that you've got a sub-account in the right
region and with the right provider that's supported for SAP HANA Cloud.
Now if we go to the SAP Discovery Center we can search on hana in the Services menu and we can
find SAP HANA Cloud and from the Pricing section, for example for Pay-as-you-go, we can look at the
regions that are available. So basically these are the data centers where you can create an instance
of SAP HANA Cloud and I see that US East VA is one of them and that actually corresponds to the
sub-account I've already got. So that's where I'm going to create my instance of SAP HANA Cloud.
So let's select our sub-account. The first thing we'll need to do is make sure we've got the right
entitlements associated with this sub-account. So let's click on Entitlements and then Configure
Entitlements, Add Service Plans and then we'll search on hana and we've got SAP HANA Cloud here.
So we've got Tools. We'll need to select that. That's going to be our tooling effectively.
It's the SAP HANA Cloud Central application and also we'll want to actually create instances of
either regular SAP HANA Cloud in-memory database, maybe also relational data lake. Now there's the free
tier plan, also the paid tier plan. I'm going to choose hana-free for the main in-memory free.
I'm going to then also choose hana-cloud-connection-free and relational-data-lake-free.
What we'll also do is select the SAP HANA Schemas and HDI Containers and we'll choose the
hdi-shared and the schema service plans. That's how we'll be able to create schemas on our SAP HANA
Cloud instance or HDI containers for applications. So let's add those service plans and hit Save.
Once that's done, we can go to the Services and Instances and Subscriptions and we can
subscribe to SAP HANA Cloud Central. So basically the web-based tooling that will allow us to create
and manage our instances. So let's hit Create. Then we can search SAP HANA Cloud and the plan
we want here is the Tools plan. Notice it's a subscription, not an instance. And press Create.
So we can see we're now subscribed to the Tools plan of SAP HANA Cloud. Now before we try and use
it, we'll need to make sure we've got the right authorizations. So let's go to Security and Users
and then for whoever you want to have access to the application, I'll do it for myself.
We're going to go to the Role Collections and assign the Role Collection and it's the one
SAP HANA Cloud Administrator. So let's assign the Role Collection. Now we should be able to actually
launch the application. So let's go ahead and click on the link. So we're now in SAP HANA Cloud Central.
So we've got an environment where we can create and manage our SAP HANA Cloud instances. So we're
going to create a new instance and you've got a choice of what it is you want to do. Do you want
to create a regular database? Do you want to create an instance of the data lake, etc?
I'm going to give a name for my instance. In this case, I'm just going to do a regular in-memory
database. I'll call it hana and then I'll need to set an administrator, user, and password. Now the
user defaults to DBADMIN. The administrator password you would need to set. Once we've done that, we can
go to the next step. So here we can set some of the sizing of our instance. As I'm using the free
tier here, I can't really change that. These figures are set for the free tier, but when it's a paid
instance, you can actually bump up these numbers. So let's go to next step. This is where you can set
up availability zones and replicas. However, that's not something I can do in the free tier.
Next step. Now we can do some more advanced settings. There are different options that are
available depending on whether you're using the free tier or not. You can, for example, set the
allow list. From where can you access this SAP HANA Cloud instance? You can also potentially set up
instance mapping. We're going to cover that later. So we'll just go to next step. If you want, you can
choose to create a data lake. Why not? Let's create our data lake and you can give that a name as well.
We'll call that one hana-lake. And notice that it's going to create an administrator for that called
HDLADMIN. It'll have the same password that you set for DBADMIN on the previous screen. Now we can
go to next step. We can configure the data lake relational engine. However, with the free tier,
actually we can't change. It's fixed. But with the paid tier, you can do that. Hit next step. We can
choose connections for the data lake. Again, we'll go with just SAP BTP IP addresses. And finally, we can
review and create. So we can see a full list of the configuration settings we've made. We can review
that. And when we're ready, we can press create instance. Whilst it's doing that, just notice
that you do have an option to copy the configuration. So if you choose that,
you'll get your settings you've basically made, but in JSON format. And this can be very useful
because it's also possible to create and manage your instances using the SAP BTP command line interface.
Now there's another video tutorial on the SAP BTP CLI elsewhere in this onboarding series, but this is
the set of parameters that you would need to send when you want to create or manage an SAP HANA Cloud
instance. Now it'll take a few minutes to actually create those instances. You may need to come here
and refresh to see the latest updates. So we can see that the SAP HANA Cloud in-memory instance is now up
and running. It's still creating the data lake. Now one thing to notice is that the runtime
environment has been set to Other, and that's what we would expect to see here. If we actually go to
our sub account and we just refresh so we can see our instances and subscriptions, we can see that
we've got an instance of SAP HANA Cloud here. We've also got the data lake and the connection
between the two still being created. But we've also got a couple of environments. We've got
Cloud Foundry and we've got the Kyma environment or runtime. Typically when you're working with
SAP HANA Cloud, if you want to deploy an application to SAP BTP, then you're probably going to want to
access SAP HANA Cloud from one of these runtimes. So let's have a look at how you might go about
doing that. Now what you need to do is to make sure you're in the SAP HANA Cloud Central. And
then for example for your main SAP HANA Cloud instance, you've got actions and you have manage configuration
and we can edit. And then if we go to the tabs, we'll see there's one called instance mapping.
And this is where we can create mappings, effectively create a connection between the
SAP HANA Cloud instance and the specific runtime instance. So we can add a mapping. Now the
mappings can be to either SAP BTP, Cloud Foundry runtime or to the SAP BTP, Kyma runtime. So for example for Cloud Foundry,
we need to specify the Cloud Foundry Organization ID and optionally the Space ID. If you don't put
Space ID in, it will be all spaces within an Organization. So to find the organization,
we go to our overview for our sub account where we can see the SAP BTP, Cloud Foundry environment details.
And here we can see we've got the org ID. So I'm going to copy and paste that value in.
So I've now basically created a mapping for all spaces in this Cloud Foundry organization.
What I also might want to do is to map it to my SAP BTP, Kyma runtime. Now here we're going to need
to specify the cluster ID of your SAP BTP, Kyma runtime and also the namespace. Otherwise it could be
for all namespaces. So for that one, what we'll need to do actually is to go to our Kyma console.
So let's link to the dashboard. And then we're going to need to look in a specific
namespace. Now the namespace is actually the kyma-system. Now it's not shown by default.
What you need to do is go to the top right to your user, choose preferences, and then within the
cluster section, choose show hidden namespaces. If we do that, suddenly a number of different
namespaces appear. Now the one we want to look at is kyma-system. You can see it's down here.
Let's select it. And then within there, we'll go to configuration and config maps. Now there are
quite a few of them here. What we want to do basically is search on SAP BTP. And the one we're
interested in is sap-btp-operator-config. And there, if we actually look, we will find the
CLUSTER_ID. This is the value we need. So let's actually select that and copy it. And we will then
paste that into SAP HANA Cloud Central as our Cluster ID here. And of course you can put in a
namespace if you want. Otherwise it will be for all namespaces. I'll go with all namespaces.
Now we hit save and those mappings will be configured. Now let's just go back to our
list of instances. So why don't we see how we can actually create an HDI container? For example,
when we're working with the SAP BTP, Cloud Foundry runtime. So let's go to our cockpit and what we can do is
go to our instances and subscriptions. And what we want to do is to create an HDI Container instance.
So we can do that via the cockpit. Of course you can do this from your application. You can also
do it using the command line interface, for example, the Cloud Foundry CLI. So I'm going to
choose the service of SAP HANA Schemas and HDI Containers. I'm going to use the plan hdi-shared
for an HDI container. Of course you could create a schema if you wanted as well. And then you choose
the runtime environment where you want to put that. I'm going to put it into Cloud Foundry and
into my dev space and I'll give it a name. So I'll call this maybe hdi1 and then I can hit create.
And you can see it's now creating as an HDI Container in the dev space of our Cloud Foundry
runtime. So we can see that the HDI Container has now been created. And of course, in order to use
it, we'd need to have some kind of service binding. We need to get the credentials. So to do that,
we can create a service key, give it whatever name you want and hit create. And now we can go ahead
and view or download the credentials to actually access that. So we've got the user ID and passwords
of the technical users that you use when you're working with an HDI Container. You can also see
the underlying schema name, et cetera. So that's how we work with SAP BTP, Cloud Foundry runtime. If we want
to do the same, but from the Kyma environment, then we can do that very simply. We can go back
to our Kyma dashboard. Let's go to our namespaces. Maybe I want to do something within the default
namespace or I'll maybe create a namespace for my project. I'll call it dev. And then I'm going to
go to the option service management. And here we can see the different SAP BTP service instances.
So at this point I can create a service instance. So I can give that a name. Again, I can call that,
for example, hdi1. So the offering name is going to be hana. And the plan name here is going
to be hdi-shared. So let's hit create. So you can see that that now has been provisioned. And of
course we're going to need to have a service binding so we can get the credentials and access
it. So we'll create a SAP BTP service binding. I will need to select which service instance,
well it's HDI one and hit create. And that's now been provisioned. Now actually to see the
credentials, what you need to do is to look at the secret that's been associated. The secret's
been created with the same name. And if we look at the secret, now if we decode it, we've got the
technical users and passwords, we've got the schema, et cetera. We've got the URL to access,
whatever you might need to work with. And if we go back to our overall dashboard and we just refresh
it here, you'll see in our list of instances that we've got the HDI container, this time for the
SAP BTP, Kyma runtime environment. And we can see how it's being managed. But notice you can't do anything
with it here in the SAP BTP cockpit. So you need to manage your HDI containers exclusively from the
SAP BTP, Kyma runtime. You can't come in and delete them or create them here. Whereas when you're working
with Cloud Foundry, yes, you do that basically using the SAP BTP cockpit. So in this video tutorial,
we've seen how you can get started with SAP HANA Cloud. We've seen how you can access the
entitlements and configure that for your subaccount. We've seen how you can work with the tools. So
subscribe to SAP HANA Cloud Central. We've seen that UI, which has allowed us to actually go ahead
to create and configure, manage our SAP HANA Cloud instances. We can also see that there are other
options here I didn't previously mention. You can start and stop your instance. You can access the
cockpit. You can access the Database Explorer or the SQL Console, et cetera. What we also saw was
how you can do the mapping to either SAP BTP, Cloud Foundry or SAP BTP, Kyma runtimes. And we've seen how you can
create your HDI Containers or potentially your schemas in the SAP BTP cockpit when you're working
with an HDI Container for the SAP BTP, Cloud Foundry runtime. And we did that using the dashboard
for Kyma for when we want to manage HDI Containers or Schemas from the SAP BTP, Kyma runtime. You can find
more video tutorials on our YouTube channel. If you'd like to be informed as soon as new
video tutorials are published, then please subscribe. Thanks for watching.