Run Datahub locally


Run Datahub locally is a multistep process.


1.1    Requirements

  1. SAP Hybris v6
  2. JDK Java SE 8 or above
  3. Apache Tomcat
  4. Postman or Insomnia
  5. Checkout code
  6. In the /parent location run "mvn clean install"
  7. Put the "datahub-webapp.war" from project 
    /datahub-overlay/target/datahub-webapp.war into the deploy folder of Tomcat at /apache-tomcat-7.0.70-04/webapps
  8. Make sure the local.properties file is accurate. In particular the database connection needs to have your local schema. See "Using mySQL" below

1.2      Run datahub

1.     Go to applications/tomcat/bin and run the startup.sh

1.3      Using mySQL

Steps for setting up MySQL for local operation.
1.     Download and install MySQL and MySQL Workbench
2.     Make sure MySQL server is running
3.     In Workbench open running instance
4.     Create a new Schema
5.     Make sure the user you are going to use has access and rights to everything.
6.     Go to local.properties file in project and add properties (where this one says “datahub” put the schema name you have created). And comment out any other datasources.
# MySQL

dataSource.className=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
dataSource.jdbcUrl=jdbc:mysql://localhost:3306/datahub?useConfigs=maxPerformance
dataSource.username=root
dataSource.password=root

7.     Change the inbound directory paths in the local.properties file. You will have to create the directories. You can see this example. I created these directories.
incoming.dir=/Users/elineback/hyb/file/incoming
error.dir=/Users/elineback/hyb/file/error
archive.dir=/Users/elineback/hyb/file/archive
processing.dir=/Users/elineback/hyb/file/processing

8.     You will need mysql-connector-java-{version}-bin.jar in your classpath. I put it in /Library/Java/Extensions  and also in the running tomcat lib directory.

Once its running, need to connect hybris to datahub.
1.     Go to https://localhost:9002/hmc
2.     Expand SAP Integration. Click SAP Administration
3.     Click Save. This is to initialize.
4.     Click Start Upload. A popup window will appear saying Initial load succeeded.
5.    

6.     Go to SAP Global Configuration section
7.     Right click the gray area in the table and select Create mapping to sales area catalog
8.     Enter the information on this image.




Comments

Popular Posts