Written by The Jahia Team
 
Developers
Sysadmins
   Estimated reading time:

Introduction

You'll find the necessary steps to have a Marketing Factory 1.10.1 running on a local instance. Please note that the following steps do NOT apply to Marketing Factory 1.10.0.

The steps below do not cover any advanced configuration, security recommendations, information about clustering, etc.. Please refer to the configuration and fine tuning guide to find such information. 

Installing the JDK

Installing and configuring Elasticsearch

The ElasticSearch prerequisite can be found at this link: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html

  1. Download ElasticSearch 5.6.3 
  2. Unzip to any folder
  3. Edit the file conf/elasticSearch.yml and modify property cluster.name in the to <defineYourClusterName> (i.e. cluster.name: myCluster)
  4. Start Elastic Search : 
    ./bin/elasticsearch

Installing Apache Unomi

  1. Download Apache Unomi 1.3.3
  2. Unzip to any folder
  3. Add a new  text file in the <unomi-install-folder>/etc folder: unomi.custom.system.properties and add the property org.apache.unomi.elasticsearch.cluster.name to <defineYourClusterName> (i.e org.apache.unomi.elasticsearch.cluster.name=myCluster )
  4. (Optional) Apache Unomi requires an IP database in order to resolve IP addresses to the user location. The GeoLite2 database can be downloaded from MaxMind here: http://dev.maxmind.com/geoip/geoip2/geolite2/
    Simply download the GeoLite2-City.mmdb file into the “etc” directory.
  5. (Optional) Apache Unomi includes a geocoding service based on the Geonames database that is used to create conditions on countries or cities.
    Get the “allCountries.zip” database from here: allCountries.zip Download it and put it in the “etc” directory, without unzipping it. Import can take about 15 minutes but will run in the background.
  6. Start Unomi using:
    ./bin/karaf
  7. On the first start, you'll need to execute the following command: 
     unomi:start
    and wait for startup to complete. This step won't be necessary on the next server startups, the Unomi bundles (packages) will start automatically.
  8. Try accessing https://localhost:9443/cxs/cluster with username karaf and password karaf . You might get a certificate warning in your browser, just accept it despite the warning, it is safe.
  9. You can try accessing https://localhost:9443/cxs to check the available Unomi services.

Enabling Marketing Factory modules

If your server doesn't have access to internet, please download the module from the following address: https://store.jahia.com/contents/modules-repository/packages/MarketingFactory.html  and deploy it to your DX server.

Follow the steps below if the server on which your Digital Experience Manager - Enterprise Distribution ONLY - is running can access the Internet :

  1. Go to the Module Management interface of a running Jahia Digital Experience Manager (Enterprise Distribution) instance
  2. Click on "Available modules" and type "Marketing" in the search box
  3. Select the "Enterprise Marketing Factory" Package and click on "Download"

Configuring Marketing Factory connections to Unomi

Once the Marketing Factory module is started, it will require a configuration file. You can either create a file from scratch or download this sample file

  1. Rename the file name to org.jahia.modules.marketingfactory.settings-global.cfg (replace "-sample" by "-global")
  2. Edit the following properties (or copy paste the text below):
    # Mandatory connection properties are:
    mf.unomiURL=https://localhost:9443
    mf.unomiPassword=karaf
    mf.unomiUsername=karaf
    
    # Optional properties and there default value:
    # Trust all certificate
    mf.unomiTrustAllCertificates=true
    
    # Use public addresses for admin
    mf.unomiUsePublicAddressesForAdmin=false
    
    # Unomi KEY
    mf.unomiKey=670c26d1cc413346c3b2fd9ce65dab41
    

    The configuration will be reloaded without restarting the DX server. 

  3. If you want to use the feature "personalization using geolocation by point", you'll need add a Google API key to  the parameter "mf.googleAPIKey".  If you don't have one, you can request it here: https://developers.google.com/maps/documentation/javascript/get-api-key.
  4. To verify that the connection is working:
    1. Go to DX => Edit Mode (on any site where Marketing Factory is enabled) => Site settings => Manage connection to Apache Unomi 
    2. Verify that the Apache Unomi Status: ONLINE
You can now use Marketing Factory.