Skip to main content

Makefile

This document covers all build targets available in the Tator Makefile. To use them, issue a shell command preceded by make:

make TARGET

Docker compose

TargetDescription
clusterBuilds docker images, installs dependencies and installs compose deployment.
cluster-uninstallUninstalls compose deployment.
cluster-installInstalls compose deployment.
cluster-updateApplies changes to Docker compose configuration (defined in .env).
cluster-upgradeBuilds docker images and updates compose deployment to use latest images and configuration.
tatorAlias for cluster-install.
cleanAlias for cluster-uninstall.

Docker images

TargetDescription
imagesBuilds and pushes all Docker images.
tator-imageBuilds and pushes Tator backend image.
client-imageBuilds and pushes Tator client image.
postgis-imageBuilds and pushes PostgreSQL image with PostGIS extension.
ui-imageBuilds and pushes Tator UI image.

Monitoring and maintenance

TargetDescription
gunicorn-bashStarts shell in Gunicorn container.
gunicorn-logsStreams logs from Gunicorn container.
gunicorn-resetRestarts Gunicorn service.
nginx-bashStarts shell in NGINX container.
nginx-logsStreams logs from NGINX container.
nginx-resetRestarts NGINX service.
redis-bashStarts shell in Redis container.
redis-logsStreams logs from Redis container.
redis-resetRestarts Redis service.
ui-bashStarts shell in UI container.
ui-logsStreams logs from UI container.
ui-resetRestarts UI service.
postgis-bashStarts shell in PostgreSQL container.
postgis-logsStreams logs from PostgreSQL container.
postgis-resetRestarts PostgreSQL service.
minio-bashStarts shell in min.io container.
minio-logsStreams logs from min.io container.
minio-resetRestarts min.io service.
transcode-bashStarts shell in transcode container.
transcode-logsStreams logs from transcode container.
transcode-resetRestarts transcode service.
transcode-worker-bashStarts shell in transcode worker container.
transcode-worker-logsStreams logs from transcode worker container.
transcode-worker-resetRestarts transcode worker service.
statusRunning status of all existing Kubernetes pods.
rq-infoDisplay asynchronous DB and image worker jobs that are queued.
cleanup-evictedDeletes all Kubernetes pods with status Evicted.
announceCreate a system announcement. Requires definition of FILE and optionally USER_ID or PROJECT_ID for limiting scope. See tutorial for examples.

Database administration

TargetDescription
backupUses the pg_dump utility to create a backup of the PostgreSQL database.
restoreRestores a database backup. Requires definition of SQL_FILE and DB_NAME, e.g. make restore SQL_FILE=tator_online_2022_01_25__06_40_05_86964b646709fd2581583413383e89570b37b1d5.sql DB_NAME=tator_online. To see a list of existing backups, use make gunicorn-bash followed by ls /backup.
migrateApply PSQL database migrations associated with source in main/models.py in first Gunicorn container found.

Client generation

TargetDescription
python-bindingsBuilds Tator image and Tator Python client.
python-bindings-onlyBuilds Python client using existing generated code.
js-bindingsBuilds Tator JavaScript client.

Development

TargetDescription
dev-pushCopies all files to Gunicorn containers. Gunicorn will automatically restart when changes are detected.
collect-staticBuilds webpack bundles and copies static content to first existing Gunicorn container found.
django-shellStarts Django shell in first existing Gunicorn container found.
webpackBuilds webpack bundles.
testinitSets up first time run of REST unit tests.
testRuns REST unit tests.
pytestRuns tator-py unit tests.