Review Compose Stack Files

Nucleus Stack Compose Settings (.env) File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
################################################################################
## Required configuration
################################################################################

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !! IMPORTANT - you MUST set EXTERNAL_IP_OR_HOST, 
# !! or nothing will work.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

# Set this to (preferrably) a hostname or an IP address of the server 
# that will be used by the users to access it. 

EXTERNAL_IP_OR_HOST=my-server

# Instance name
INSTANCE_NAME=my_omniverse

################################################################################
## Advanced
################################################################################

# Default "internal" network for containers. 
# Modify this if it conflicts with your environment. 

CONTAINER_SUBNET=192.168.2.0/26

# Set this variable to where you want Nuceleus Data to be. 
# Make sure the right kind of disk, and enough of diskspace, are available.

DATA_ROOT=/var/lib/omni/nucleus-data

# Nucleus API port. All OV Clients assume 3009 by default.
API_PORT=3009

# Large File Transfer Service Port. Can be anything.
LFT_PORT=3030

# Web UI Port
WEB_PORT=80

# Prometheus Metrics
METRICS_PORT=3010
Nucleus Stack Compose File
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
################################################################################
################################################################################
################################################################################
#
# This Compose file will bring up the Omniverse Nucleus stack, consisting of:
#
# * API Service
# * LFT (Large File Transfer) Service
# * Web UI
# * Thumbnail Service
# * Snapshot Service
# * Indexing Service
# * Some additional utility sidecars
#
# Omniverse API will bind to port 3009, 
# Web will bind to 80, and
# metrics for scraping with Prometheus will be on port 3010. 
#
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
# It is of utmost importance to configure EXTERNAL_IP_OR_HOST
# variable in the nucleus-stack.env to be set to the correct value. 
# Otherwise, you will have issues with uploads, downloads, and Web UI.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 

version: "3.7"

networks: 
  default: 
    ipam:
      config: 
        - subnet: "${CONTAINER_SUBNET}"

services: 

  ############################
  # Main (Core) Nucleus Stack
  ############################

  nucleus-api:

    image: nvcr.io/omniverse/public/nucleus-api:107.6
    restart: always
    environment:
        - OV_INSTANCE=${INSTANCE_NAME}
        - OV_CONTENT_RAM_SZ=6

        - OV_LFTADDRESS=http://${EXTERNAL_IP_OR_HOST}:${LFT_PORT}
        - OV_LFTTHRESHOLD=262144
        - OV_LAUNCHER_PROMETHEUS_PORT=9500

        - OV_METRICS_PREFIX=test_omni_api

        - OV_S3_RESOLVER_CACHE=http://nucleus-resolver-cache:80
    volumes:
        - ${DATA_ROOT}/log/api:/omni/log
        - ${DATA_ROOT}/data:/omni/data
    ports:
        - "${API_PORT}:3009"
           
  nucleus-lft:
    image: nvcr.io/omniverse/public/nucleus-lft:107.6
    restart: always
    volumes:
        - ${DATA_ROOT}/log/lft:/omni/log
        - ${DATA_ROOT}/data:/omni/data
    ports:
        - "${LFT_PORT}:3030"

  nucleus-log-processor:
    image: nvcr.io/omniverse/public/nucleus-log-processor:107.6
    restart: always
    environment: 
       - OV_INSTANCE=${INSTANCE_NAME}
       - OV_PROCESS_LFT_LOGS=1
    volumes:
       - ${DATA_ROOT}/log:/omni/log
       - /proc:/proc

  nucleus-resolver-cache:
    image: nvcr.io/omniverse/public/nucleus-resolver-cache:107.6
    restart: always
    volumes:
       - ${DATA_ROOT}/resolver-cache:/var/lib/nginx/cache
       - ${DATA_ROOT}/log/resolver-cache:/omni/log

  resolver-cache-stats-exporter:
    image: ctbackend/nginx-prometheus-exporter:0.5.0
    restart: always
    command: ["-nginx.scrape-uri", "http://nucleus-resolver-cache/basic_status"]
    environment:
        - CONST_LABELS=omni_instance=${INSTANCE_NAME},omni_service=s3_resolver_cache

  resolver-cache-logrotate:
    image: graffic/logrotate:1.4
    restart: always
    volumes:
       - ${DATA_ROOT}/log/resolver-cache:/omni/log
    environment:
      LOGROTATE_PATTERN: "/omni/log/*.log"
      LOGROTATE_OPTIONS: |-
        size 100M
        compress

  utl-monpx:
    image: nvcr.io/omniverse/public/utl-monpx:107.6
    restart: always
    environment:
       OV_MONPX_SCRAPE_URLS: http://nucleus-api:9500/metrics;http://nucleus-api:3010/metrics;http://nucleus-log-processor:9500/metrics;http://resolver-cache-stats-exporter:9113/metrics
       OV_DS_BLACKLIST_PATH: /omni/data/PathBlackList.json
    volumes:
       - ${DATA_ROOT}/data:/omni/data
    ports:
       - "${METRICS_PORT}:8080"

  #####################
  # Web
  #####################
 
  nucleus-web-ui:
    image: nvcr.io/omniverse/public/nucleus-web-ui:2.1.0
    restart: always
    tty: true
    environment:
      - OV_DEFAULT_SERVER=${EXTERNAL_IP_OR_HOST}
      - OV_DEBUG=False
      - USE_PASSWORDS=True
      - SUPPORTS_SNAPSHOTS=True
      - SUPPORTS_SEARCH=True
      - SUPPORTS_TOOL_MANAGEMENT=False
      - SUPPORTS_USER_MANAGEMENT=True
      - SUPPORTS_ASSET_CONVERTER=True
      - SUPPORTS_MOUNTS=True
    ports:
      - "${WEB_PORT}:80"

  #####################
  # Additional Services
  #####################

  nucleus-thumbnails: 
    image: nvcr.io/omniverse/public/nucleus-thumbnails:1.2.3
    restart: always
    volumes:
        - ${DATA_ROOT}/log/thumbnails:/omni/log
    environment:
        - OV_SERVER=${EXTERNAL_IP_OR_HOST}
        - OV_USERNAME=thumbnails_service_user
        - OV_PASSWORD=thumbnails_service_user_password
        - OV_MEMORY_RESERVE=256
        - OV_MEMORY_LIMIT=4096
        - OV_CPU_RESERVE=0.25
        - OV_CPU_LIMIT=1
        - OV_STACK_PROMETHEUS_PORT=2001
        - OV_HOST_NAME=
        - OV_INSTANCE_NAME=${INSTANCE_NAME}
        - OV_LOGFILE=/omni/log/create_thumbnails.log
  # ---
  nucleus-index:
    image: nvcr.io/omniverse/public/nucleus-index:1.2.0
    restart: always
    tty: true
    environment:
      - OV_SERVER=${EXTERNAL_IP_OR_HOST}
      - OV_LOG=

  # ---
  nucleus-snapshots:
    image: nvcr.io/omniverse/public/nucleus-snapshots:1.0.1
    restart: always
    tty: true
    environment:
      - OV_SERVER=${EXTERNAL_IP_OR_HOST}
      - OV_LOG=False