5 Set Up Replication

Now that you have set up your LS Central scheduler instance and downloaded the LS Insight product package, you need to set LS Central up to control the replication. The web service setup will point to the web service you just set up in your LS Central in-cloud, but the jobs and distribution locations will be set up in this on-premises instance of LS Central.

Note: If you have set up web service for more than one company in LS Central in-cloud, you must also have more than one company on the Scheduler server. You can just copy the company that exists in LS Central. The names of the companies on the Scheduler server do not matter, but it is good practice to make them the same as in the cloud.

Web service setup on Scheduler

Once you have set up the LS Central instance on-premises on the same machine where the Data Director is running, you need to set up the web service setup to match the cloud instance web service.

As with the cloud setup, follow these steps and duplicate the setup you did in your cloud LS Central:

  1. Navigate to the Web Service Setup page in LS Central on the Scheduler server.
  2. In the General FastTab, turn on the Web Service is Active check box.
  3. In the Server FastTab, paste the web service URI you copied from RetailWebServices to the Web Service URI field.
  4. In the Client credentials FastTab:
    1. Turn on the Override Client Credentials check box.
    2. Add the user name and web service access key that you copied from the User Card to the appropriate fields.
    3. Navigate to a different field to save your changes.

Publish and subscribe to Web services

  1. Navigate to the Web Requests page in LS Central.
  2. Check that the Base URL matches the one you set up in the Web Service Setup (here the URL ends with the Company name). 
  3. Click the Publisher action. This will publish all web services (everything is cleared from the web request list) 
  4. Click the Subscriber action. This will subscribe to all web services (everything reappears in the web request list with the correct URL). 

Distribution location setup

Next, you need to set up the distribution locations for LS Central in cloud and LS Insight in Azure.

LS Central in cloud distribution location

  1. Navigate to the Distribution Location List in LS Central on the Scheduler server.
  2. Click the New action to create a new distribution location .
  3. In the General FastTab, enter these values:
    • Code: LSCCLOUD
      A confirmation message appears, click Yes.
    • Description: LS Central in cloud.

    Leave other fields blank or unchanged.

  4. In the Data Director FastTab, enter these values:
    • Data Director mode: TCP
    • Distribution Server: Computer name of the machine where Data Director is running.

      Tip: You can find this name by pressing the Windows key + Pause/Break on this machine, or by opening the Configuration tool. The name is the Host name displayed to the left.

    Leave other fields blank or unchanged.

  5. In the WS Distribution Server FastTab:
    • Distribution Server URL: http://<DistributionServer>/DDWebservice

    Leave other fields blank or unchanged.

  6. In the Replication FastTab: 
    • Version: WS

      If this version does not exist in the list, you need to create it:

      1. Click the icon, enter Dist. Location Versions, and select the relevant link.
      2. Click the New action.
      3. ID: WS, Description: Web Service, Plugin ID: lsws
    • Driver Type: SQL
    • Net Type: tcp
    • Active for Replication: turn on
    • Manually entered connection string part 1:
      • Example of connection string for cloud location:
      • server=https://lscentral.api.bc.dynamics.com/v2.0/696b709f-51ad-407e-83cd-e76c6e55543b/Production/WS/My%20Company/Codeunit/RetailWebServices;
      • user=ADMIN;password=JrdCDnyn6C7bPbkEcKabmCovbB84ZfKq4nOXhJXdhV0=;|lsws|none

    Leave other fields blank or unchanged.

  7. The Connection string is displayed in the Calculated Connection String FastTab.
  8. In the Web Server FastTab, enter these values:
    • Web service URI:
      • This should be the first part of the connection string. It should start with https:// and end with RetailWebServices
      • Example: https://lscentral.api.bc.dynamics.com/v2.0/696b709f-51ad-407e-83cd-e76c6e55543b/Production/WS/My%20Company/Codeunit/RetailWebServices
    • Web Override Credentials: turn on
    • Web Service User Name: the user name from the Web Service Setup.
    • Web Service Password: web service access key for the user.
  1. Click the Test Connection action:
    1. A message box asks if you want to test the connection, click Yes.
    2. If the connection is successful, a message box is displayed with the time it took to test.
    3. If the connection is not successful, an error is displayed.
  1. Click the Test Web Connection action:
    1. a message box asks if you want to test connection, click Yes.
    2. If the connection is successful, a message box is displayed with the time it took to test.
    3. If the connection is not successful, an error is displayed.

Both connections should test successfully before you continue. If you get errors it is most likely that the connection string is not correctly assembled, so check that your string has the correct Company, user and admin, and that you have input the correct information in the Web Server FastTab. The error message should also give an indication of what is wrong.

LS Insight in Azure distribution location

At this time you can only create this location and use it in your job setup, but you cannot complete it until LS Insight has been set up in Azure.

  1. Navigate to the Distribution Location List in LS Central on the Scheduler server.
  2. Click the New action to create a new distribution location.
  3. In the General FastTab, enter these values:
    • Code: LSINSIGHT
      A message appears, click Yes.
    • Description: LS Insight in Azure

    Leave other fields blank or unchanged.

  4. In the Data Director FastTab, enter these values:
    • Data Director Mode: TCP
    • Distribution Server: Computer name of the machine where Data Director is running.

    Leave other fields blank or unchanged.

  5. Tip: You can find this name by pressing the Windows key + Pause/Break on this machine, or by opening the Configuration tool. The name is the Host name displayed to the left.

  6. In the WS Distribution Server FastTab, enter this value:
    • Distribution Server URL: http://<DistributionServer>/DDWebservice

    Leave other fields blank or unchanged.

  7. You will fill out the Replication FastTab later.
  8. No changes in the Web Server FastTab.
  9. You will not be able to test connections at this point since the Replication information has not yet been filled out. This will be discussed later in the process.

Scheduler job setup

You are now ready to set up the scheduler jobs.

Import scheduler jobs

In the product package that you downloaded you will find the Scheduler Job Header.xml file. This file includes all the scheduler jobs needed to move data from LS Central in cloud to LS Insight in Azure. The first thing you need to do is to import its content to your LS Central on the Scheduler server:

  1. Navigate to the LS Import Export WS page in LS Central on the Scheduler server.
  2. Select the Scheduler Job Header line from the list.
  3. Click the Process action, and then click Import.
    1. Browse to the file in the Base folder, and click OK.
    2. When asked, if you want to overwrite existing records, select No (you are not reusing any existing jobs).
    3. When the Import/Export data utility - confirm window is displayed, click OK.
  4.  The import will now run, and when it is finished it should display Import Finished 94 records in 8 tables. Click OK.
  5. Navigate back to the Scheduler Job List, and confirm that the INS jobs have been imported. There should be 4 new jobs:
    • LS Insight Action Preload (INS_ACTIONPRELOAD)
    • LS Insight Action jobs (INS_ACTIONS)
    • LS Insight Normal with counter (INS_NORMAL_COUNT)
    • LS Insight Normal Full Load (INS_NORMAL_FULL)

    All jobs should have the distribution locations already set to the locations you created earlier:

    • From-Location code: LSCCLOUD
    • To-Location code: LSINSIGHT

Add receiver group to jobs

Open each of the new jobs, and follow these steps to check if the job has a Receiver group and add one if it is missing.

  1. Click the Related action, and then click Job - Receiver Groups.
  2. If there is no store group visible in list, add the ALL group and navigate away from the field to save.
  3. Close the Job Receiver Groups page.

Note: Remember to repeat this for all four imported jobs.

This is all the setup you will do for now. Once you have set up LS Insight, you will come back to LS Central on the Scheduler server to schedule and run the jobs.

 

< BackNext >