
I have worked on this blog with my colleague chandnigideon13
Introduction:
In this blog post, I am going to share some insights on basic steps for Datahub Upgrade and Datahub Migration to set the repository in accordance with CCV2
The reader is expected to know the datahub fundamentals & processes.
Datahub Upgrade
Pre-requisites for Local Setup
Refer link for the compatibility matrix on the integration pack
Code Adaptations
Below are some of the sample jars that need to be replaced with the upgraded version.
datahub-extension-archetype-X.jar
datahub-extension-archetype-Y.jar [Picked from CXDATAHUB-YY]
datahub-extension-sdk-X.jar
datahub-extension-sdk- Y.jar [Picked from CXDATAHUB-YY]
datahub-webapp- X.war
datahub-webapp- Y [Picked from CXDATAHUB-YY]
party-canonical- X.jar
party-canonical- YY.jar [Picked from CXDHBINTPK-YY]
product-canonical- X.jar
product-canonical- YY.jar [Picked from CXDHBINTPK-YY]
sapcoreconfiguration- X.jar
sapcoreconfiguration- YY.jar [Picked from CXDHBINTPK-YY]
POM Changes
Under pom.xml, update the versions of the properties as mentioned below.
<archetype.version>X</archetype.version>
<archetype.version> Y </archetype.version>
<datahub.extension.sdk.version>X</datahub.extension.sdk.version>
<datahub.extension.sdk.version>Y<datahub.extension.sdk.version>
<datahub.webapp.version>X</datahub.webapp.version>
<datahub.webapp.version>Y</datahub.webapp.version>
<sap.integration.version>X</sap.integration.version>
<sap.integration.version>YY</sap.integration.version> [Picked from CXDHBINTPK-YY]
<properties>
<archetype.version>Y</archetype.version>
<datahub.extension.sdk.version>Y</datahub.extension.sdk.version>
<datahub.webapp.version>Y</datahub.webapp.version>
<sap.integration.version>YY</sap.integration.version>
</properties>
Note: The pom.xml should be updated with the upgraded version of the artifacts. Issues in the configuration could lead to datahub build failure complaining on Missing artifacts.
Also, if there are version upgrades for Java, Spring or Tomcat, those are also required to be updated in pom.xml
Add javax.xml.bind dependency if the java version is upgraded to java 11 as this is not present.
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
Once, the above changes are done, follow the below links to check if there are any release specific upgrade steps related to the versions.
When upgrade is complete execute the following commands for validation in local
mvn validate
mvn clean
Create a DatahubInstance for the DataHub backoffice server configuration as below
INSERT_UPDATE DataHubInstanceModel;instanceName[unique=true];InstanceLocation
; localhost;https://localhost:8443/datahub-webapp/v1 ;
The same has to be replaced with the https://datahub:8080/datahub-webapp/v1 for CCV2.
On successful execution of the above steps, the datahub should be up and running and you can access
http://localhost:8080/datahub-webapp/v1/data-feeds/
Datahub Migration
Pre-requisite
Repository setup
The new structure of the datahub will contain the datahub directory with customisation of datahub and manifest.json (${ROOT_DIR}/datahub/manifest.json).
The datahub folder comprises of the following:
manifest.json
{
"datahub_version" : "current datahub version",
"extensionPacks": [
{
"name": "hybris-datahub-integration-suite",
"version": "current datahub integration pack version"
}
],
"extensions" : [
"sapcoreconfiguration",
"sapidocintegration",
"sapidocoutboundadapter",
"party-canonical",
"product-canonical",
"sapcustomer-raw",
"sapcustomer-canonical",
"sapcustomer-target",
"saporder-raw",
....
]
}
datahub/config directory
The file format should be datahub-environment-<environment code>.conf as shown in the screenshot below and configuration common to all the environments will be in the file datahub-environment.conf
Note: The property values having URL, filepath, String should be enclosed in double quotes.
Custom Extension
Move the custom extension configuration to the folder that you created in ${ROOT_DIR}/datahub as in the old datahub structure.
In the pom.xml file specify scope as system in each Maven dependency, provide systemPath attribute pointing to the jar file and commit the jar files into the Git repository.
<dependency>
<groupId>com.hybris.datahub</groupId>
<artifactId>sapidocoutboundadapter</artifactId>
<scope>system</scope>
<systemPath>${basedir}/../ext/sapidocoutboundadapter-<current_version>.jar</systemPath>
</dependency>
Example
The format for the system path section of the code is <systemPath>${basedir}/.. /jar_filename</systemPath>.
Note: If the path specified is incorrect the missing artifact error is shown up during the build.
Configuration Details for Datahub
datahub.security.basic.admin.user=<adminuser>
datahub.security.basic.admin.password=<adminpassword>
datahub.security.basic.read_only.user=<rouser>
datahub.security.basic.read_only.password=<ropassword>
Note: The username for datahub.security.basic.admin.user and datahub.security.basic.read_only.user should be different which might otherwise lead to deployment failure with error Cannot resolve reference to bean 'userDetailsService' while setting bean property
datahubadapter.datahuboutbound.user=<adminuser>
datahubadapter.datahuboutbound.password=<adminpassword>
datahubadapter.datahuboutbound.url=https://<env-specific> /datahub-webapp/v1
create-drop will drop & create new schema each time you start the server hence it is usually set on the first start of datahub
ignore will ignore the init with every start of the server
create will create a schema if none exists.
datahub.server.url= http://datahub:8080/datahub-webapp/v1
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
Validation of the Datahub Configuration:
A GET to https://<environment-specific>/datahub-webapp/v1/status endpoint to validate the username/password from ‘datahub.security.basic.admin.user’ and ‘datahub.security.basic.admin.password’.
Datahub cockpit in the Backoffice
Atleast a single Datahub server needs to be configured to see the datahub perspective.
Datahub dashboard provide the status of raw, canonical & published items.
Setup in commerce
The manifest in the commerce should have the datahubadapter contextpath enabled for the Backoffice aspect.
"aspects": [
{
"name": "backoffice",
"properties": [
],
"webapps": [
{
"name": "datahubadapter",
"contextPath": "/datahubadapter"
}
...
]
}]
Datahub Settings
Set the below four properties if other than default(admin/nimda),it should match to datahub security user
datahub.backoffice.rest.client.password.admin=<adminpassword>
datahub.backoffice.rest.client.username.admin= <adminuser>
datahubadapter.datahuboutbound.password=<adminpassword>
datahubadapter.datahuboutbound.user=<adminuser>
Note:
We do not migrate the datahub database as only transient data is stored in the database.
Issues & Resolution
This could be due to configuration issues in commerce for the datahubadapter.
References:
https://help.sap.com/doc/b468c7d3110f4dffad5ad2ffc32c55a7/6.5.0.0/en-US/DataHubAPI/index.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |