-
Notifications
You must be signed in to change notification settings - Fork 3
Instance configuration Basics
Before starting any synchronization we need to add the remote instances. To configure new instances, click on "Destination instance settings" in MD Sync's main panel.
The first page will show you the list of already configured instances
To add a new destination instance, just click on the "Add" icon at the bottom right corner of the screen
A modal screen appears where you can enter the new server data.
- Server name: A human readable name meaningful for you and your team.
- URL endpoint: The server address
- Username: this must be a user that exists in the destination instance and has the right to edit data and metadata.
- Password for that username
Please test the connection before saving the instance configuration details

MD Sync needs to be installed only in the source instance. It does not need to be installed in the destination instance.
Repeat the process for each instance that you need to sync.

There is another button: "metadata mapping". Learn how to map the metadata of the source instance against the destinations instance
CORS whitelists needs to be configured on the remote instance, otherwise it is not possible to establish connection with it.
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. javascript files) on a web page to be requested from another domain outside the domain from which the first resource was served.
To configure the CORS whitelist, access to DHIS2 System Settings→ Access→CORS white list section
You need to write each item on a new line. You can write IP address or hostname. Some examples:
http://127.0.0.1:8000
http://dhis2.myserver1.com
http://localhost
http://dhis2.myserver1.com:8080
When there the route has a path like http://pro.myserver.com/pro/app
Then, the whitelist on the remote instance needs to include the full path in different lines:
http://pro.myserver.com
http://pro.myserver.com/pro
http://pro.myserver.com/pro/app