25 lines
1 KiB
Bash
25 lines
1 KiB
Bash
#!/usr/bin/env bash
|
|
# script to set the docker, triton, manta and CNS env vars for the current triton profile
|
|
|
|
# set triton and docker host environment variables
|
|
eval "$(triton env)"
|
|
|
|
# get the user's UUID
|
|
triton_account_uuid="$(triton account get --json | json id)"
|
|
|
|
# set the CNS (container name service) base for auto-generated DNS records
|
|
# in public and private networks
|
|
# note, this makes assumptions that only work with Greenbaum's public cloud
|
|
if env | grep -q "SDC_URL=https://api.greenbaum.cloud"; then
|
|
export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.cgn-1.greenbaum.zone"
|
|
export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.cgn-1.int.greenbaum.zone"
|
|
fi
|
|
if env | grep -q "SDC_URL=https://lev-1.api.greenbaum.cloud"; then
|
|
export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.lev-1.greenbaum.zone"
|
|
export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.lev-1.int.greenbaum.zone"
|
|
fi
|
|
|
|
export MANTA_URL=https://eu-central.manta.greenbaum.cloud
|
|
export MANTA_USER=$SDC_ACCOUNT
|
|
export MANTA_KEY_ID=$SDC_KEY_ID
|