This repository contains an early access implementation for a GTFS-RT server and an AVL web app that runs on both android and iOS.
The server is implemented in python as a Google App Engine Flask application, the web app is available at https://.wl.r.appspot.com.
For steps required to onboard a new agency, please see the Onboarding Runbook.
To start running the client, press the Start
button, then select Route
and Bus No
from the respective dropdowns. Press Okay
to start sending location updates. Upon trip completion, press the Stop
button.
- From
server/app-engine
, enter your virtual environment (by running something likesource venv/bin/activate
) - Run the command
python main.py -c <path-to-cert.pem> -k <path-to-key.pem>
to run the app on your local machine. - Visit
https://127.0.0.1:8080
from your web browser to test out your changes - (Optional) After setting up ngrok, use the command
./ngrok http https://127.0.0.1:8080
to test the app from your mobile device.
- Ensure you are on the latest version of the main branch, and run
gcloud app deploy --no-promote
from the app-engine directory. This deploys the web app to a sort of "staging environment", since web traffic continues to be directed to the previous version. - When the deploy is done, visit the staging environment at
https://<VERSION_ID>-dot--<PROJECT_ID>.wl.r.appspot.com/
Get the versionID from the Versions Console. Manually ensure the app UX works as expected by scanning a QR code and starting a trip. - Run the following three commands from graas/server/test:
NODE_PATH=../node/node_modules node post-vehicle-positions.js -u https://<version-id>-dot-lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
NODE_PATH=../node/node_modules node post-service-alerts.js -u https://<version-id>-dot-lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
NODE_PATH=../node/node_modules node post-stop-time-entities.js -u https://<version-id>-dot-lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
- Go to the Versions Console and direct all traffic to the new version. Select the latest version, click the 3-dot "hamburger menu" and then click "migrate."
- Run the same tests as above, this time on the production server, from graas/server/test:
NODE_PATH=../node/node_modules node post-vehicle-positions.js -u https://lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
NODE_PATH=../node/node_modules node post-service-alerts.js -u https://lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
NODE_PATH=../node/node_modules node post-stop-time-entities.js -u https://lat-long-prototype.wl.r.appspot.com -a pr-test -e PR_TEST_ID_ECDSA
- From the app-engine directory, run a server stress test with this command:
python stress-test.py ../tests/stress-test-config.json
Make sure that you have docker
in your path, then run dockerized-report.sh <agency-id>
. agency-id
needs to be the ID for an onboarded agency.