Client Environment Variables

The Scaleout Edge Python client can be configured through environment variables. These are defined in scaleout-util and apply when running a client via the Command-Line Interface (CLI) or the Python SDK.

Variables that turn something on or off accept true, false, 1, 0, yes, no, on and off, in any case. An empty variable gives the default. For any other value, the client logs a warning and uses the default.

Variable

Default

Description

SCALEOUT_ARCHIVE_DIR

.scaleout/package_archive

Directory where the client stores downloaded compute package archives.

SCALEOUT_AUTH_SCHEME

Bearer

HTTP authentication scheme used in the Authorization header when calling the API.

SCALEOUT_CONNECT_API_SECURE

true

Deprecated: trust the deployment’s certificate with SCALEOUT_TLS_CA_PATH instead (see Trusting a self-signed or private-CA certificate). Set to false to turn certificate verification off for REST API requests.

SCALEOUT_GRPC_SECURE

(unset)

Deprecated: leave it unset, or set SCALEOUT_TLS_MODE=required to always use TLS. Whether the edge client uses TLS for its gRPC connection to the combiner (true/false).

SCALEOUT_GRPC_ROOT_CERT_PATH

(unset)

Deprecated: set SCALEOUT_TLS_CA_PATH to the same file instead. Path to a CA certificate (PEM) trusted for the gRPC connection to the combiner only.

SCALEOUT_TLS_CA_PATH

(unset)

Path to the CA certificate (PEM) that signed the deployment’s certificate. For a self-signed certificate, the certificate itself. Used for every connection to the deployment. When unset, the system’s CA certificates are used. scaleout get-ca can save the file (see Trusting a self-signed or private-CA certificate). Same as scaleout --tls-ca.

SCALEOUT_TLS_MODE

auto

Whether the client may connect without TLS. auto, the default, uses TLS when the deployment does. required uses TLS for every connection and refuses an http:// deployment URL. Same as scaleout --tls-mode.

SCALEOUT_TLS_CERT_PATH

(unset)

Path to a client certificate (PEM), for a deployment that requires one. It is sent on every connection to the deployment. Set it together with SCALEOUT_TLS_KEY_PATH. If the certificate has an extended key usage extension, it must include client authentication (clientAuth). Same as scaleout --tls-cert.

SCALEOUT_TLS_KEY_PATH

(unset)

Path to the unencrypted private key (PEM) of the client certificate. Same as scaleout --tls-key.

SCALEOUT_CUSTOM_URL_PREFIX

(empty)

URL prefix prepended to all API requests. Useful when the API is hosted under a sub-path.

SCALEOUT_PACKAGE_EXTRACT_DIR

package

Directory where the client extracts the downloaded compute package.

SCALEOUT_GRACEFUL_GRPC_HANDLING

true

Whether the client handles gRPC disconnections gracefully and attempts reconnection (true/false).

SCALEOUT_CHECK_COMPATIBILITY

true

Whether the client checks version compatibility with the server on connect (true/false).

SCALEOUT_CLIENT_STATUS_REPORTING

true

Whether the client sends status updates to the server during commands (true/false).

SCALEOUT_CLIENT_SEND_TELEMETRY

true

Whether the client sends telemetry data, CPU and memory usage (true/false).

SCALEOUT_CLIENT_TASK_POLLING_INTERVAL

5

Interval in seconds between task polling requests from the client to the server. Lower values may reduce task start latency but increase API load.

SCALEOUT_VENV_DIR

.scaleout/venvs

Directory where the client creates virtual environments from the compute package’s python_env.yaml.

Usage example

Set variables before starting the client:

  • Unix/MacOS
  • Windows (PowerShell)
  • Windows (CMD)
export SCALEOUT_PACKAGE_EXTRACT_DIR=/tmp/package
export SCALEOUT_CLIENT_TASK_POLLING_INTERVAL=10
scaleout client start --api-url <DEPLOYMENT_URL> --token <TOKEN>
$env:SCALEOUT_PACKAGE_EXTRACT_DIR="/tmp/package"
$env:SCALEOUT_CLIENT_TASK_POLLING_INTERVAL="10"
scaleout client start --api-url <DEPLOYMENT_URL> --token <TOKEN>
set SCALEOUT_PACKAGE_EXTRACT_DIR=/tmp/package
set SCALEOUT_CLIENT_TASK_POLLING_INTERVAL=10
scaleout client start --api-url <DEPLOYMENT_URL> --token <TOKEN>

Trusting a self-signed or private-CA certificate

The client always verifies the deployment’s certificate, on every connection. To connect to a deployment with a self-signed certificate, or a certificate from a private CA, give the client the CA certificate to trust:

  • Self-signed certificate: the certificate is its own CA certificate. scaleout get-ca saves it.

  • Private CA: pass the CA’s root certificate. scaleout get-ca saves it when the server sends it, or when the server’s certificate names a URL to download it from. Otherwise, ask whoever runs the CA for it. The server’s own certificate does not work in its place.

scaleout get-ca https://<hostname> ca.pem
scaleout --tls-ca ca.pem client start --api-url https://<hostname> --token <TOKEN>

The --tls-* options belong to the top-level scaleout command and come before the subcommand. A command-line option overrides the matching environment variable.

scaleout get-ca prints the CA certificate’s SHA-256 fingerprint. Compare it with the one the deployment’s operator gives before trusting the file. When verification fails, the client says why and shows these commands.

Note

Boolean variables accept true or false (case-insensitive).

See also

Command-Line Interface (CLI) for the full list of scaleout client commands.