Dev165.extending Sap Cloud Solutions.excercise.pdf

  • Uploaded by: Anonymous aCeye79n
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Dev165.extending Sap Cloud Solutions.excercise.pdf as PDF for free.

More details

  • Words: 3,851
  • Pages: 65
EXTENDING SAP CLOUD SOLUTIONS USING SAP HANA CLOUD PLATFORM DEV165 INITIAL SETUP In order to execute the exercises, you need to Log on to SAP HANA Cloud Platform Cockpit and configure the Trust settings of your trial account, update the SAP HANA Cloud Platform Eclipse plugins and update the SAP HANA Cloud Platform SDK. Explanation 1. Launch Google Chrome browser

2. Go to hcp.sap.com

3. Click on “Log On”

Screenshot

DEV165

3.1. Read and accept the Terms and Conditions

3.1.1.Login with your SAP ID user (typically looks like P12341516 or S15614135412)

3.1.2.In case everything went successfully – you should see a “Log Out” link accordingly

3.2. In case you don’t have an S or P-user – please follow the registration flow

2

DEV165 3.2.1.It’ll ask for typical user details

3.2.2.Once ready with all mandatory fields – please move on by clicking “Register”

3.2.3.The process takes few seconds and sends an email validation link to the provided email address.

3.2.4.Validation is mandatory – please perform that on your own. In case completed successfully – you’re gonna see this. Click “Continue” 4. Click on Launch HCP – this will open an additional tab with HCP Cockpit in there, focused at your trial account.

3

DEV165 4.1. In case you’re having a new account or you haven’t used your HCP free developer account for a while – you might be required to review the HCP ToS.

4.2. In case you haven’t claimed your free HCP developer account – you’ll go through that as well

5. You’ll going to see a popup with news and Announcements

5.1. Congratulations – you’ve made it to the HCP cockpit dashboard of your free developer account

6. We have to configure the account’s Trust settings.

4

DEV165

6.1. Click on Trust. In case you haven’t experimented with them – you should see them in the same state as the screenshot. This means – trusted IDP is SAP ID service. 6.2. Make sure you set “Principal Propagation” to Enabled

6.3. In case you have experimented with different trust settings, we kindly ask you to revert it back to default for the same of the exercise (Edit -> Default. Make sure to set “Principal Propagation” to Enabled -> Save)

7. Now, copy SAP HANA Cloud Platform SDK from \\students.fair.sap.corp\Student share\DEV165 and store it on the file system. For example -> D:\Files\Session\DEV165\ 8. Extract the archive on the file system. For example -> D:\Files\Session\DEV165\.

5

DEV165 9. Copy the “eit” folder from \\students.fair.sap.corp\Student share\DEV165 and store it on the local file system. For example -> D:\Files\Session\DEV165\ 10. Copy the “DeployArchivePreparePlugin.j ar” into Eclipse Folder/plugins

11. Now, let’s configure the Eclipse.

Open it and set a name for your workspace (f.e. D:\Files\Session\DEV165\WorkSp ace\Eclipse\Luna).

11.1. Add an User Library by opening Windows -> Preferences > Java -> Build Path -> User Libraries

6

DEV165

11.2.

Click on

button and set “Activiti Designer Extensions” for User library name and click OK.

11.3. Click on “Add External JARs…” and navigate to the location where you copied the eit folder. Select com.sap.core.ide.extensio ns.solution.installer.core1.0.0.jar and click Open.

12. Now, update the SAP HANA Cloud Platform Eclipse plugins

12.1. Click on Help -> Check for Updates

7

DEV165

12.2. Select only the SAP HANA Cloud Platform Tools for Java

12.3.

Click Next.

12.4. Finish the wizard by accepting the terms and conditions and pressing Finish button. Restart the Eclipse after the update completes.

8

DEV165

EXERCISE 1: DEPLOY YOUR FIRST SAMPLE SFSF EXTENSION APPLICATION ON SAP HANA CLOUD PLATFORM

Explanation

Screenshot

1. Open your Eclipse and open the Git Perspective: Windows -> Open Perspective > Other… Choose Git from the Open Perspective window

2. Click on Clone a Git repository

9

DEV165

3. Type https://github.com/SAP/cloudsfsf-benefits-ext.git in URI and click Next

4. Select Master and click on Next, set D:\Files\Session\DEV165\git\c loud-sfsf-benefits-ext for Directory and click Finish.

10

DEV165

5. In your JAVA EE Perspective , Click on FileImport  Maven -> Existing Maven Project

