github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/deploy/dev/local/aisnode_config.sh (about)

     1  # NOTE: system environment variables are listed in the `env` package,
     2  # see https://github.com/NVIDIA/aistore/blob/main/api/env/README.md
     3  
     4  backend_desc=()
     5  for backend in ${AIS_BACKEND_PROVIDERS}; do
     6    case $backend in
     7      aws)   backend_desc+=('"aws":   {}') ;;
     8      azure) backend_desc+=('"azure": {}') ;;
     9      gcp)   backend_desc+=('"gcp":   {}') ;;
    10    esac
    11  done
    12  
    13  cat > $AIS_CONF_FILE <<EOL
    14  {
    15  	"backend": {$(IFS=$','; echo "${backend_desc[*]}")},
    16  	"mirror": {
    17  		"copies":       2,
    18  		"burst_buffer": 128,
    19  		"enabled":      ${AIS_MIRROR_ENABLED:-false}
    20  	},
    21  	"ec": {
    22  		"objsize_limit":	${AIS_OBJ_SIZE_LIMIT:-262144},
    23  		"compression":		"${AIS_EC_COMPRESSION:-never}",
    24  		"bundle_multiplier":	${AIS_EC_BUNDLE_MULTIPLIER:-2},
    25  		"data_slices":		${AIS_DATA_SLICES:-1},
    26  		"parity_slices":	${AIS_PARITY_SLICES:-1},
    27  		"enabled":		${AIS_EC_ENABLED:-false},
    28  		"disk_only":		false
    29  	},
    30  	"log": {
    31  		"level":     "${AIS_LOG_LEVEL:-3}",
    32  		"max_size":  "4mb",
    33  		"max_total": "128mb",
    34  		"flush_time": "40s",
    35  		"stats_time": "60s"
    36  	},
    37  	"periodic": {
    38  		"stats_time":        "10s",
    39  		"notif_time":        "30s",
    40  		"retry_sync_time":   "2s"
    41  	},
    42  	"timeout": {
    43  		"cplane_operation":     "2s",
    44  		"max_keepalive":        "4s",
    45  		"max_host_busy":        "20s",
    46  		"startup_time":         "1m",
    47  		"join_startup_time":    "3m",
    48  		"send_file_time":       "5m"
    49  	},
    50  	"client": {
    51  		"client_timeout":      "10s",
    52  		"client_long_timeout": "10m",
    53  		"list_timeout":        "1m"
    54  	},
    55  	"proxy": {
    56  		"primary_url":   "${AIS_PRIMARY_URL}",
    57  		"original_url":  "${AIS_PRIMARY_URL}",
    58  		"discovery_url": "${AIS_DISCOVERY_URL}",
    59  		"non_electable": ${AIS_NON_ELECTABLE:-false}
    60  	},
    61  	"space": {
    62  		"cleanupwm":         65,
    63  		"lowwm":             75,
    64  		"highwm":            90,
    65  		"out_of_space":      95
    66  	},
    67  	"lru": {
    68  		"dont_evict_time":   "120m",
    69  		"capacity_upd_time": "10m",
    70  		"enabled":           true
    71  	},
    72  	"disk":{
    73  	    "iostat_time_long":  "${AIS_IOSTAT_TIME_LONG:-2s}",
    74  	    "iostat_time_short": "${AIS_IOSTAT_TIME_SHORT:-100ms}",
    75  	    "disk_util_low_wm":  20,
    76  	    "disk_util_high_wm": 80,
    77  	    "disk_util_max_wm":  95
    78  	},
    79  	"rebalance": {
    80  		"dest_retry_time":	"2m",
    81  		"compression":     	"${AIS_REBALANCE_COMPRESSION:-never}",
    82  		"bundle_multiplier":	${AIS_REBALANCE_BUNDLE_MULTIPLIER:-2},
    83  		"enabled":         	true
    84  	},
    85  	"resilver": {
    86  		"enabled": true
    87  	},
    88  	"checksum": {
    89  		"type":			"xxhash",
    90  		"validate_cold_get":	false,
    91  		"validate_warm_get":	false,
    92  		"validate_obj_move":	false,
    93  		"enable_read_range":	false
    94  	},
    95  	"transport": {
    96  		"max_header":		4096,
    97  		"burst_buffer":		512,
    98  		"idle_teardown":	"${AIS_TRANSPORT_IDLE_TEARDOWN:-4s}",
    99  		"quiescent":		"${AIS_TRANSPORT_QUIESCENT:-10s}",
   100  		"lz4_block":		"${AIS_TRANSPORT_LZ4_BLOCK:-256kb}",
   101  		"lz4_frame_checksum":	${AIS_TRANSPORT_LZ4_FRAME_CHECKSUM:-false}
   102  	},
   103  	"memsys": {
   104  		"min_free":		"2gb",
   105  		"default_buf":		"32kb",
   106  		"to_gc":		"2gb",
   107  		"hk_time":		"90s",
   108  		"min_pct_total":	0,
   109  		"min_pct_free":		0
   110  	},
   111  	"versioning": {
   112  		"enabled":           true,
   113  		"validate_warm_get": false
   114  	},
   115  	"net": {
   116  		"l4": {
   117  			"proto":              "tcp",
   118  			"sndrcv_buf_size":    ${SNDRCV_BUF_SIZE:-131072}
   119  		},
   120  		"http": {
   121  			"use_https":         ${AIS_USE_HTTPS:-false},
   122  			"server_crt":        "${AIS_SERVER_CRT:-server.crt}",
   123  			"server_key":        "${AIS_SERVER_KEY:-server.key}",
   124  			"domain_tls":        "",
   125  			"client_ca_tls":     "${AIS_CLIENT_CA_TLS}",
   126  			"client_auth_tls":   ${AIS_CLIENT_AUTH_TLS:-0},
   127  			"write_buffer_size": ${HTTP_WRITE_BUFFER_SIZE:-0},
   128  			"read_buffer_size":  ${HTTP_READ_BUFFER_SIZE:-0},
   129  			"chunked_transfer":  ${AIS_HTTP_CHUNKED_TRANSFER:-true},
   130  			"skip_verify":       ${AIS_SKIP_VERIFY_CRT:-false}
   131  		}
   132  	},
   133  	"fshc": {
   134  		"enabled":     true,
   135  		"test_files":  4,
   136  		"error_limit": 2
   137  	},
   138  	"auth": {
   139  		"secret":      "$AIS_SECRET_KEY",
   140  		"enabled":     ${AIS_AUTHN_ENABLED:-false}
   141  	},
   142  	"keepalivetracker": {
   143  		"proxy": {
   144  			"interval": "10s",
   145  			"name":     "heartbeat",
   146  			"factor":   3
   147  		},
   148  		"target": {
   149  			"interval": "10s",
   150  			"name":     "heartbeat",
   151  			"factor":   3
   152  		},
   153  		"retry_factor":   4
   154  	},
   155  	"downloader": {
   156  		"timeout": "1h"
   157  	},
   158  	"distributed_sort": {
   159  		"duplicated_records":    "ignore",
   160  		"missing_shards":        "ignore",
   161  		"ekm_malformed_line":    "abort",
   162  		"ekm_missing_key":       "abort",
   163  		"default_max_mem_usage": "80%",
   164  		"call_timeout":          "10m",
   165  		"dsorter_mem_threshold": "100GB",
   166  		"compression":           "${AIS_DSORT_COMPRESSION:-never}",
   167  		"bundle_multiplier":	 ${AIS_DSORT_BUNDLE_MULTIPLIER:-4}
   168  	},
   169  	"tcb": {
   170  		"compression":		"never",
   171  		"bundle_multiplier":	2
   172  	},
   173  	"write_policy": {
   174  		"data": "${WRITE_POLICY_DATA:-}",
   175  		"md": "${WRITE_POLICY_MD:-}"
   176  	},
   177  	"features": "0"
   178  }
   179  EOL
   180  
   181  cat > $AIS_LOCAL_CONF_FILE <<EOL
   182  {
   183  	"confdir": "${AIS_CONF_DIR:-/etc/ais/}",
   184  	"log_dir": "${AIS_LOG_DIR:-/tmp/ais$NEXT_TIER/log}",
   185  	"host_net": {
   186  		"hostname":                 "${HOSTNAME_LIST}",
   187  		"hostname_intra_control":   "${HOSTNAME_LIST_INTRA_CONTROL}",
   188  		"hostname_intra_data":      "${HOSTNAME_LIST_INTRA_DATA}",
   189  		"port":               "${PORT:-8080}",
   190  		"port_intra_control": "${PORT_INTRA_CONTROL:-9080}",
   191  		"port_intra_data":    "${PORT_INTRA_DATA:-10080}"
   192  	},
   193  	"fspaths": {
   194  		$AIS_FS_PATHS
   195  	},
   196  	"test_fspaths": {
   197  		"root":     "${TEST_FSPATH_ROOT:-/tmp/ais$NEXT_TIER/}",
   198  		"count":    ${TEST_FSPATH_COUNT:-0},
   199  		"instance": ${INSTANCE:-0}
   200  	}
   201  }
   202  EOL
   203  
   204  cat > $STATSD_CONF_FILE <<EOL
   205  {
   206  	graphitePort: ${GRAPHITE_PORT:-2003},
   207  	graphiteHost: "${GRAPHITE_SERVER:-localhost}"
   208  }
   209  EOL
   210  
   211  cat > $COLLECTD_CONF_FILE <<EOL
   212  LoadPlugin df
   213  LoadPlugin cpu
   214  LoadPlugin disk
   215  LoadPlugin interface
   216  LoadPlugin load
   217  LoadPlugin memory
   218  LoadPlugin processes
   219  LoadPlugin write_graphite
   220  
   221  <Plugin syslog>
   222  	LogLevel info
   223  </Plugin>
   224  
   225  <Plugin df>
   226  	FSType rootfs
   227  	FSType sysfs
   228  	FSType proc
   229  	FSType devtmpfs
   230  	FSType devpts
   231  	FSType tmpfs
   232  	FSType fusectl
   233  	FSType cgroup
   234  	IgnoreSelected true
   235  	ValuesPercentage True
   236  </Plugin>
   237  
   238  <Plugin write_graphite>
   239  	<Node "graphiting">
   240  		Host "${GRAPHITE_SERVER:-localhost}"
   241  		Port "${GRAPHITE_PORT:-2003}"
   242  		Protocol "tcp"
   243  		LogSendErrors true
   244  		StoreRates true
   245  		AlwaysAppendDS false
   246  		EscapeCharacter "_"
   247  	</Node>
   248  </Plugin>
   249  
   250  <Include "/etc/collectd/collectd.conf.d">
   251  	Filter "*.conf"
   252  </Include>
   253  EOL