93 lines
2.3 KiB
Plaintext
93 lines
2.3 KiB
Plaintext
|
|
# today
|
|
|
|
triton instances|insts # list machines
|
|
triton instance|inst ID|NAME|UNIQUE-NAME-SUBSTRING # get machine
|
|
# -1 for unique match, a la 'vmadm lookup -1'
|
|
|
|
triton create # triton create-instance
|
|
triton create -p PKG [...] IMG
|
|
triton create -i IMG -p PKG [-n NAME] [...]
|
|
# example: triton create base64 -p t4-standard-1g
|
|
|
|
triton image NAME|SUBSTRING
|
|
triton package NAME|SUBSTRING
|
|
|
|
|
|
# DONE
|
|
|
|
triton
|
|
triton -v # bunyan trace logging
|
|
triton images # list images
|
|
triton image IMAGE # get image
|
|
triton packages # list packages
|
|
triton package PACKAGE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# maybe today
|
|
|
|
triton config defaultPkg t4-standard-1g
|
|
|
|
triton login|ssh VM # kexec?
|
|
|
|
triton delete VM|IMAGE # substring matching? too dangerous
|
|
triton delete --vm VM
|
|
triton delete --image IMAGE
|
|
|
|
triton raw|cloudapi ... # raw cloudapi call
|
|
Equivalent of:
|
|
function cloudapi() {
|
|
local now=`date -u "+%a, %d %h %Y %H:%M:%S GMT"` ;
|
|
local signature=`echo ${now} | tr -d '\n' | openssl dgst -sha256 -sign ~/.ssh/automation.id_rsa | openssl enc -e -a | tr -d '\n'` ;
|
|
local curl_opts=
|
|
[[ -n $SDC_TESTING ]] && curl_opts="-k $curl_opts";
|
|
[[ -n $TRACE ]] && set -x;
|
|
curl -is $curl_opts \
|
|
-H "Accept: application/json" -H "api-version: ~7.2" \
|
|
-H "Date: ${now}" \
|
|
-H "Authorization: Signature keyId=\"/$SDC_ACCOUNT/keys/$SDC_KEY_ID\",algorithm=\"rsa-sha256\" ${signature}" \
|
|
--url $SDC_URL$@ ;
|
|
[[ -n $TRACE ]] && set +x;
|
|
echo "";
|
|
}
|
|
|
|
"shortid" instead of full UUID "id" in default output, and then allow lookup
|
|
by that shortid. Really nice for 80 columns.
|
|
|
|
triton images
|
|
Drop 'state' in default columns. Add type to be able to see lx or not
|
|
for 'linux' ones. That might hit that stupid naming problem.
|
|
|
|
|
|
# profiles
|
|
|
|
triton profile # list all profiles
|
|
triton profile NAME # show NAME profile
|
|
triton profile -a NAME # sets it as active
|
|
triton profile -n|--new # ???
|
|
|
|
For today: only the implicit 'env' profile.
|
|
|
|
|
|
|
|
# config
|
|
|
|
~/.triton/
|
|
config.json
|
|
{"currProfile": "east3b"}
|
|
east3b/ # profile
|
|
PROFILE2/
|
|
...
|
|
|
|
|
|
|
|
# another day
|
|
|
|
triton config get|set|list # see 'npm config'
|
|
|
|
triton --shell # or whatever, repl
|