View on GitHub

dss

InterUSS Platform's implementation of the ASTM DSS concept for RID and flight coordination.

Simple standalone local test/evaluation/development instance

Note that all deployment strategies below require the use of Docker.

Architecture

Architecture diagram for running local processes

When the simple standalone deployment below is used, it will construct a DSS sandbox environment consisting of:

Prerequisites

Run

Simply execute ./run_locally.sh. This will build the required Docker images if necessary and then construct the system described above.

When this system is active (log messages stop being generated), the following endpoints will be available:

In a different window, run ./check_dss.sh to run a demonstration RID query on the system. The expected output is an empty list of ISAs (no ISAs have been announced).

To perform more complicated actions manually, see the Postman collection in this folder (use with Postman).

To stop the system, just press ctrl-c or cmd-c.

Debugging Mode

run_locally.sh can also run in debugging mode, which enables debugging the Core Service code line by line with your favorite IDE. It is a very straightforward process with just 2 steps:

Step 1

Run run_locally.sh debug, we will see the local-dss-core-service starts with the DEBUG MODE: on, and the API server is listening at port : 4000.

Step 2 (One Time Effort)

Add a remote debug configuration with your favorite IDE. Here we use IntelliJ / GoLand as an example:

Enjoy!

All Set, let’s start the debug configuration created in the step 1 and we are able to debug any request sent to the local DSS endpoints hosted at localhost:8082.

run_locally.sh is a thin wrapper around a docker compose command and all the docker compose verbs may be passed to run_locally.sh. The default option is up --build which forces to re-build the local deployment images before starting the containers; however, containers can be started directly by run_locally.sh up. The system can be removed entirely with run_locally.sh down. See all docker compose verbs here.

Database migration and versioning

run_locally.sh automatically creates a database with the latest schema versions. To migrate to a different version, use migrate_local_db.sh. It accepts two arguments: the database name (rid for remote ID or scd for SCD) and the desired schema version (see db_schemas for options). The desired schema version may also be latest. For example:

./migrate_local_db.sh rid 3.1.0
./migrate_local_db.sh scd latest

If a downgrade step is not yet implemented, the database can be removed using a command like the one below, using defaultdb instead of rid if wiping remote ID prior to schema version 4.0.0, and scd instead of rid if wiping SCD:

docker container exec -i dss_sandbox-local-dss-crdb-1 cockroach sql --insecure <<< 'use postgres; drop database rid cascade;'

To just determine the current version of a database schema, simply omit the target version parameter to migrate_local_db.sh.

Data injection and verification

Prober

RID

SCD

Troubleshooting

If one or more of the necessary ports are not available, identify the process using a port with lsof -i tcp:8080.