diff --git a/.github/workflows/github-actions-test.yml b/.github/workflows/github-actions-test.yml index 995b36f0..f706fa04 100644 --- a/.github/workflows/github-actions-test.yml +++ b/.github/workflows/github-actions-test.yml @@ -76,6 +76,7 @@ jobs: source ./env.template export MOCK_SIGAN=1 export MOCK_SIGAN_RANDOM=1 + export SSD_DEVICE=/dev/nvme0n1 docker compose build --no-cache docker compose up -d diff --git a/compose.yaml b/compose.yaml index 6a2bec6d..43e1ba3b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -27,7 +27,7 @@ services: interval: 6s timeout: 3s retries: 1 - shm_size: '16gb' + shm_size: ${API_SHM_SIZE} restart: always depends_on: db: @@ -95,7 +95,7 @@ services: - SYS_ADMIN # required for ^ with NVMe drives devices: - /dev/bus/usb:/dev/bus/usb:rw - - /dev/nvme0n1:/dev/nvme0n1:ro + - ${SSD_DEVICE}:/dev/nvme0n1:ro extra_hosts: - "${MANAGER_FQDN}:${MANAGER_IP}" logging: diff --git a/env.template b/env.template index cacf4bb6..592edd9c 100644 --- a/env.template +++ b/env.template @@ -2,12 +2,11 @@ # Copy env.template to env and modify - # Mark all the following variables for export set -o allexport -#Any names here will be added as additional users with the -#specified additional user password +# Any names here will be added as additional users with the +# specified additional user password ADDITIONAL_USER_NAMES="" # comma separated ADDITIONAL_USER_PASSWORD="" @@ -18,15 +17,15 @@ ADMIN_PASSWORD=password # set to CERT to enable scos-sensor certificate authentication AUTHENTICATION=TOKEN -CALIBRATION_EXPIRATION_LIMIT=360 + # Default callback api/results # Set to CERT for certificate authentication CALLBACK_AUTHENTICATION=TOKEN # Set to false to disable SSL cert verification in the callback POST request CALLBACK_SSL_VERIFICATION=false -#Set the number of seconds before timeout in postback when a scheduled -#action completes +# Set the number of seconds before timeout in postback when a scheduled +# action completes CALLBACK_TIMEOUT=2 # SECURITY WARNING: don't run with debug turned on in production! @@ -89,12 +88,22 @@ SSL_CA_PATH=scos_test_ca.crt SSL_CERT_PATH=sensor01.pem SSL_KEY_PATH=sensor01.pem +# SSD Device made available to SCOS Plugins, e.g. for getting SMART data +SSD_DEVICE=/dev/nvme0n1 + +# Size of shared memory for API container (/dev/shm), used for parallel processing +# See https://docs.docker.com/compose/compose-file/compose-file-v3/#shm_size +API_SHM_SIZE=16gb + # Calibration action selection # The action specified here will be used to attempt an onboard # sensor calibration on startup, if no onboard calibration data # is available on startup. The specified action must be available. STARTUP_CALIBRATION_ACTION=SEA_CBRS_Calibrate_Baseline +# How many seconds until calibration data is considered stale +CALIBRATION_EXPIRATION_LIMIT=3600 + # Debug dependant settings if $DEBUG; then GUNICORN_LOG_LEVEL=debug diff --git a/src/requirements.in b/src/requirements.in index e4a4f7db..05eb3f82 100644 --- a/src/requirements.in +++ b/src/requirements.in @@ -12,7 +12,7 @@ psycopg2-binary>=2.0, <3.0 tzdata # https://code.djangoproject.com/ticket/33814 requests>=2.32.0 requests-mock>=1.0, <2.0 -scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@8.0.0 +scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@scos-actions-11.1.0 # The following are sub-dependencies for which SCOS Sensor enforces a # higher minimum patch version than the dependencies which require them.