Question about sync-endpoint-default-setup local environment

Hey guys,

I have walked through the demo on this page:

and everything seems to work except I have a couple questions.

  1. I’m trying to figure out how to connect sync to my ODK aggregate instance. I found a property [odk.url] in the properties file [config/web-ui/] which I assume I can use to specify the URL to my ODK instance. This seems to work OK I’m just including it to make sure I’m doing this correctly (it wasn’t specified in the readme)

  2. I have ODK aggregate running here locally in tomcat and I have the server IP set to my private internal ip address. This is so that I can connect to it from a browser and also my android emulator (which is running ODK collect). That part works fine. Now, I send that same private ip address into my ODK sync docker config and when I log into the ODK sync web ui webapp it cannot reach that IP address. This (I believe) is because docker is running inside a separate network (not host). I also can’t change it to use host because its running in swarm mode and swarms can’t run on host. How are you guys getting this to work for development?

In addition I have one more question. Is it required that ODK sync use a different Postgres from ODK aggregate? At the very least can I create a new database in the same Postgres and point sync to that one and then have aggregate use a different database in the same Postgres, right?

My understanding of ODK sync is that it tracks LDAP and ODK aggregate for changes and if one changes it pushes that change to the other. Is this understanding correct?

Hi @rrowlands.

We also have instructions here:
I think these instructions should answer most of your questions.

However, I am a little confused by some of your questions. The Sync Endpoints are used instead of Aggregate; they do not talk to each other.

ODK Aggregate is used as a server to receive your records when collecting data with ODK Collect or another ODK 1 tool. You can also use ODK Aggregate’s Tables Extension to make it work with ODK 2 tools. In either case, ODK Aggregate is your server to receive data.

Sync Endpoints is also a server to receive data, but are ONLY comapatible with ODK 2. The will not work with ODK Collect. You can spin up a Sync Endpoint and send and receive records with ODK Services, Survey, and Tables (the core 2.0 mobile tools). The reason to use Sync Endpoints is if you want to take advantage of the latest features of ODK 2, like group permissions, or you prefer the use of a docker container.

ODK Aggregate and Sync Endpoints do NOT talk to each other. They each have their own database because they each receive records from ODK mobile tools, but you either use one or the other.

Are you using ODK Collect? Or the ODK 2 tool suite?