Environment Variables
The Genvid MILE SDK uses many environment variables for its configuration. Some of the key variables are defined below.
- AZURE_RESOURCE_GROUP
The name of the resource group to be used for Azure.
- AZURE_STORAGE_ACCOUNT
Contains the name of Azure Storage Account to use. If not set, a storage account will be created automatically. Defaults to
bastion_id-First_8_characters_of_tenantID
.
- BINDIR
A variable pointing to the binaries directory (named
bin
) underGENVID_SDK_FOLDER
.Deprecated since version 1.40.0: Use
GENVID_SDK_FOLDER/bin`
orGENVID_TOOLBOX_FOLDER/bin
.
- CONSUL_HTTP_ADDR
The Consul client address, not including the protocol. Our applications and SDK will respect it if present.
- CURDIR
A variable used by the script to communicate the current directory location. It is likely to be deprecated in the near future.
Deprecated since version 1.39.0: Variable is too unpredicatable and dangerous. Use
os.getcwd()
instead.
- DOCKER_MACHINE_NAME
The Docker host machine name. When set, it allows the
genvid.toolbox.DockerTool
to connect to the Docker host using docker-machine. If not set, the default client will be used instead.
- GENVID_BASTION_BINDING_PORT
The port used for binding the bastion-api service. Default to 8092. See also
GENVID_DEFAULT_IP
,GENVID_BASTION_URL
.New in version 1.12.0.
Deprecated since version 1.45.0: The variable is superceded with proper configuration of Traefik instead. See Traefik Configuration for more details.
- GENVID_BASTION_CONFIG_FOLDER
Folder containing the configuration loaded on the bastion during installation.
Defaults to
GENVID_TOOLBOX_FOLDER/bastion-services/config
.New in version 1.31.0.
- GENVID_BASTION_ID
ID of the currently running bastion, present in all rendering tasks of the Bastion API and Cluster API.
See also
Important
Tasks that are launched by the bastion are not automatically relaunched if the bastion ID is changed to avoid spurious restart.
New in version 1.33.0.
- GENVID_BASTION_INIT_FOLDER
Folder where the bastion init configuration is found. See
setup_jobs()
for more details.New in version 1.29.0.
- GENVID_BASTION_JOB_TEMPLATE_FOLDER
Folder containing the job template definition loaded on the bastion during installation.
Defaults to
GENVID_TOOLBOX_FOLDER/bastion-services/templates
.New in version 1.31.0.
- GENVID_BASTION_STATIC_DIR
The static directory of the Bastion-API that contains the API schemas.
New in version 1.20.0.
- GENVID_BASTION_URL
A variable used by the script to communicate with the bastion-api. The system will use Consul discovery by default.
New in version 1.11.0.
Changed in version 1.45.0: The API is now exposed under Traefik, and should include the proper prefix (
/bastion
). For example, if previously, the URL washttp://mybastion.example.com:8192
, it should be nowhttp://mybastion.example.com/bastion:8081/bastion
.See also
- GENVID_CHECKIP_URL
This URL must point to a method returning your external IP address. It is mostly used to set the default
trusted_cidr
in the local Bastion, to give access to the remote servers. The default value is set according toCHECKIP_URL
.New in version 1.19.0.
- GENVID_CLUSTER_ID
ID of the cluster that will be used by default by the toolbox applications. It is also present for any template rendering of the Cluster API.
New in version 1.21.0.
Changed in version 1.33.0: Standardized its usage on the Cluster API too.
- GENVID_DEFAULT_IP
Overrides the default IP of 127.0.0.1 for binding the services locally. The usage of this variable is explained in the Setting the Local IP section.
- GENVID_DOCKER_API_TIMEOUT
Set the timeout in seconds of the Docker API used by
DockerTool
. Default to 120 seconds.New in version 1.34.0.
- GENVID_PROFILE
The named profile that should be used. If this environment variable is defined, the specified profile must exist in one of the paths defined by
GENVID_PROFILES_PATH
.See also
New in version 1.20.0.
- GENVID_PROFILE_PATH
The profile currently loaded or the empty string if no profile is in use.
See also
New in version 1.20.0.
- GENVID_PROFILES_PATH
An
os.pathsep
separated list of paths which defines in which order and where we search for a named profile. The paths may point to either regular files or directories.See also
New in version 1.20.0.
- GENVID_SDK_FOLDER
This variable points to the SDK install directory.
New in version 1.39.0.
- GENVID_SDK_SETTINGS_SCHEMA
The path with the default settings-schema loaded for this SDK. This value is only used by the
genvid-sdk setup
command.New in version 1.41.0.
- GENVID_SDK_VERSION
This variable contains the current SDK version installed under
GENVID_SDK_FOLDER
.New in version 1.39.0.
- GENVID_SERVICES_DATADIR
This variable indicates the location of the data directory for the Bastion supervision services.
- GENVID_STARTUP_TIMEOUT
The timeout used by genvid-bastion for launching the supervisor services.
- GENVID_STATIC_BINDING
This variable is used inside the local Nomad templates (under
bastion-services/templates
) to allocate a fixed port for each service. The service uses a port allocated dynamically by nomad if not set.
- GENVID_TEMPLATE_SANDBOX_PATH
The sandbox path where the sources for the template is copied when calling
POST /template_renderer
.New in version 1.33.0.
- GENVID_TEMPLATE_TIMEOUT
Internal variable for Bastion API and Cluster API that configure the rendering time behaviour of consul-template internally. Default to 2 seconds.
- GENVID_TOOLBOX_FOLDER
This variable points to the Toolbox installation directory.
New in version 1.39.0.
- GENVID_TOOLBOX_LOGFORMAT
The default log format of the scripts. It follows the format options of the
logging.Formatter
.
- GENVID_TOOLBOX_LOGLEVEL
The default logging level of the scripts.
- GENVID_TOOLBOX_VERSION
The version of the installed toolbox.
- GENVID_VAULT_POLICIES_FOLDER
The folder where Vault can find its policies. See
genvid.toolbox.VaultTool.vault_load_policies()
.
- GENVID_VAULT_TOKEN_ROLES_FOLDER
The folder where Vault can find its roles. See
genvid.toolbox.VaultTool.vault_load_roles()
.
- GENVID_VERBOSE_EXCEPTIONS
If set to
1
, the Python toolbox will show the full stack trace for exceptions instead of the default compact output.
- HOME
A variable to the user home directory. Usually points to
USERPROFILE
on Windows.
- PROJECTDIR
This variable is set by the sample scripts to the value of their current directory. Used mostly to set the location of binaries in the local environment.
- PYTHON_EXECUTABLE
A variable pointing to the current Python executable in the Toolbox.
- ROOTDIR
This variable is now deprecated and will be set to the same value as
GENVID_SDK_FOLDER
if not already set. Otherwise, it will be ignored.Deprecated since version 1.39.0: Use
GENVID_SDK_FOLDER
instead.
- VAULT_ADDR
The address to the Vault service.
- VAULT_KEYS
The keys used to unseal Vault.
- VAULT_TOKEN
The token used to connect to Vault.
- VAULT_TOKEN_FILE
The path of the file where the Vault token is saved.
- VAULT_KEYS_FILE
The path of the file where the Vault keys are saved.