node-triton
node-triton copied to clipboard
Set TRITON_* env vars via `triton env`
triton env sets a number of useful environment variables so that other applications can interact with Triton based on the selected (or specified) profile in node-triton. For example:
$ triton env us-east-1
# triton
export TRITON_PROFILE="us-east-1"
# docker
export DOCKER_CERT_PATH=<path>
export DOCKER_HOST=tcp://us-east-1.docker.joyent.com:2376
export DOCKER_TLS_VERIFY=1
export COMPOSE_HTTP_TIMEOUT=300
# smartdc
export SDC_URL="https://us-east-1.api.joyent.com"
export SDC_ACCOUNT="<username>"
unset SDC_USER
export SDC_KEY_ID="<key fingerprint>"
unset SDC_TESTING
# Run this command to configure your shell:
# eval "$(triton env us-east-1)"
The typical consumer of these vars has been understood to be the Docker CLI and legacy smartdc tools, but other consumers can include Hashicorp's Terraform and Packer, as well as other tools. It would be very preferable to use TRITON_* variables in those applications, rather than the legacy SDC_* variable names. Perhaps the following could all be set?
# triton
export TRITON_PROFILE="us-east-1"
export TRITON_URL="https://us-east-1.api.joyent.com"
export TRITON_ACCOUNT="<username>"
unset TRITON_USER
export TRITON_KEY_ID="<key fingerprint>"
unset TRITON_TESTING
The linked tickets in 68e5b685832293bff25c888733c963dbcbe9ed6e for context on the current state of affairs.