6. Browse and select the folder where you had cloned the Git Repository in step 4. and Click on Finish and wait for the project to load.

11

DEV165

7. Now you build the project:

7.1. Right Click on the Project and select Run As -> Maven Build

7.2. Enter Goals as clean install and Press Run

7.3. Ensure you get Build Success in the Console.

8. Deploy and start the application

12

DEV165

8.1. Right Click on the Project and Select Run As  Run on Server and select SAP  SAP HANA Cloud Platform.

8.2. Enter Landscape host as hanatrial.ondemand.com and press Next.

13

DEV165

8.3. Enter the Application name as benefits. Select Java EE 6 Web Profile for Runtime. Give your Account Name, User name and Password and click on Finish.

9. Open HCP Cockpit -> https://account.hanatrial.onde mand.com/account

10. Configure application’s connectivity to the public SuccessFactors API.

14

DEV165

10.1. Chose Destinations tab

10.2. Click on Import from File and Select sap_hcmcloud_core_od ata file from git\cloudsfsf-benefitsext\com.sap.hana.cloud. samples.benefits\resour ces. Remark: Update Your P Number and Password At the end click on Save

11. Open SAP Hana Cloud Portal. Click on Services, select SAP HANA CLOUD Portal and click on Go to Service. Remark First, you have to enable the SAP HANA Cloud Portal in case you have not done it yet.

15

DEV165

12. Publish the SAP Corporate Benefits site: Click on the Site’s Settings icon and select Publish and then confirm by clicking on Publish in the pop up window.

13. Access the application via the cloud portal site: Click on the Access published site link from the Publish Site pop up window

14. Click on About Me tile to see Nancy Nash profile.

16

DEV165

EXERCISE 2: ENHANCE THE SAMPLE SFSF EXTENSION APPLICATION TO CONSUME DATA FROM AN MDF OBJECT

Explanation

Screenshot

1. In Eclipse, open the Git Perspective, Right click on the cloud-sfsf-benefits-ext repo > Fetch from Upstream. As a result, additional branches will appear under cloud-sfsfbenefits-ext/Braches/Remote Tracking

2. Checkout and create new local branch from origin/HANACLOUD031.week_3: Right click on the branch and select Checkout. Select Checkout as New Local Branch button from the pop up window and click Finish on the next pop up window.

3. Now you build the project:

17

DEV165

3.1. Right Click on the Project and select Run As -> Maven Build

3.2. Enter Goals as clean install and Press Run

3.3. Ensure you get Build Success in the Console.

4. Deploy and Start the application

18

DEV165

4.1. Right Click on the Project and Select Run As  Run on Server and select your existing server and click Finish.

4.2. Confirm the overwrite and restart warning pop up

4.3. Open the Servers view if not already open and wait for the successful status

5. Open HCP Cockpit -> https://account.hanatrial.onde mand.com/cockpi/cockpit

6. Open SAP Hana Cloud Portal. Click on Services, select SAP HANA CLOUD Portal and click on Go to Service.

19

DEV165

7. Publish the SAP Corporate Benefits site: Click on the Site’s Settings icon and select Publish and then confirm by clicking on Publish in the pop up window.

8. Access the application via the cloud portal site: Click on the Access published site link from the Publish Site pop up window

20

DEV165

9. Click on About Me tile to see Nancy Nash profile. There is a new component for the benefits points entitlement. Those points are fetched from the SuccessFactors MDF object via OData API.

21

DEV165

EXERCISE 3: ENHANCE THE SAMPLE SFSF EXTENSION APPLICATION TO CONSUME FEED FROM SAP JAM Explanation

Screenshot

1. In Eclipse, open the Git Perspective, Checkout and create new local branch from origin/HANACLOUD031.week_4: Right click on the branch and select Checkout. Select Checkout as New Local Branch button from the pop up window and click Finish on the next pop up window.

2. Now you build the project:

2.1. Right Click on the Project and select Run As -> Maven Build

22

DEV165

2.2. Enter Goals as clean install and Press Run

2.3. Ensure you get Build Success in the Console.

3. Deploy and Start the application

23

DEV165

3.1. Right Click on the Project and Select Run As  Run on Server and select your existing server and click Finish.

3.2. Confirm the overwrite and restart warning pop up

3.3. Open the Servers view if not already open and wait for the successful status

4. Open HCP Cockpit -> https://account.hanatrial.onde mand.com/account

5. Configure custom Trust settings

24

DEV165

5.1. Go to Trust and click Edit button under Local Service Provider

