Code Monkey home page Code Monkey logo

cloudfeeds-preferences-svc's Introduction

cloudfeeds-preferences-svc

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.

How to Build

To build this component, we require:

  • Gradle version 2.2 or above
  • JDK 7
  • Scala 2.10 or above

Simple build

gradle clean build

Build a executable Jar

gradle clean build uberjar

Build an installable app

gradle clean installApp

Build an RPM

gradle clean buildRpm

Setup

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.

How to run the App

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

Configuration

The Cloud Feeds Preferences Service uses the following configuration files:

preferences-service.conf

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>.

c3p0-config.xml

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.

logback.xml

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.

cloudfeeds-preferences-svc's People

Contributors

bwtaylor avatar chandraaddala avatar mwhahaha avatar shintasmith avatar usnavi avatar vinnyq avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.