GPII Services Configuration

From wiki.gpii
Revision as of 16:21, 9 April 2013 by Yura (talk | contribs)
Jump to: navigation, search


This is page contains all the necessary information on how to configure various components (Flow Manager, Match Maker, Device Reporter, etc) within the GPII framework.

The source code for the core framework and all platform independent components can be found here: GPII Universal

All platform specific components can be found in the following repositories:

GPII Server

gpii.server component is one of the building blocks of the GPII framework you are deploying. It represents a single instance of a Node.js http server.

It serves as a container for one or more's (see below). A developer has an option of distributing as many's across as many gpii.server's as part of their deployment.

The source code for the gpii.server can be found here: gpii.server

GPII App component is a component that represents a single purpose app deployed within a particular gpii.server. Majority of the existing components within the GPII architecture that support the HTTP API (such as the Flow Manager, Device Reporter, Match Maker, Preferences Server, Solutions Registry, etc) are, in fact, gpii.apps themselves.

The source code for the can be found here:

A developer, generally, would not need to use these components directly in code and instead should be able to bootstrap the whole system with the configuration approach.

Creating a new configuration or editing an existing one for a specific GPII deployment essentially means setting up the appropriate GPII servers and GPII apps for a single deployment.

Creating Configuration File

There are several conventions in regards to where you configuration file should go (set for consistency and is not a technical constraint):

  • If you are creating configuration for multiple apps, consider putting it in universal/gpii/configs if all your GPII apps are defined in a GPII Universal repository. If one or more apps are defined in a platform specific repository, your configuration files should go into a top level configs directory (Note: you might have to create it) within the appropriate platform specific repository.
  • If you are creating configuration for a single, you need to save it in the configs directory that corresponds to the location of that GPII app. Currently all GPII apps are located in universal/gpii/node_modules (e.g. Preferences Server, Solutions Registry, etc). Thus, the config file should be located at this path: universal/gpii/node_modules/{some gpii app}/configs.

Basic configuration file with a single gpii.server and no gpii.apps will look like this: {

   "typeName": "your configuration name",
   "options": {
       "gradeNames": ["autoInit", "fluid.littleComponent"],
       "components": {                // List of components to be deployed.
           "gpii server component": { // The name of the server component.
               "type": "gpii.server", // The type of the server compoennt.