This project is currently in sustaining mode as deployed within Rackspace. For more information on how to support this in sustaining mode please see https://one.rackspace.com/display/cloudfeeds/Cloud+Feeds+Sustaining+Mode+Documentation+Start+Page.
Cloud Feeds Preferences Service is a web service for managing flat JSON based preferences and metadata. Even though this service is initally conceived and now maintained by the Cloud Feeds team, it is a generic service that can be used by any team. The code in this repository does not have anything related to Cloud Feeds API. It is the goal of the Cloud Feeds team to keep this code generic as much as possible.
Any service/product/team who might want to expose a set of preferences to its consumers and to provide a set of API to set those preferences can stand up and deploy this service in their environments. The preferences is a flat JSON string value list. This service also provides an API to fetch the preferences' metadata.
To build this component, we require:
- Gradle version 2.2 or above
- JDK 7
- Scala 2.10 or above
gradle clean build
gradle clean build uberjar
gradle clean installApp
gradle clean buildRpm
For development purpose, gradle build will generate a H2 database which should be copied to the path specified in c3p0-config.xml before running the app.
gradle clean build
cp app/build/db/test/preferencesdb.mv.db ~/preferencesdb.mv.db
Note: The current c3p0-config.xml file in classpath expects this file in home directory. You can change jdbcUrl
property to point to the location of your database.
Run the build to create an installable app. Then you should have a startup script in the build
directory, which you can run:
gradle clean installApp
sh app/build/install/app/bin/app
If you are running this on Mac and you get UnknownHostException
, it's probably because your Mac's hostname is not the same as localhost. To fix this, run the following:
scutil --set "HostName" localhost
The Cloud Feeds Preferences Service uses the following configuration files:
This preferences-service.conf file configures the Preferences Service app itself.
By default, the Preferences Service app will try to find this file from classpath. This can be overriden by specifying the Java System properties -Dconfig.file=<path_to_file>
.
This c3p0-config.xml file has the C3P0 Connection Pool configuration.
By default, the Preferences Service app will try to load this file from classpath. This can be overriden by editing the preferences-service.conf
file above.
This logback.xml file has the logging related configuration.
By default, the Preferencs Service app will try to load this file from classpath. This can be overriden by editing the preferences-service.conf
file above.