SAP Hybris suite , Hybris tutorial, Java, J2ee Stuff Online-

0
Datahub Integration with SAP Hybris | Step By Step to Configure DataHub with Hybris

Open 1 Answers 2843 Views

Hello Friends,

Today i choose very important topic to discuss which is Datahub Integartion with Hybris which is below

  • Download and installation of standalone Data Hub
  • Installation of the Data Hub on Tomcat Server
  • Basic configuration of the Data Hub to work with the MYSQL, Oracle, HANA and MSSQL databases
  • Installation of Data Hub security
  • Installation of Data Hub Adapter on a hybris platform
  • Web Services invocations with example data, which are being imported into the hybris Commerce Platform.

Pre requisites

  • Servlet Container Suggested
  • Apache tomcat v7.0
  • Oracle WebLogic
  • One of the Supported Database servers: MYSQL server(5.5 or higher), Oracle(11g or 12c), HANA (SPS07-R74), MSSQL(2012 & 2014), Java(8 & 7), hybris Commerce Suite.

Quick Data Hub Standalone Installation

  1. Congiure tomcat for use with the Data Hub. This involves setting up the JVM parameters. The easiest way to do this is to create a Tomcat startup script that sets the CATALINA_OPTS parameters. Typical parameters for a UNIX system are “Xms2048m -Xmx4096m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+AlwaysPreTouch -XX:+DisableExplicitGC”
  2. Copy the Data Hub webapp war file from %hybris-home%/hybris/bin/ext-integration/datahub to the Tomcat webapps directory and start Tomcat. Stop Tomcat
  3. Select the relational database you are going to use with Data Hub and configure Data Hub for it.By default, when the datahub-webapp.war file is deployed, the application is configured to use the HSQL database. However, HSQL is not a supported database for production deployments.

    By default, the Data Hub relies on a database instance with the name of ‘integration’ with an administrative user named ‘hybris’ with the password ‘hybris’. The database needs to be created by the administrative user (‘root’) logging into the system. The ‘hybris’ user needs DBA rights and full schema privileges to the ‘integration’ database instance. You can use the following SQL statements to recreate this database between Data Hub runs to refresh the Data Hub database.

    drop database integration;

    create database integration;

    By default, the kernel.autoInitMode is set to create-drop. If you are in a production environment, hybris recommends the kernel.autoInitMode property be set toupdateinstead.

    You need to configure your local.properties file for the appropriate database. To find the correct parameters for your database, see the associated database link to the right.

  4. Very important – Review the entire Required Performance Configuration for Data Hub document that matches your Data Hub version.
  5. Set up the Data Hub encryption configuration.The Data Hub comes with some built-in encryption capabilities for attributes that you wish to keep secure in the data store. Some basic configuration is needed before you can use these features. By going through the following steps, you can configure the Data Hub to use encryption for secure attributes:
    1. Generate an encryption key
      1. If you have openssl installed on your computer, you can issue the commandopenssl enc -aes-128-cbc -k secret -P -md sha1 from the command line.
    2. Store the key in a file on the Tomcat classpath or file system and set the datahub.encryption.key.path property in the local.properties file
      1. datahub.encryption.key.path=path/to/encryption-key.txt
    3.  
      1. If you are going to use the Data Hub with the hybris Commerce Suite, you must configure the Data Hub Adapter.
      2. The Data Hub Adapter is a Core Platform extension that links the hybris platform to the Data Hub.The Data Hub Adapter extension is found in the %hybrishome%/hybris/bin/ext-integration directory. You must specify it as one of the extensions in the %hybris%/hybris/config/localextensions.xml file.
        <extensions>
        
          <!-- ext-datahub -->
        
          <extension dir="${HYBRIS_BIN_DIR}/ext-integration/datahubadapter"/>      
        
        </extensions>

        You also need to update the local.properties file with the following:

        datahub.extension.exportURL=http://localhost:9001/datahubadapter
        
        datahub.extension.userName=admin
        
        datahub.extension.password=nimda

        Start Tomcat.

        Using a REST browser tool such as Postman, issue the following command:

        GET - http://localhost:8080/datahub-webapp/v1/data-feeds/DEFAULT_FEED/

        You should get a 200 Success message in response, which shows the Data Hub is running properly.

         

