The Catalyst Tak Adapter is a service designed to bridge TAK environments to a rich data integration fabric.
You can use the following commands (via bun run <command>
or npm run <command>
if using npm):
Command | Description |
---|---|
start |
Start the adapter (index.ts ). |
dev |
Start the adapter in watch mode for development. |
config:template |
Generate a template config file (config.template.toml ). |
test |
Run all tests. |
testw |
Run all tests in watch mode. |
docker-compose |
Start the app and dependencies using Docker Compose. |
build |
Build the Docker image for the adapter. |
prepare |
Run Husky (for preparing git hooks, e.g., pre-commit hooks). |
-
Build the project:
# Using bun bun run build # Using docker docker build -t catalyst-tak-adapter .
-
Prepare required files:
- Configuration file (
config.toml
or custom path) - TAK key and certificates in PEM format
- Storage volume (optional)
Tip:
- You can generate a template config file with:
bun run config:template # This will create config.template.toml in the project root
- An example config is provided as
config.example.toml
. - You can override the config file location by setting the
CONFIG_PATH
environment variable.
- Configuration file (
-
Run the container:
bun run docker-compose
- The adapter loads configuration from a TOML file (default:
config.toml
in the root, or as set byCONFIG_PATH
). - Secrets (such as tokens, keys, and sensitive endpoints) can be provided via environment variables. These take precedence over values in the config file.
- Required secret environment variables for deploymet on Fly.io:
FLY_SECRET_TAK_KEY_FILE
FLY_SECRET_TAK_CERT_FILE
FLY_SECRET_TAK_ENDPOINT
FLY_SECRET_TAK_CONNECTION_ID
FLY_SECRET_CONSUMER_CATALYST_TOKEN
FLY_SECRET_CONSUMER_CATALYST_QUERY
FLY_SECRET_PRODUCER_CATALYST_APP_ID
- Required secret environment variables for deploymet on Fly.io:
- See Configuration Guide for all options, defaults, and environment variables.
-
Set up the TAK development server
- See Development Guide for full instructions.
- Clone the CLOUD-RF Tak-Server repo and follow the steps to download and set up the TAK server Docker image.
- Get your local IP address (for Mac):
ipconfig getifaddr en0
- Run the setup script and use your IP address (not localhost).
-
Configure browser certificates
- Use Firefox for development.
- Import the
.p12
certificate into Firefox (Settings > Privacy & Security > Certificates). - Trust the CA for TAK.
-
Prepare adapter credentials
-
Copy TAK user credentials into the adapter directory as
key.pem
andcert.pem
. -
Decrypt the user key if needed:
openssl rsa -in key.pem -out key.pem # Password: atakatak (default)
-
-
Run the adapter locally
bun run index.ts
The Dockerfile has been updated to support certificate and key file configuration during build time:
ARG TAK_CERT_FILE=tak-admin.cert.pem
ARG TAK_KEY_FILE=tak-admin.key.pem
You can override these defaults during build:
docker build \
--build-arg TAK_CERT_FILE=your-cert.cert.pem \
--build-arg TAK_KEY_FILE=your-key.key.pem \
-t catalyst-tak-adapter .
Prerequisites:
- Fly.io account and CLI installed
- Project configured for Fly.io deployment
- TAK certificates and keys ready
Deployment Steps:
-
Set up Fly.io configuration:
fly launch
-
Configure certificate files:
- Ensure your certificate files follow the naming convention:
- Certificate:
*.cert.pem
- Key:
*.key.pem
- Certificate:
- Ensure your certificate files follow the naming convention:
-
Deploy with certificate configuration:
fly deploy \ --build-arg TAK_CERT_FILE=your-cert.cert.pem \ --build-arg TAK_KEY_FILE=your-key.key.pem
-
Set required secrets:
bun run fly-secrets.ts
For detailed deployment instructions and advanced options, see the Deployment Guide.
Detailed documentation is available in the docs directory:
- Development Guide - Setup, architecture, and contribution guidelines
- Configuration Guide - Detailed configuration options, environment variables, and examples
- Deployment Guide - Deployment instructions and best practices
For a complete configuration reference and advanced usage scenarios, please refer to the documentation.