5.2. Change Configuration Type to Custom and Principle Propagation to Enabled and Save Remark: Generate Key Pair in case there are none.

5.3. Confirm the Alert pop up

6. Open SAP Jam Navigate to Services and click on SAP Jam Then click on Go to Service

Remark: Enable Jam in case you have not done it yet

25

DEV165

7. Create a SAML IDP in SAP Jam

7.1. Open Admin page by clicking on the

button

26

DEV165

7.2. Click on SAML Trusted IDPs and then click on Register your identity provider

7.3. Set your SAP HCP account Local Provider Name (from Trust settings) as IDP ID

7.4. Copy your SAP HCP account certificate and paste it in X509 Certificate (Base64)* field

7.5. Select Users in my Company from the Allowed Assertion Scope drop-down list and click Register

7.6. As a result you would get the IDP ID created

8. Create an OAuth Client in SAP Jam

27

DEV165

8.1. In SAP Jam Admin view, select OAuth Client and click Add OAuth Client

8.2. Set “SAP HANA Cloud Platform” for Name field. Set https://hanatrial.ondema nd.com for the Integration URL field. And Save.

8.3. Click on View for the created OAuth Client

28

DEV165

8.4. Copy the Key value.

9. Configure connectivity to SAP Jam

9.1. Go back to the SAP HCP cockpit and click on Destinations tab

29

DEV165

9.2. Click on Import from File and Select sap_jam_odata file from git\cloud-sfsf-benefitsext\com.sap.hana.cloud. samples.benefits\resour ces

9.3. Paste the SAP Jam OAuth Client Key in the Client Key field and Save.

10. Switch back the SAP HCP account’s Trust settings to Default and Save.

11. Open SAP Hana Cloud Portal. Click on Services, select SAP HANA CLOUD Portal and click on Go to Service

30

DEV165

12. Publish the SAP Corporate Benefits site: Click on the Site’s Settings icon and select Publish and then confirm by clicking on Publish in the pop up window.

13. Access the application via the cloud portal site: Click on the Access published site link from the Publish Site pop up window

31

DEV165

14. Click on the Benefits Catalog tile

15. Put some comment for the Amazon Gift Vouchers For example type: “great vouchers!”, check the “Post to my profile wall” checkbox and click Share

16. The result would be that you’d see your comment below the comment widget. Please don’t close that browser tab!

32

DEV165

17. Now open SAP Jam Navigate to Services and click on SAP Jam Then click on Go to Service

18. Navigate to Home page Click on Home. As a result you’d see the comment you made in the SAP Corporate Benefits app

33

DEV165

19. Now click on the Like and type a comment. For example “indeed they are !” and click Post button.

20. Now go back to the Corporate Benefits portal site and refresh the page. You’d see the like and the comment you made in the SAP Jam

34

DEV165

EXERCISE 4: DEPLOYMENT OF THE SAMPLE EXTENSION APPLICATION IN A PRODUCTION-LIKE ENVIRONMENT ON SAP HANA CLOUD PLATFORM a) Onboard in DEV165 Sandbox HCP account In to install the SAP Corporate Benefits extension application in a real environment – you need access to the DEV165 sandbox environment. For that purpose you’ll use your own SAP ID account, which we’ll onboard to the sandbox account. You’ll have access to it throughout the time of the session. We’ll reset the account accordingly by the end of the day.

Explanation

Screenshot

1. Launch Google Chrome browser from the image desktop

2. Take a look at the screen that we beam. You’ll see a short URL and a QR-code. Both of them point to the onboarding process for the DEV165 sandbox environment account 3. Login as requested in order to access the process.

35

DEV165

4. Click on Next

5. Scroll the license to the bottom and confirm you’ve read it by checking the checkbox and click Finish

6. Congratulations! Now you have access to the DEV165 sandbox using your own SAP ID User.

b) Install SAP Corporate Benefits extension application in the DEV165 Sandbox HCP account

Disclaimer: The functionality used in this exercise is in experimental phase! In this exercise, you would install the SAP Corporate Benefits extension application. You would model the installation script and the run it in the DEV165 sandbox environment. Explanation

Screenshot

36

DEV165

1. In Eclipse, go to Project Explorer and expand the project to WebContent -> BenefitsSite.site.zip

2. Open the zip file and open the Details.json file

