getodk / aggregate

ODK Aggregate is a Java server that stores, analyzes, and presents survey data collected using ODK Collect. Contribute and make the world a better place! ✨🗄✨
https://docs.opendatakit.org/aggregate-intro/
Other
74 stars 227 forks source link

Issue 420 fix installer conf file assets #422

Closed ggalmazor closed 5 years ago

ggalmazor commented 5 years ago

Closes #420, and #429

What has been done to verify that this works as intended?

Build the installer, check the files it deploys, and deploy in local tomcat

Build the installer (linux-x64) and run it, then deploy the resulting WAR into a local Tomcat. Verify that Aggregate launches without changing anything.

Why is this the best possible solution? Were any other approaches considered?

The changes are conforming to any other task in the installer (set values in conf files, etc.)

This PR adds some required adaptations from v1.x to v2.x into the installer

In v1.x, the odk-settings.xml for each platform comes with a hard-coded driver classname, which deviates from the same file in the code repo, which uses whatever value is defined in the jdbc.driverClassNameprops key injdbc.properties`

In v2.x, we have made an effort to normalize all the different configuration assets, and we changed the odk-settings.xml that the installer uses, but forgot to set the prop key in the jdbc settings file.

This PR takes care of that.

Are there any risks to merging this code? If so, what are they?

Nope, although we should test

Do we need any specific form for testing your changes? If so, please attach one

No.

Does this change require updates to documentation? If so, please file an issue at https://github.com/opendatakit/docs/issues/new and include the link below.

No.

ggalmazor commented 5 years ago

@yanokwa, after reviewing your suggestions, I'd want to stick with the changes I've pushed as they are. The installer should produce configuration files just like the ones at src/main/resources/*.example.

If you diff src/main/resources/odk-settings.xml.example with the three odk-settings.xml at installer/project/files/conf/(mysql|postgresql|sqlserver) you should get differences only in what regards to database artifacts. The realm bean should be the same, because Aggregate expects it to be like the one defined in the example file.

The same happens with the security.properties file generated by the installer. It must have exactly the same keys as the file at security.properties.example.

yanokwa commented 5 years ago

@ggalmazor As you wish!

kkrawczyk123 commented 5 years ago

Tested with success! I was able to generate war using the installer, deploy it and run aggregate. I've checked the content of aggregate settings files as well.

@opendatakit-bot unlabel "needs testing" @opendatakit-bot label "behavior verified"