Skip to content

Commit

Permalink
Merge pull request #66 from OneBusAway/reconcile-readme
Browse files Browse the repository at this point in the history
Unify the K8S docs section with the other deployment information
  • Loading branch information
aaronbrethorst authored Mar 17, 2024
2 parents 08eadd5 + 4575d45 commit 0ceecde
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,6 @@ This repository contains scripts and configuration for building version 2 of the
[OneBusAway Application Suite](https://github.com/OneBusAway/onebusaway-application-modules)
for use with [Docker](https://www.docker.com/).

## Deployment

### Published Images

You can find the latest published Docker images on Docker Hub:

* [onebusaway-bundle-builder](https://hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-bundle-builder) - This image is built from the `bundler` directory and contains the functionality needed to create a transit data bundle from a GTFS feed.
* [onebusaway-api-webapp](https://hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-api-webapp) - This image is built from the `oba` directory and contains the functionality needed to run the OBA API webapp.

### Deployment Parameters

* Database
* `JDBC_URL` - The JDBC connection URL for your MySQL database.
* `JDBC_USER` - The username for your MySQL database.
* `JDBC_PASSWORD` - The password for your MySQL database.
* GTFS-RT Support (Optional)
* `ALERTS_URL` - Service Alerts URL for GTFS-RT.
* `TRIP_UPDATES_URL` - Trip Updates URL for GTFS-RT.
* `VEHICLE_POSITIONS_URL` - Vehicle Positions URL for GTFS-RT.
* `REFRESH_INTERVAL` - Refresh interval in seconds. Usually 10-30.
* `AGENCY_ID` - Your GTFS-RT agency ID. Ostensibly the same as your GTFS agency ID.
* Authentication (Optional)
* Example: Specifying `FEED_API_KEY` = `X-API-KEY` and `FEED_API_VALUE` = `12345` will result in `X-API-KEY: 12345` being passed on every call to your GTFS-RT URLs.
* `FEED_API_KEY` - If your GTFS-RT API requires you to pass an authentication header, you can represent the key portion of it by specifying this value.
* `FEED_API_VALUE` - If your GTFS-RT API requires you to pass an authentication header, you can represent the value portion of it by specifying this value.

You will also need to create a transit data bundle from a GTFS Zip file. This needs more documentation, but this README does a decent job of outlining the process. The only tricky part is that you need to get it into your running container. Currently, we recommend building it locally, uploading the contents of the `./bundle` directory to S3 or another publicly accessible website, and then downloading it into your container. Obviously, this needs some improvement.

### Deploy to Render

[Render](https://www.render.com) is an easy-to-use Platform-as-a-Service (PaaS) provider. You can host OneBusAway on Render by either manually configuring it or by clicking the button below.

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/oneBusAway/onebusaway-docker/)

## Running locally

To build bundles and run the webapp server with your own GTFS feed, use the [Docker Compose](https://docs.docker.com/compose/) services in this repository.
Expand Down Expand Up @@ -84,9 +50,43 @@ A database port is open to your host machine, so you can connect to it programma
mysql -u oba_user -p -h localhost:3306
```

## Running in Kubernetes
## Deployment

### Creating the docker images
### Published Images

You can find the latest published Docker images on Docker Hub:

* [onebusaway-bundle-builder](https://hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-bundle-builder) - This image is built from the `bundler` directory and contains the functionality needed to create a transit data bundle from a GTFS feed.
* [onebusaway-api-webapp](https://hub.docker.com/r/opentransitsoftwarefoundation/onebusaway-api-webapp) - This image is built from the `oba` directory and contains the functionality needed to run the OBA API webapp.

### Deployment Parameters

* Database
* `JDBC_URL` - The JDBC connection URL for your MySQL database.
* `JDBC_USER` - The username for your MySQL database.
* `JDBC_PASSWORD` - The password for your MySQL database.
* GTFS-RT Support (Optional)
* `ALERTS_URL` - Service Alerts URL for GTFS-RT.
* `TRIP_UPDATES_URL` - Trip Updates URL for GTFS-RT.
* `VEHICLE_POSITIONS_URL` - Vehicle Positions URL for GTFS-RT.
* `REFRESH_INTERVAL` - Refresh interval in seconds. Usually 10-30.
* `AGENCY_ID` - Your GTFS-RT agency ID. Ostensibly the same as your GTFS agency ID.
* Authentication (Optional)
* Example: Specifying `FEED_API_KEY` = `X-API-KEY` and `FEED_API_VALUE` = `12345` will result in `X-API-KEY: 12345` being passed on every call to your GTFS-RT URLs.
* `FEED_API_KEY` - If your GTFS-RT API requires you to pass an authentication header, you can represent the key portion of it by specifying this value.
* `FEED_API_VALUE` - If your GTFS-RT API requires you to pass an authentication header, you can represent the value portion of it by specifying this value.

You will also need to create a transit data bundle from a GTFS Zip file. This needs more documentation, but this README does a decent job of outlining the process. The only tricky part is that you need to get it into your running container. Currently, we recommend building it locally, uploading the contents of the `./bundle` directory to S3 or another publicly accessible website, and then downloading it into your container. Obviously, this needs some improvement.

### Deploy to Render

[Render](https://www.render.com) is an easy-to-use Platform-as-a-Service (PaaS) provider. You can host OneBusAway on Render by either manually configuring it or by clicking the button below.

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/oneBusAway/onebusaway-docker/)

### Running in Kubernetes

#### Creating the docker images

1. Build the bundler image:

Expand All @@ -100,7 +100,7 @@ docker build ./bundler -t oba/bundler:test
docker build ./oba -t oba/app:test
```

### Creating the Kubernetes resources:
#### Creating the Kubernetes resources:

Apply the Kubernetes resources in oba.yaml

Expand All @@ -116,7 +116,7 @@ You can portforward the oba app to your localhost using:
kubectl port-forward deploy/oba-app-deployment -n oba 8080:8080
```

### Inspecting the database
#### Inspecting the database

You can portforward the service to your localhost using:

Expand Down

0 comments on commit 0ceecde

Please sign in to comment.