Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.
barbeau edited this page Feb 1, 2013 · 116 revisions

This is project is OneBusAway software modified for a Tampa, FL deployment.

If you're looking for the main OneBusAway project, please see the OneBusAway Application Suite wiki.

OneBusAway Tampa Website

You can find the active OneBusAway instance for Tampa, FL at http://www.usf.edu/onebusaway.

The OneBusAway software is current running on a virtualized server, onebusaway.forest.usf.edu, out of USF's Data Center.

Current virtualized server specs are:

  • Processor - Intel Xeon E7340 @2.40GHz
  • Memory - 8GB RAM
  • OS - Windows Server 2008 64-bit R2 Standard Service Pack 1
  • Data storage - 2 hard drives - 40GB (11.1GB free) and 50GB (49.7GB free)

System architecture

The OBA Tampa deployment consists of the following components:

  • OneBusAway (onebusaway-application-modules - this Github project)
  • GTFS-realtime feed software - retrieves real-time transit data from HART's AVL system and formats it into GTFS-realtime format
  • MySQL Database Server- holds user account information, as well as a cache of transit data
  • XWiki Server - contains the text and images used in the OneBusAway desktop web interface

The following sections discuss the specific technical details and instructions for deploying and maintaining the above components of the OBA Tampa software system. At the bottom of the page, we include details for available third-party application programming interfaces (APIs), and well as details on available third-party apps.

Deployment Instructions - For the OBA Tampa team

Note: if you're testing new OBA webapps on your local PC using the CUTR-at-USF OBA code (i.e., this Github project), you must use the full machine name of your USF computer (e.g., USF111111.cutr.usf.edu), and not localhost, when testing from a browser. This is because the Google Maps API used in OBA is restricted to servers running in the *.usf.edu domain. To change the valid domains for the Google Maps API key, have someone with credentials change this in the Google API console.

To deploy new WAR files to OBA Tampa server, use the code in this Github repository and the data-sources.xml files here (note that you'll need to replace the text <usernameGoesHere> and <passwordGoesHere> with the actual username/password credentials for MySQL in all 3 files). You'll need to rename each of the XML files to just data-sources.xml and put in the respective project /src/main/resources folders.

Then, build the projects using the instructions at the primary OBA Developer Installation page (be sure to follow the instructions for building the Google Web Toolkit components).

For the onebusaway-transit-data-federation webapp, onebusaway-api-webapp, and the onebusaway-webapp projects, you'll need to right-click on each and do "Export->WAR file". Select a place to save the WAR file on your local computer, and select the option to "Optimize for Tomcat v6".

Remote desktop into onebusaway.forest.usf.edu.

Stop the Tomcat server by right-clicking on the OneBusAway - Tomcat port 80 icon in the lower-right hand corner of the screen and then clicking Stop service. Wait for the service to stop.

Delete the current WAR files and folders for onebusaway-transit-data-federation webapp, onebusaway-api-webapp, and the onebusaway-webapp from the server directory C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps. Place the 3 new WAR files in this directory, and then re-start Tomcat by right-clicking on the OneBusAway - Tomcat port 80 icon in the lower-right hand corner of the screen and then clicking Start service. This may take several minutes for the server to initialize and the website to come back up. If 10 minutes or more have passed without a response, please check the Tomcat error log at C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs.

Adding real-time data (GTFS-realtime Feed)

We're using our HART-GTFS-realtime-Generator software to make HART's AVL data available to OBA via a GTFS-realtime feed. This software also runs on the same server onebusaway.forest.usf.edu, but uses an embedded Jetty web server running on port 8088.

To deploy a new version of the HART-GTFS-realtime-Generator software, the following two updated files should be placed in the C:\OneBusAway\GTFS-realtimeGenerator\application folder on the server:

  • cutr-gtfs-realtime-hart-1.0.0.jar - Java file that contains the HART-GTFS-realtime-Generator software (file name and link to file on Github will depend on version number)
  • cutr-gtfs-realtime-hart-autorun.bat - batch file that configures and starts the HART-GTFS-realtime-Generator software (The .bat file executes the cutr-gtfs-realtime-hart-1.0.0.jar file) (note that when a version number changes, you need to update this bat file to point to the new JAR file name).

Currently, cutr-gtfs-realtime-hart-autorun.bat is executed on server startup via a Windows Task "GTFS-realtime".

You should be able to see the GTFS-realtime feed in plain text format by visiting the below two links:

XWiki Server

All OBA Tampa desktop browser website content (e.g., text, images, etc.) is managed through an XWiki instance (XWiki Enterprise 4.2) running on onebusaway.forest.usf.edu on port 8081. It is installed to the location C:\OneBusAway\XWiki\XWiki_Enterprise_4.2, and can be started by double-clicking on the file start_xwiki.bat, and can be stopped by double-clicking on the file stop_xwiki.bat. start_xwiki.bat can be edited to change the port number if needed.

Currently, start_xwiki.bat is executed on server startup via a Windows Task "XWiki".

NOTE: if the XWiki port number is changed, the OBA-webapp data-sources.xml file will also need to be changed and redeployed to point to the new port number.

Database Server

We are currently using MySQL Community Server (installed via the MySQL Installer for Windows)) as a database server for all user account info and the transit data cache, running on the onebusaway.forest.usf.edu machine on port 3306. This database server is only accessible locally from software running on onebusaway.forest.usf.edu, as port 3306 is not currently open in the firewall. The MySQL server is set up to start via a Windows Service MySQL-OneBusAway that starts at Windows startup.

