Getting 2.0 test data into ODK Aggregate server

I’m at a point where I want to add some forms to ODK Aggregate server in
the ODK 2.0 model. I have pieced together these abbreviated instructions
from other developers but if there is a definitive source on the web
somewhere, please point me to it.

Here’s what I’m doing.

  1. Run ODK aggregate and postgres on localhost.

  2. Turn on ODK Tables on the ODK aggregate

Site Admin Tab → Preferences Tab → ODK 2.0 Features → Check checkbox for
ODK Tables Synchronization Functionality (No save button)

  1. Make sure admin has the three tables permissions selected

Site Admin Tab → Permissions Tab → Edit users → Make sure “admin” has
the three “tables” permissions selected.

  1. Install Android Studio and an Android emulator according to Google’s
    documentation

  2. Check out
    git clone git@github.com:opendatakit/survey.git
    git clone git@github.com:opendatakit/services.git
    git clone git@github.com:opendatakit/tables.git
    git clone git@github.com:opendatakit/androidcommon.git
    git clone git@github.com:opendatakit/androidlibrary.git
    git clone git@github.com:opendatakit/gradle-config.git

and
git clone git@github.com:opendatakit/app-designer.git

into a folder; open “Services” and “Survey” in Android Studio.

  1. Launch ODK Services on the Android emulator

  2. Launch ODK Survey on the Android emulator

  3. On the Android emulator, stop ODK server and services

  4. Install node, npm, and grunt

  5. Run the following commands

adb shell
cd sdcard
rm -r opendatakit
exit

  1. In the app-designer directory that you’ve checked out, run the
    following commands

./zipFile.sh
grunt adbpush-default-app

  1. In the emulator, open chrome and make sure you can go to
    http://10.0.2.2 and log in as admin (I’m using just http, for some people
    it may be https)

  2. Reopen ODK Services, and configure server connection to
    http://10.0.2.2, username admin, password to admin’s password,

  3. Reopen ODK Survey and open sync. Click “reset server” button, then
    “Upload new forms” button.

Should this upload some sample forms to the server? Is there an easier way?

I’m running into a number of problems at the end of this process, including
a crashing ODK Survey app. The crashing may be because of some changes I’m
merging in rather than ODK itself, so I want to make sure this process is
expected to work before I get any deeper into debugging this merge.

Thanks,
Caden

I may have gone a bit overboard with my attempt!

I had success with the following:

  1. Complete through step 6 below (aggregate server is running, survey app
    is ready.)

  2. Go into the app-designer/app/config/tables/ and zip up the survey folder.

  3. Go the aggregate server →
    ODK Tables tab → Current tables → Import tables button

  4. (ODK Aggregate) Select and upload the survey.zip file

  5. Go to the ODK Survey app on the Android emulator

  6. (ODK Survey) Configure server connection to http://10.0.2.2, username
    admin, password to admin’s password

  7. (ODK Survey) Sync → Download forms

Now I can see the form, fill it out, and upload survey instances. Probably
should have tried this first.

··· On Monday, February 27, 2017 at 3:40:43 PM UTC-6, C. Howell wrote: > > > I'm at a point where I want to add some forms to ODK Aggregate server in > the ODK 2.0 model. I have pieced together these abbreviated instructions > from other developers but if there is a definitive source on the web > somewhere, please point me to it. > > Here's what I'm doing. > > 0. Run ODK aggregate and postgres on localhost. > > 1. Turn on ODK Tables on the ODK aggregate > > Site Admin Tab -> Preferences Tab -> ODK 2.0 Features -> Check checkbox > for ODK Tables Synchronization Functionality (No save button) > > 2. Make sure admin has the three *tables* permissions selected > > Site Admin Tab -> Permissions Tab -> Edit users -> Make sure "admin" has > the three "tables" permissions selected. > > 3. Install Android Studio and an Android emulator according to Google's > documentation > > 4. Check out > git clone git@github.com:opendatakit/survey.git > git clone git@github.com:opendatakit/services.git > git clone git@github.com:opendatakit/tables.git > git clone git@github.com:opendatakit/androidcommon.git > git clone git@github.com:opendatakit/androidlibrary.git > git clone git@github.com:opendatakit/gradle-config.git > > and > git clone git@github.com:opendatakit/app-designer.git > > into a folder; open "Services" and "Survey" in Android Studio. > > 5. Launch ODK Services on the Android emulator > > 6. Launch ODK Survey on the Android emulator > > 7. On the Android emulator, stop ODK server and services > > 8. Install node, npm, and grunt > > 9. Run the following commands > > adb shell > cd sdcard > rm -r opendatakit > exit > > 10. In the app-designer directory that you've checked out, run the > following commands > > ./zipFile.sh > grunt adbpush-default-app > > 11. In the emulator, open chrome and make sure you can go to > http://10.0.2.2 and log in as admin (I'm using just http, for some > people it may be https) > > 12. Reopen ODK Services, and configure server connection to > http://10.0.2.2, username admin, password to admin's password, > > 13. Reopen ODK Survey and open sync. Click "reset server" button, then > "Upload new forms" button. > > Should this upload some sample forms to the server? Is there an easier > way? > > I'm running into a number of problems at the end of this process, > including a crashing ODK Survey app. The crashing may be because of some > changes I'm merging in rather than ODK itself, so I want to make sure this > process is expected to work before I get any deeper into debugging this > merge. > > Thanks, > Caden >