3. Search for “specXMLURL” and change "https:\/\/benefits{ACCOUNT_P LACEHOLDER}.{LANDSCAPE _PLACEHOLDER}\/com.sap.ha na.cloud.samples.benefits\/ben efits.spec.xml" to "https:\/\/benefits{ACCOUNT_PLACE HOLDER}.{LANDSCAPE_PLA CEHOLDER}\/com.sap.hana.cl oud.samples.benefits\/benefits. spec.xml". For example – "https:\/\/benefits12{ACCOUNT 37

DEV165

_PLACEHOLDER}.{LANDSCA PE_PLACEHOLDER}\/com.sap .hana.cloud.samples.benefits\/b enefits.spec.xml"

4. Save the Details.json file and close the BenefitsSite.site.zip file

5. Rename the application’s Administrator web role

5.1. Expand the Benefits project to WebContent -> WEB-INF and open web.xml for edit.

5.2. Click on the Source tab in the web.xml editor.

38

DEV165

5.3. Find the “Administrator” role, described in the <security constraint> tag and replace it with SAP Corporate Benefits Admin. You should change it on three places. See the screenshots. Save the web.xml

6. Rename the ADMINISTRATION_ROLE global variable value in the application source code.

6.1. In the Benefits project, navigate to Java Resources -> src -> com.sap.hana.cloud.sam ples.benefits.service package and open the ApplicationRoles.java file.

39

DEV165

6.2. Change the value of the public static final String ADMINISTRATOR_ROLE to " SAP Corporate Benefits Admin". Save the file. 7. Build the project. Right click on the project -> Run As -> Maven Build… -> type clean install for goals and click Run

8. Navigate to project/Java Resources/resources folder and open roles.json

40

DEV165

9. Edit the roleName by replacing the with your station number. For example set "roleName": "SAP Corporate Benefits Admin 12" 10. Save the file.

11. Navigate to project/Java Resources/resources folder and open tiles.json

12. Edit the name by replacing the with your station number. For example set "name": "SAP Corporate Benefits 12" 13. Edit the roles by replacing the with your station number. For example set "roles" : ["Benefits Tile 12"],

41

DEV165

14. Edit the title by replacing the with your station number. For example set "title": "SAP Corporate Benefits 12" 15. Save the file.

Now, you’d create and model the installation script.

16. In Eclipse, click on File -> New -> Other… and select Activity -> Activity Project and click Next

17. Set benefitsInstallation for Project name. For example – benefitsInstallation12 Click Finish.

42

DEV165

18. Click Yes on Open Associated Perspective pop-up.

19. Now right-click on the project benefitsInstallation and select New -> Other…, then select Activity > Activity Diagram and click Next.

43

DEV165

20. Expand benefitsInstallation to src/main/resources and select diagrams. Set benefitsInstallation for the File name. For example – benefitsInstallation12. Then click Finish.

21. In the Windows Explorer, locate the cloud-sfsf-benefits-ext folder in the git folder (this is the folder where you have cloned the benefits github repo). 21.1. Archive tiles.json and copy the archive. Navigate to \com.sap.hana.cloud.samp les.benefits\resources and archive the tiles.json, Name the archive tiles.zip. For example – tiles12.zip

44

DEV165

21.2. In Package Explorer in Eclipse, paste the tiles.zip in the /src/main/resources folder of benefitsInstallation project.

21.3. Repeat steps 19.1. and 19.2. this time for the roles.json file.

21.4. Copy and paste the com.sap.hana.cloud.sam ples.benefits.war In Windows Explorer, navigate to \com.sap.hana.cloud.samp les.benefits\target and copy com.sap.hana.cloud.sam ples.benefits.war. Paste it in Eclipse, in the /src/main/resources folder of benefitsInstallation project.

45

DEV165

22. In Palette, located in the most right of the screen, select Start event -> StartEvent and drag and drop it over the benefitsInstallation diagram.

23. Add Upload Roles task to the diagram

46

DEV165

23.1. Again, from Palette, select Extensions -> Upload Roles. Drag and drop it in the benefitsInstallation diagram

23.2. Hover the mouse over the StartEvent, select the arrow and connect it to the Upload Roles task.

47

DEV165

23.3. Click on the Upload Roles task and check the Asynchronous checkbox from the General tab in Properties view.

23.4. Now, click on Main config tab and set benefits for Application Name and roles for Roles File Name. Save the diagram.

24. Add Upload Home Page Tile task to the diagram

48

DEV165

24.1. Repeat steps 21.1. to 21.3. but this time for the Upload Home Page Tile task

24.2. Now, click on Main config tab and set benefits for Application Name and tiles for Home Page Tile File Name. Save the diagram.

