When you say "deploy to cloud", what do you mean? The properties file is loaded by Spring from the local environment or the classpath and for deployments to a Tomcat, the custom properties are typically bundled into the WAR file. Since you're taking the approach of building a WAR and deploying it to a Tomcat, your options would be to include the custom properties into the WAR build or to somehow place the properties into Tomcat (not sure how that's done). For the latter, the Spring config might need to be changed to reflect where those properties are to be found. Since it seems not to be desirable for a build to be a necessary step in a deploy, I'd love to see a way that the properties can be loaded from another location. Ideally Todd or someone else familiar with the current property loading can chime in.
Ed > On Apr 30, 2014, at 3:13 AM, Martin Harris <[email protected]> > wrote: > > Hi Folks, > > I'm having a little trouble getting usergrid to pick up the properties > file. If I build the .war from the latest code on github then it only gets > picked up if I copy it to lib/usergrid-custom.properties[1] (but not to > lib/usergrid.properties or lib/usergrid-deployment.properties). If I > download the war from maven (as suggested by Ed), then it doesn't seem to > get picked up from lib/usergrid.properties, lib/usergrid-custom.properties > or lib/usergrid-deployment.properties > > I'm assuming that the problem is that the properties file isn't being > picked up, the actual problem is as follows: > > - Building the .war from github and using > lib/usergrid-custom.properties, everthing works fine on both localhost and > a pair of cloud hosts > - Using the same deployment mechanism[2], and .war, if I deploy to the > cloud with the properties file in lib/usergrid-custom.properties the status > shows as cassandraAvailable: false, however if I deploy locally > cassandraAvailable is true, but the login and password in the properties > file don't work. I'm assuming the cassandra URL defaults to localhost:9160 > if no properties file is loaded? > - If I use the .war from maven, cassandraAvailable is false on both > localhost and the cloud, and with the properties file in both -custom and > -deployment > > I hope this makes sense... any help would be appreciated > > Cheers > > [1]: > https://github.com/usergrid/usergrid/blob/master/stack/config/README.txt > [2]: https://github.com/cloudsoft/brooklyn-usergrid (WIP!) > > -- > Martin Harris > Lead Software Engineer > Cloudsoft Corporation Ltd > www.cloudsoftcorp.com
