Sign inSign up

ogndocker/ogn-gateway-java

By ogndocker

Updated about 8 years ago

OGN gateway without any plugins, simply logging all beacons (raw files and IGC files)

Image
0

2.4K

ogndocker/ogn-gateway-java repository overview

ogn-gateway-java

This is a base docker ogn-gateway image. This gateway does not have any pre-installed plugins. It can be used as a base image for other (specialized) gateways (e.g. the ogn-gateway-stats but it also can be launched in order to log data received from the OGN. It logs raw beacons, decoded beacons and IGC files.

The docker file

How to Use This Image

The simplest
$ docker run -d ogndocker/ogn-gateway-java

Note If you run it as described above the gateway will be logging all the data to a log folder inside the container. Fine, but most likely you may want to change that. You can do it simply by mounting external volume for the logs.

Specify where you want the logs to be written
$ docker run -d -it -v 'C:/tmp/ogn/ogn-gateway/log/:/var/log/ogn-gateway' \
--rm -h ogn-gateway --name ogngateway \
-e OGN_GATEWAY_LOG_DIR=/var/log/ogn-gateway \
-p 61628:61628 ogndocker/ogn-gateway-java

 
In the above example, we mount C:\tmp\ogn-gateway\log volume to the container and all the logs will be written there. We also expose expose TCP port 61628 , so that the ogn-gateway process can be introspected via JMX

Using docker-compose

Create your docker-compose.yml

version: '2'
services:
  ogn-gateway-stats:
    image: ogndocker/ogn-gateway-java:latest
      hostname: ogn-gateway-java
      environment:
        - OGN_GATEWAY_LOG_DIR=/var/log/ogn-gateway
      ports:
        - "61628:61628"
      volumes:
        - "C:/tmp/ogn/ogn-gateway/log/:/var/log/ogn-gateway"
        - "C:/tmp/ogn/stats-db:/db"

 
(Note: of course update the volume paths accordingly to your needs)

Then (while in the folder where your docker-compose.yml file is located) run:

	$ docker-compose up -d

Environment variables

Like in the above example, you can tune the default behavior of the gateway, by passing some environment variables (either directly with -e or in your docker-compose file

  • OGN_GATEWAY_PLUGINS_FOLDER - in order to change the default plugins folder (by default is plugins subfolder of the ogn-gateway)
  • OGN_GATEWAY_IGC_FOLDER - in order to log the IGC files elswhere (i.e. not in the default logs/igc subfolder)
  • OGN_GATEWAY_IGC_ENABLED - value: true/false. In order to disable IGC logging (enabled by default)
  • OGN_GATEWAY_LOG_DIR - in order to set the output folder where the gateway should be logging (note this is the folder inside the container)
  • OGN_GATEWAY_SIMULATION - false by default. If true the gateway will subscribe to OGN data flow, but will not forward beacons to any plugins
  • OGN_GATEWAY_DDB_URL -
  • OGN_GATEWAY_DDB_REFRESH_INTERVAL -

List of additional parameters which can be passed and which will tune the connection to OGN server:

ogn client optional parameters

  • OGN_CLIENT_SRV_NAME - use if you want to specify the server to be used by the gateway to connect to. By default it connects to aprs.glidernet.org, but you might want e.g. to specify the exact instance (e.g. glidern1.glidernet.org)
  • OGN_CLIENT_SRV_PORT_UNFILTERED - if you need to change the default port or the unfiltered subscription
  • OGN_CLIENT_SRV_PORT_FILTERED - if you need to change the default port or the filtered subscription
  • OGN_CLIENT_SRV_RECONNECTION_TIMEOUT - if you need to change the default re-connection timeout
  • OGN_CLIENT_APP_NAME - if you want to change the application name which is passed to the server at login time ( by default it is ogn-client-java )
  • OGN_CLIENT_APP_VERSION - if you want to specify the application version to be used when logging to APRS server
  • OGN_CLIENT_KEEP_ALIVE_INTERVAL - if you want to change the default keep alive interval (usually no need though..)
  • OGN_CLIENT_APRS_FILTER - in order to set the APRS filter (e.g. to narrow down the subscription area). By default no filter is passed (i.e. the gateway subscribes to the world-wide data). See APRS filters for more details on APRS filters.
  • OGN_CLIENT_ID - if you want to precise under which client id your gateway should connect to the APRS server (note max 9 chars allowed, if longer it will be truncated). If not set, the client will generate appropriate name based on your host name.
  • OGN_CLIENT_VALIDATE - set to true if you want your client to be authenticated/validated by the OGN server (no need for read-only subscriptions)
  • OGN_CLIENT_USE_SSL - set to true if you want your client to connect over TLS/SSL

License

This project is MIT Licensed.

Tag summary

Content type

Image

Digest

Size

59.7 MB

Last updated

about 8 years ago

docker pull ogndocker/ogn-gateway-java