49

DEV165

25. Add Deploy Java Application task to the diagram

25.1. Repeat steps 21.1. to 21.3. but this time for the Deploy Java Application task

25.2. Now, click on Main config tab and set benefits for Application; com.sap.hana.cloud.sam ples.benefits.war for WAR File Name; Java 7 for JVM Version; Java Web for Java Runtime. Save the diagram.

50

DEV165

26. Add Start Java Application task to the diagram

26.1. Repeat steps 21.1. to 21.3. but this time for the Start Java Application task

51

DEV165

26.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

27. Add Create HCMCLOUD Connection task to the diagram

27.1. Repeat steps 21.1. to 21.3. but this time for the Create HCMCLOUD Connection task

52

DEV165

27.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

28. Add Register Application Access task to the diagram

28.1. Repeat steps 21.1. to 21.3. but this time for the Register Application Access task

53

DEV165

28.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

29. Add Register HCMCLOUD Home Page Tile task to the diagram

29.1. Repeat steps 21.1. to 21.3. but this time for the Register HCMCLOUD Home Page Tile task

54

DEV165

29.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

30. Add Import HCMCLOUD Roles task to the diagram

30.1. Repeat steps 21.1. to 21.3. but this time for the Import HCMCLOUD Roles task

55

DEV165

30.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

31. Add Enable HCMCLOUD Role Provider task to the diagram

31.1. Repeat steps 21.1. to 21.3. but this time for the Enable HCMCLOUD Role Provider task

31.2. Now, click on Main config tab and set benefits for Application Name. Save the diagram.

56

DEV165

32. Add EndEvent to the diagram. In the Palette, select Start even -> EndEvent. Drag and drop it to the diagram.

32.1. Connect the Enable HCMCLOUD Role Provider to the EndEvent. Save the diagram.

57

DEV165

33. Pack the installation script and binaries. Mouse right-click on the benefitsInstallation and select Prepare deploy archive

34. As a result you should have a benefitsInstallation.zip file created under /deployment folder.

35. Run the installation procedure

58

DEV165

35.1. In Chrome, open the following URL: For TechEd Las Vegas -> https://eit.us1.hana.ondem and.com For TechEd Barcelona -> https://eit.hana.ondemand. com 35.2. In step 1 – Solution, click on Browse button and navigate to the benefitsInstallation.zip on the file system. Location should be: D:\Files\Session\DEV165\git\b enefitsInstallation12\deploym ent\ Click Next and wait until the Step 2 – User Input is loaded. 35.3. Enter DEV165 sandbox HCP account id in the Account ID field and click Finish.

59

DEV165

35.4. Verify the input and click Install

35.5. Wait until the installation completes. Meanwhile you can monitor the installation progress via the shown diagram.

60

DEV165

35.6. You should get a successful installation status.

36. Open DEV165 SuccessFactors sandbox environment in Internet Explorer.

The credentials for the sandbox environment could be found on the handout you got from the instructor. 37. Navigate to Home page, if you are not there. Click on Yes on the Security Warning pop-up window.

61

DEV165

38. Look for SAP Corporate Benefits 12 tile. This tile was created by the automatic installation of your extension application.

39. Now, assign the SAP Corporate Benefits Admin to your SuccessFactors user (provided in the handout by your instructor) 39.1. Go to Admin Center and click on Set User Permissions -> Manage Permission Roles

62

DEV165

39.2. Now locate the SAP Corporate Benefits Admin Permission Role and open it for edit by clicking on the Take action -> Edit at the most right of the screen.

39.3. In the Permissions Role Details window, click on Add… button.

39.4. In the Grant this role to… window, click on Select… button.

63

DEV165

39.5. Check the checkbox in front of the Extensions Administrators group and click Done.

39.6. In the Grant this role to… window, click on Done button.

39.7. Click on Save Changes button in Permission Role Detail widnow.

40. Now, log out by clicking on your user and selecting Log Out

41. Log on again and with your user and credentials from the handout you received from the instructor.

64

DEV165

42. You should see that there are 4 tiles in the SAP Corporate Benefits Admin tile.

© 2015 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

65

Related Documents

Cloud
June 2020 24
Cloud
November 2019 27
Storm Cloud
December 2019 20

More Documents from ""

Temporal Join.docx
November 2019 24
Fsc020.pdf
November 2019 17
1. Attribute View.docx
November 2019 17
4.bw4hana Documentation.docx
November 2019 17
Security Questions.docx
November 2019 8