I assume you have already looked at the getting-started documentation for
the 2.0 tools?

https://opendatakit.org/use/2_0_tools/active-distribution/2-0-getting-started-rev-208/

That’s the most current documentation.

··· On Mon, Feb 27, 2017 at 2:25 PM, C. Howell wrote:

I may have gone a bit overboard with my attempt!

I had success with the following:

  1. Complete through step 6 below (aggregate server is running, survey app
    is ready.)

  2. Go into the app-designer/app/config/tables/ and zip up the survey
    folder.

  3. Go the aggregate server →
    ODK Tables tab → Current tables → Import tables button

  4. (ODK Aggregate) Select and upload the survey.zip file

  5. Go to the ODK Survey app on the Android emulator

  6. (ODK Survey) Configure server connection to http://10.0.2.2, username
    admin, password to admin’s password

  7. (ODK Survey) Sync → Download forms

Now I can see the form, fill it out, and upload survey instances.
Probably should have tried this first.

On Monday, February 27, 2017 at 3:40:43 PM UTC-6, C. Howell wrote:

I’m at a point where I want to add some forms to ODK Aggregate server in
the ODK 2.0 model. I have pieced together these abbreviated instructions
from other developers but if there is a definitive source on the web
somewhere, please point me to it.

Here’s what I’m doing.

  1. Run ODK aggregate and postgres on localhost.

  2. Turn on ODK Tables on the ODK aggregate

Site Admin Tab → Preferences Tab → ODK 2.0 Features → Check checkbox
for ODK Tables Synchronization Functionality (No save button)

  1. Make sure admin has the three tables permissions selected

Site Admin Tab → Permissions Tab → Edit users → Make sure “admin” has
the three “tables” permissions selected.

  1. Install Android Studio and an Android emulator according to Google’s
    documentation

  2. Check out
    git clone git@github.com:opendatakit/survey.git
    git clone git@github.com:opendatakit/services.git
    git clone git@github.com:opendatakit/tables.git
    git clone git@github.com:opendatakit/androidcommon.git
    git clone git@github.com:opendatakit/androidlibrary.git
    git clone git@github.com:opendatakit/gradle-config.git

and
git clone git@github.com:opendatakit/app-designer.git

into a folder; open “Services” and “Survey” in Android Studio.

  1. Launch ODK Services on the Android emulator

  2. Launch ODK Survey on the Android emulator

  3. On the Android emulator, stop ODK server and services

  4. Install node, npm, and grunt

  5. Run the following commands

adb shell
cd sdcard
rm -r opendatakit
exit

  1. In the app-designer directory that you’ve checked out, run the
    following commands

./zipFile.sh
grunt adbpush-default-app

  1. In the emulator, open chrome and make sure you can go to
    http://10.0.2.2 and log in as admin (I’m using just http, for some
    people it may be https)

  2. Reopen ODK Services, and configure server connection to
    http://10.0.2.2, username admin, password to admin’s password,

  3. Reopen ODK Survey and open sync. Click “reset server” button, then
    “Upload new forms” button.

Should this upload some sample forms to the server? Is there an easier
way?

I’m running into a number of problems at the end of this process,
including a crashing ODK Survey app. The crashing may be because of some
changes I’m merging in rather than ODK itself, so I want to make sure this
process is expected to work before I get any deeper into debugging this
merge.

Thanks,
Caden


You received this message because you are subscribed to the Google Groups
“ODK Developers” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com