Skip to content

Admin Console Configuration

sheldonabrown edited this page Jun 10, 2016 · 2 revisions

Below is an annotated (and therefore invalid json) example configuration file for the onebusaway-admin-webapp. This configuration file by default needs to reside in /var/lib/oba/config.json. Please remove the annotations before using.

{
  // this is boilerplate required to tell the configuration service to prefer 
  // this local configuration file over a central configuration service
  "oba": {
         "env": "local",
          "config": "local"
  },
  // this is the array of component configurations.  A component is a logical
  // grouping of properties, and hence here we are mainly concerned with
  // "admin" properties
        "config":
 [
 // the url at which the onebusaway-api-webapp resides at
 {"component": "admin", "key": "apiHostname", "value": "api.onebusaway.org"},
 // TDM stands for onebusaway-transit-data-manager, an NYC specific module.
 // It is typically not used in onebusaway-application-module deployments 
 // but for NYC is contains a central configuration API among other things.
 {"component": "admin", "key": "useTdm", "value": "false"},
 // Should the bundle builder consider auxiliary forms of input along with
 // GTFS. Currently this implies Hastus exports of very specific format.
 // Note the alternative is to expect NYC specific STIF files, so this value
 // can safely be true even if Hastus data is not available.
 {"component": "admin", "key": "admin.auxSupport", "value": "true"},
 // For multi-agency deployments, should stops be consolidated?
 {"component": "admin", "key": "admin.stopConsolidation", "value": "true"},
 // For multi-agency deployments with stop consolidation enabled, the
 // stop consolidation definition.
 {"component": "admin", "key": "admin.stopMappingUrl", "value": "https://raw.github.com/wiki/camsys/onebusaway-application-modules/PugetSoundStopConsolidation.md"},
 // For multi-agency deployments with stop consolidation enabled, the list of
 // consolidated stops to verify.This can safely be the same as
 // admin.stopMappingUrl
 {"component": "admin", "key": "admin.stopVerificationUrl", "value": "https://raw.github.com/wiki/camsys/onebusaway-application-modules/PugetSoundStopConsolidation.md"},
 // The admin console is designed to "spin up" larger AWS EC2 instances for 
 // bundle builds but itself has very modest CPU/Memory requirements.  If a
 // user is not taking advantage of the optional EC2 configuration set this
 // value to localhost, otherwise set it to the EC2 instance identifier that
 // exists in the "stopped" state.
 {"component": "admin", "key": "admin.instanceId", "value": "localhost"},
 // path location where bundles are "staged".  Staged represents an upcoming
 // bundle, but may have a future start date. This is opposed to a "deployed" 
 // bundle which is actively available for download to the 
 // onebusaway-transit-data-federation-webapp.
 // TODO it looks like this property could be programattically determined and 
 // therefore is slightly redundant.  The current default data path of
 // /var/lib/oba/bundles makes this unnecessary
 {"component": "admin", "key": "bundleStagingDir", "value": "/var/lib/oba/bundles/staged"},
 // Show menu option to manage API Keys.  This functionality is generic and safe
 // for all deployments
 {"component": "admin", "key": "showApiKey", "value": "true"},
 // Show menu option to manage users.  This functionality is generic and safe for
 // all deployments
 {"component": "admin", "key": "showManageUsers", "value": "false"},
 // Show menu option to build a federated transit data bundle.  This functionality
 // is generic and safe for all deployments
 {"component": "admin", "key": "showBundleUtil", "value": "true"},
 // Show menu option for describing vehicle status.  This functionality is
 // specific to NYC.
 {"component": "admin", "key": "showVehicleStatus", "value": "false"},
 // Show menu option to manage configuration service.  If you are using this
 // configuration file, the configuration service is not is use and hence this
 // value should be false.
 {"component": "admin", "key": "showUpdateConfig", "value": "false"},
 // Show menu option to generate QR codes for stops.  This functionality is
 // intended for NYC but could be re-purposed for other deployments
 {"component": "admin", "key": "showQrCode", "value": "false"},
 // A bundle building hint: if multiple agency data is provided does a default
 // agency need to be specified.  NYC defaults all stops to an umbrella default
 // agency while trips and routes belong to specific agencies.
 // Typical deployments will have this as true as the agency will be specified
 // in the GTFS or in the GTFS configuration.
 {"component": "admin", "key": "no_default_agency", "value": "true"},
 /*
 * THE FOLLOWING SECTION HAS THESE CONVENTIONS:
 *
 * The AgencyAndId notation is duplicated here to specify agency specific
 * configuration.  That notation is Agency_Property, where agency currently
 * needs to be a one or two digit integer.
 * TODO: remove the two digit integer limitation.
 */
 // "mod" refers to a "mod" script or onebusaway_gtfs_transformer modification
 // syntax shown here:
 // http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/current/onebusaway-gtfs-transformer-cli.html
 // A "mod" script makes automated changes or corrections to agency GTFS as
 // GTFS is rarely perfect as supplied by an agency.
 // The multiAgency flag explicitly disables "mod" script functionality, or a
 // modUrl of
 // https://raw.github.com/wiki/camsys/onebusaway-application-modules/EmptyModifications.md
 // is a no-op making no changes.  
 // NOTE: FOR MULTI-AGENCY bundle builds, there is value in running the
 // EmptyModificatons against each GTFS as the transformer adds appropriate
 // agency ids required for the combined bundle build.
 {"component": "admin", "key": "0_multiAgency", "value": "false"},
 // the "mod" script for agency "1"  
 //See http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/current/onebusaway-gtfs-transformer-cli.html
 {"component": "admin", "key": "1_modurl", "value": "https://raw.github.com/wiki/camsys/onebusaway-application-modules/KingCountyMetroModifications.md"},
 // another example "mod" script for agency 3
 {"component": "admin", "key": "3_modurl", "value": "https://raw.github.com/wiki/camsys/onebusaway-application-modules/PierceTransitModifications.md"},
 // an example empty "mod" script for agency 95
 {"component": "admin", "key": "95_modurl", "value": "https://raw.github.com/wiki/camsys/onebusaway-application-modules/EmptyModifications.md"},
 // Along with the "mod" script functionality, agency or domain specific 
 //strategies exist to improve or otherwise transform GTFS.  Below is an example
 // of how to associate a strategy with an agency.  Specifically Agency "1" is
 // associated with KingCountyMetroStrategy.  A limitation of this pattern is
 // that the Strategy needs to already exist in the class path of the admin
 // console.
 {
    "component":"admin",
    "key":"1_transform",
    "value":
"\"op\":\"transform\",\"class\":\"org.onebusaway.king_county_metro_gtfs.transformations.KingCountyMetroStrategy\",\"base_url\":\"https://raw.github.com/wiki/camsys/onebusaway-application-modules\",\"path\":\":path\"}"
 },
  // When a bundle is staged or deployed, we can optionally notify associated 
 //OpenTripPlanner instances.  The URL below is an example of how this would
 // work (no live deployment currently take advantage of this), where ":uuid" is
 // the id of the bundle created and will be dynamically inserted at invocation.
 { "component": "admin", "key": "otpNotificationUrl", "value": "http://www.google.com?uuid=:uuid"},
  /*
  * FOR MULTI-AGENCY BUNDLE BUILDS, the following section re-maps agency ids in
  * the GTFS to an agreed upon OneBusAway deployment specific integer.  This is
  * very convenient when multiple agencies default there agency id to "1".  The
  * notation supports multiple re-maps per data set.
  * The "key" agency id indexes off of the specified agency owner of the GTFS.
  * The "value" translates according to:
  * INPUT_GTFS_AGENCY_ID_1,OUTPUT_GTFS_AGENCY_ID_1;INPUT_AGENCY_ID_2,OUTPUT_AGENCY_ID_2;etc
  /
  {
         "component":"agency",
         "key":"1",
         "value":"KCM,1;EOS,23;ST,40"
      } // no comma here please to be valid JSON
// end of configuration array
]
// end of configuration file
}
Clone this wiki locally