1 Answer

0

Continue

Tasks:

  1. Go to the Pre-installation Kits folder and unarchive the eclipse kits “eclipse-jee-luna-R-win32-x86_64.zip to the same folder
  2. Go to the installation kits tomcat and unarchive the Apache Tomcat Kit to the same folder
  3. Go to the hybris home folder to the path “${HYBRIS_HOME}/bin/ext-integration/datahub/web-app” and copy the datahub-webapp-5.5.0.0-RC9.war todatahub-webapp.war, in the same location.
  4. Run eclipse.exe and select the folder D:\workspace
  5. Then Eclipse->Servers View, define new server Apache Tomcat v7.0 by selecing the installation location of Tomcat 7 to the one extracted above.
  6. Modify the following properties of the new Server instance defined at step4, by double clicking it in the Eclipse->Servers view.
    1. Timeouts section: Start=600, Stop=60
    2. Ports section: AJP/1.3=8010->we need to modify this value in order not to conflict with the default AJP port 8009 of the hybris platform server.
  7. In Eclipse->Project Explorer view, right click and select Import ->WAR file. Select “$/{HYBRIS_HOME}/bin/ext-integration/datahub/extensions/sap” and “${HYBRIS_HOME}/bin/ext-integration/datahub/extensions/hybris to Eclipse Project “datahub-webapp” in the path “/WebContent/WEB-INF/lib” directly in Eclipse
  8. Copy the SAP Data Hub extensions from “${HYBRIS_HOME}/bin/ext-integration/datahub/extensions/sap” and “${HYBRIS_HOME}/bin/ext-integration/datahub/extensions/hybris” to Eclipse project “datahub-webapp” in the path “/WebContent/WEB-INF/lib” directly in Eclipse
  9. Copy the database driver sqljdbc-4.0.2206.100.jar from “$/{HYBRIS_HOME}/bin/platform/lib/dbdriver” to Eclipse project “datahub-webapp” in the path “/WebContent/WEB-INF/lib” directly in Eclipse
  10. Open a cmd and run this command: openssl enc -aes-128-cbc -k secret -P -md sha1. Copy only the value of the key property(without the key property word), into “D:/train-01/encriptionkey.txt” file(create the path and file if needed).
  11. Replace the content of the data hub cofiguration files from datahub-webapp/src folder directly in Eclipse
    1. local.properties
    2. logback.xml
  12. With the content of the following files from the course configurations folder “D:\installationkits\hybris comm 5.5\course_configurations\sap_integration\datahub_config”
    1. local.properties
    2. logback.xml
  13. Edit the local.properties file that you just copied and the location to the encriptionkey.txtfile: datahub.encryption.key.path=D://train-o1/encriptionkey.txt
  14. Publish data hub application in Tomcat Server by right-clicking on the server instance defined at step4 and select “Add and Remove…” Then select the datahub-webapp and start the Tomcat Server.
  15. Run a RESTful GET call to verify your installation is active by typing the following address in the Address Bar of an Internet Explorer window: “http://localhost:8080/datahub-webapp/v1/data-feeds/DEFAULT_FEED/pools&#8221;.

You would expect to get back a HTTP Response value of 200 OK. and the default Global pool:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>

<poolDatas>

<poolData>

<poolld>0</poolld>

</poolData>

</poolData>

 

Click Below link to Image of all Steps

http://everyreply.blogspot.in/2016/08/datahub-integration-with-hybris-datahub.html

answered Aug 29, 2016 by ermanoj (1,240 points)

...