From d56b305e808db48e79981907a8c08f7786a87572 Mon Sep 17 00:00:00 2001 From: Francois Beckers Date: Fri, 26 Jul 2019 14:59:43 +0200 Subject: [PATCH] minor changes --- TUTO_01.md | 59 +++++++++++++++++++++++++++--------------------------- TUTO_02.md | 36 ++++++++++++++++----------------- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/TUTO_01.md b/TUTO_01.md index e06a92c..384656f 100644 --- a/TUTO_01.md +++ b/TUTO_01.md @@ -6,15 +6,15 @@ This guide will describe how to create an account on HANA Trial website, install ### 1.1.1. Account creation -Create an account on this website : https://account.hanatrial.ondemand.com and choose Neo Trial to create an HANA 1 trial tenant. +Create an account on this website : [https://account.hanatrial.ondemand.com](https://account.hanatrial.ondemand.com) and choose Neo Trial to create an HANA 1 trial tenant. -![](pics/scp_01.png) +![scp](pics/scp_01.png) ### 1.1.2. HANA tenant creation Go to the "Databases & Schemas" area in the left menu. -![](pics/scp_02.png) +![scp](pics/scp_02.png) And create a new tenant (several minutes). @@ -23,7 +23,7 @@ I suggest to : - configure the SHINE User as it will install the SHINE Delivery Unit, which contains multiples examples of artifacts, views, and so on... - activate the DP Servert -![](pics/tenant_creation.png) +![tenant](pics/tenant_creation.png) ## 1.2. Development environment @@ -35,8 +35,8 @@ Even if theoricaly it's possible to only use the Worbench editor, I highly sugge You will need 2 files from SAP Download center (you must be logged on SAP website) : -- SAPCAR (SAR archive utility) to extract HANA Studio : https://launchpad.support.sap.com/#/softwarecenter/search/sapcar -- HANA Studio : https://launchpad.support.sap.com/#/softwarecenter/search/IMC_STUDIO2_224 +- SAPCAR (SAR archive utility) to extract HANA Studio : [https://launchpad.support.sap.com/#/softwarecenter/search/sapcar](https://launchpad.support.sap.com/#/softwarecenter/search/sapcar) +- HANA Studio : [https://launchpad.support.sap.com/#/softwarecenter/search/IMC_STUDIO2_224](https://launchpad.support.sap.com/#/softwarecenter/search/IMC_STUDIO2_224) Copy both file on your harddrive and use sapcar to extract HANA Studio @@ -48,11 +48,11 @@ Then, go inside the extracted directory `SAP_HANA_STUDIO` and the run the instal Use the default settings (see below) -![](pics/hdbinst_settings.png) +![hdbinst](pics/hdbinst_settings.png) Then, run HANA Studio and update it to the latest version. -![](pics/hana_studio_01.png) +![hana_studio](pics/hana_studio_01.png) #### 1.2.1.2. Install the SCP plugin @@ -64,15 +64,15 @@ Go in `Install new software...` and click on ADD button to add repositories. Add the following list : -- Hana Neon : https://tools.hana.ondemand.com/neon/ -- Hana Oxygen : https://tools.hana.ondemand.com/oxygen/ -- Hana Mars : https://tools.hana.ondemand.com/mars/ +- Hana Neon : [https://tools.hana.ondemand.com/neon/](https://tools.hana.ondemand.com/neon/) +- Hana Oxygen : [https://tools.hana.ondemand.com/oxygen/](https://tools.hana.ondemand.com/oxygen/) +- Hana Mars : [https://tools.hana.ondemand.com/mars/](https://tools.hana.ondemand.com/mars/) -![](pics/hana_studio_02.png) +![hana_studio](pics/hana_studio_02.png) And then, install the `SAP Cloud Platform Tools for Connecting to SAP HANA Systems` plugin. -![](pics/hana_studio_03.png) +![hana_studio](pics/hana_studio_03.png) #### 1.2.1.3. HANA Studio connection to SCP @@ -80,23 +80,23 @@ Now, we need to add the newly created tenant in HANA Studio. Click on `Add Cloud System` -![](pics/hana_studio_04.png) +![hana_studio](pics/hana_studio_04.png) Enter your Hana Trial Account credentials. -![](pics/hana_studio_05.png) +![hana_studio](pics/hana_studio_05.png) Select the tenant newly created and enter the tenant credentials entered in a previsous step. -![](pics/hana_studio_06.png) +![hana_studio](pics/hana_studio_06.png) The first time you will login, you will need to change the password. -![](pics/hana_studio_07.png) +![hana_studio](pics/hana_studio_07.png) When all the steps are done, you should see the tenant online (green bullet) in the left panel list. -![](pics/hana_studio_08.png) +![hana_studio](pics/hana_studio_08.png) You can repeat the same steps for the `SYSTEM` user, which is the only current user to have enough permissions to setup the initial landscape. @@ -106,20 +106,20 @@ HANA Studio is now installed, configured and connected, but we will also need th To access the Workbench editor, go back to the `Databases & Schemas area` -![](pics/scp_03.png) +![scp](pics/scp_03.png) Enter the tenant -![](pics/scp_04.png) +![scp](pics/scp_04.png) And then, you have access to the 4 tools : - Editor : to edit all kind of artifacts (calculation views, replication tasks, XSJS, ....) -- Catalog : the SQL/Runtime tool, to query and browser Schemas, tables, remote sources, ... +- Catalog : the SQL/Runtime tool, to query and browse Schemas, tables, remote sources, ... - Security : to manage Users and Roles - Trace : logs and traces -![](pics/workbench_01.png) +![workbench](pics/workbench_01.png) ## 1.3. Initial landscape @@ -131,33 +131,32 @@ You need to access the HANA Lifecyle Management to install the initial roles lan In HANA Studio, with the user `SYSTEM`, go to the security area and give the role `sap.hana.xs.lm.roles::Administrator` to your SHINE User newly created. -![](pics/security_halm_perm_01.png) +![halm](pics/security_halm_perm_01.png) Then, in SCP, go to the HANA Cockpit dashboard -![](pics/scp_04.png) +![scp](pics/scp_04.png) And then, go to the HANA Lifecycle Management -![](pics/cockpit_01.png) +![cockpit](pics/cockpit_01.png) And finaly, go to the Delivery Unit area -![](pics/HALM_01.png) +![halm](pics/HALM_01.png) Click on Import and import the Delivery Unit : `MYHANA_ROLES_Francois-B-Makoto.tgz` available here : [MYHANA_ROLES_Francois-B-Makoto.tgz](download/MYHANA_ROLES_Francois-B-Makoto.tgz) -![](pics/HALM_02.png) +![halm](pics/HALM_02.png) It should look like this after the import : -![](pics/HALM_03.png) +![halm](pics/HALM_03.png) The roles are now activated in HANA, so you can add the newly imported Admin Role `MyHANA.00Security.MyHANA_roles.roles.admin::MyHANA_roles_admin` to your SHINE User. To proceed, go to HANA Studio with the `SYSTEM` user in the security area -![](pics/security_halm_perm_02.png) +![halm](pics/security_halm_perm_02.png) You are now with the minimal landscape to begin any development on HANA :) - diff --git a/TUTO_02.md b/TUTO_02.md index dbb3c7b..bb6c001 100644 --- a/TUTO_02.md +++ b/TUTO_02.md @@ -16,7 +16,7 @@ Let's call it MyFirstPackage. Create a package named `MyFirstPackage` inside `MyHANA` -![](pics/myfirstpackage_apercu_01.png) +![apercu](pics/myfirstpackage_apercu_01.png) ### 1.1.2. Roles @@ -28,7 +28,7 @@ In this guide, we will always segregate roles in 3 categories : `admin`, `develo So let's create a specific package named `roles` inside `MyFirstPackage` -![](pics/myfirstpackage_apercu_02.png) +![apercu](pics/myfirstpackage_apercu_02.png) #### 1.1.2.2. Define the roles @@ -40,13 +40,13 @@ Create 3 files (in text mode) named inside the package `roles`: - `dev.hdbrole` - `user.hdbrole` -![](pics/myfirstpackage_apercu_03.png) +![apercu](pics/myfirstpackage_apercu_03.png) ##### 1.1.2.2.1. Admin role Copy/Paste this code to the file `admin.hdbrole` -``` +```js role MyHANA.MyFirstPackage.roles::admin { package MyHANA.MyFirstPackage: REPO.READ, REPO.ACTIVATE_NATIVE_OBJECTS, REPO.MAINTAIN_NATIVE_PACKAGES, REPO.ACTIVATE_IMPORTED_OBJECTS, REPO.MAINTAIN_IMPORTED_PACKAGES; @@ -57,7 +57,7 @@ package MyHANA.MyFirstPackage: REPO.READ, REPO.ACTIVATE_NATIVE_OBJECTS, REPO.MAI Copy/Paste this code to the file `dev.hdbrole` -``` +```js role MyHANA.MyFirstPackage.roles::dev { package MyHANA.MyFirstPackage: REPO.READ, REPO.EDIT_NATIVE_OBJECTS, REPO.ACTIVATE_NATIVE_OBJECTS, REPO.MAINTAIN_NATIVE_PACKAGES, REPO.EDIT_IMPORTED_OBJECTS, REPO.ACTIVATE_IMPORTED_OBJECTS, REPO.MAINTAIN_IMPORTED_PACKAGES; @@ -68,7 +68,7 @@ package MyHANA.MyFirstPackage: REPO.READ, REPO.EDIT_NATIVE_OBJECTS, REPO.ACTIVAT Copy/Paste this code to the file `user.hdbrole` -``` +```js role MyHANA.MyFirstPackage.roles::user { package MyHANA.MyFirstPackage: REPO.READ; @@ -81,7 +81,7 @@ The roles are now defined in HANA, but we still need to assign them to users. In HANA Studio, with the `SYSTEM` user, assign the role `MyHANA.MyFirstPackage.roles::admin` to your SHINE User. -![](pics/myfirstpackage_roles_01.png) +![roles](pics/myfirstpackage_roles_01.png) ## 1.2. Create schema @@ -93,7 +93,7 @@ First, we will create a specific package for all datasources related artifacts : So let's create a package named `datasources` in `MyFirstPackage` -![](pics/myfirstpackage_apercu_04.png) +![apercu](pics/myfirstpackage_apercu_04.png) ### 1.2.2. Schema creation @@ -101,11 +101,11 @@ We will now create a hdbschema artifact in order to create a schema in HANA. Create a new file named `myfirstschema.hdbschema` in `datasources` packages -![](pics/myfirstpackage_apercu_05.png) +![apercu](pics/myfirstpackage_apercu_05.png) And copy/paste this in this file -``` +```js schema_name="myfirstschema"; ``` @@ -115,7 +115,7 @@ We now need to add roles for the schema too. If you check on HANA Studio, you will notice you can't access the newly created schema. -![](pics/myfirstschema_schema_creation_01.png) +![schema](pics/myfirstschema_schema_creation_01.png) Again, we will follow the same structure, with 3 kind of users : `admin`, `developer` and `user` @@ -131,7 +131,7 @@ Create 3 files (in text mode) named inside the package `datasources`: Copy/Paste this code to the file `admin.hdbrole` -``` +```js role MyHANA.MyFirstPackage.datasources::admin { catalog schema "myfirstschema": SELECT, CREATE ANY, CREATE TEMPORARY TABLE, ALTER, DROP, EXECUTE, INSERT, UPDATE, DELETE, INDEX, TRIGGER, DEBUG, REFERENCES, SELECT METADATA, SELECT CDS METADATA; @@ -142,7 +142,7 @@ catalog schema "myfirstschema": SELECT, CREATE ANY, CREATE TEMPORARY TABLE, ALTE Copy/Paste this code to the file `dev.hdbrole` -``` +```js role MyHANA.MyFirstPackage.datasources::dev { catalog schema "myfirstschema": SELECT, CREATE ANY, CREATE TEMPORARY TABLE, ALTER, EXECUTE, INSERT, UPDATE, DELETE, INDEX, TRIGGER, DEBUG, REFERENCES, SELECT METADATA, SELECT CDS METADATA; @@ -153,7 +153,7 @@ catalog schema "myfirstschema": SELECT, CREATE ANY, CREATE TEMPORARY TABLE, ALTE Copy/Paste this code to the file `user.hdbrole` -``` +```js role MyHANA.MyFirstPackage.datasources::user { catalog schema "myfirstschema": SELECT, SELECT METADATA, SELECT CDS METADATA; @@ -174,7 +174,7 @@ In the package MyFirstPackage.roles, open the file `admin.hdbrole` And extend the role in the header like this : -``` +```js role MyHANA.MyFirstPackage.roles::admin extends role MyHANA.MyFirstPackage.datasources::admin { @@ -188,7 +188,7 @@ In the package MyFirstPackage.roles, open the file `dev.hdbrole` And extend the role in the header like this : -``` +```js role MyHANA.MyFirstPackage.roles::dev extends role MyHANA.MyFirstPackage.datasources::dev { @@ -202,7 +202,7 @@ In the package MyFirstPackage.roles, open the file `user.hdbrole` And extend the role in the header like this : -``` +```js role MyHANA.MyFirstPackage.roles::user extends role MyHANA.MyFirstPackage.datasources::user { @@ -218,4 +218,4 @@ Go back in HANA Studio with you SHINE User and refresh the catalog area. If everything is fine, you should see this : -![](pics/myfirstschema_schema_creation_02.png) +![schema](pics/myfirstschema_schema_creation_02.png)