Mobile App Server Configuration

For the OBA mobile apps to work with OneBusAway, the following keys must exist in the data-sources.xml file for the opentripplanner-api-webapp:

  • Android: v1_BktoDJ2gJlu6nLM6LsT9H8IUbWc=cGF1bGN3YXR0c0BnbWFpbC5jb20=
  • iPhone: org.onebusaway.iphone
  • Windows Phone 7: v1_C5+aiesgg8DxpmG1yS2F/pj2zHk=c3BoZW5yeUBnbWFpbC5jb20=

These keys have been added to the OBA Tampa server instance.

Note that we are still working on a permanent solution to provide the Android app to Tampa OBA users (see the entry at the bottom of this page). iPhone and Windows Phone 7 mobile apps currently aren't available for Tampa OBA users. See this page for more general mobile app configuration info.

Maintenance Instructions - For the OBA Tampa team

Updating OBA with new GTFS data

Every time HART updates their GTFS data, we need to follow the following steps:

  1. Delete any current files in the directory C:\OneBusAway\bundle.

  2. Build the OBA graph with the new HART data on your computer

    • Put new HART GTFS data in the directory C:\OneBusAway\HART_GTFS\HART_GTFS_fixed.zip.
    • Execute org.onebusaway.transit_data_federation.bundle.FederatedTransitDataBundleCreatorMain in the OBA project onebusaway-transit-data-federation-builder with the Program Arguments of C:\OneBusAway\HART_GTFS\HART_GTFS_fixed.zip C:\OneBusAway\bundle and VM arguments of -Xmx4000m. This will produce new bundle files in the directory C:\OneBusAway\bundle.
  3. Remote Desktop into the server onebusaway.forest.usf.edu

  4. Right-click on the "OneBusAway - Tomcat 6 Port 80" icon in the status bar in the lower-right hand corner of the screen, and select "Stop Service." This will stop the OBA service and the http://www.usf.edu/onebusaway website will not be available until the service is restarted. You must wait for the service to completely stop, so Tomcat releases the lock on the old transit data files.

  5. Copy all files from the directory C:\OneBusAway\bundle on your computer and paste them using Remote Desktop into the directory C:\OneBusAway\bundle on the server onebusaway.forest.usf.edu, overwriting the current files in that directory with the same file names.

  6. In Remote Desktop on onebusaway.forest.usf.edu, right-click on the "OneBusAway - Tomcat 6 Port 80" icon in the status bar again, and select "Start Service." This will start the OBA service and the http://www.usf.edu/onebusaway website should become available again with the newly loaded bundle data.

As of Nov. 13, 2012, there are errors with HART's public GTFS data (see Issue #9) which requires HART to send a special post-processed GTFS data file to the USF team before OBA can be updated, so the public GTFS data cannot be used to update OBA. Therefore, Step #1 currently requires that a GTFS zip file be received from HART and manually placed in a directory so a bundle can be built.

Creating OBA Service Alerts

Please see the wiki page Tampa - Creating Service Alerts for detailed instructions on creating service alerts that will be seen by OneBusAway users in Tampa.

Third party App Interfaces

There are two interfaces provided by the software deployed on the server onebusaway.forest.usf.edu that can be used by 3rd party apps to retrieve real-time transit information:

  1. GTFS-realtime feed
  2. OneBusAway REST API

Please see the Tampa - Third Party App Interfaces page for details.

Third party Mobile Apps

Information about third-party mobile apps for OneBusAway Tampa is available on the Tampa Third Party Mobile Apps page.