This repository has been archived on 2020-01-20. You can view files and clone it, but cannot push or open issues or pull requests.
node-spearhead/TODO.md

136 lines
5.0 KiB
Markdown
Raw Normal View History

2014-02-07 13:21:24 -08:00
# first
2015-07-25 22:45:20 -07:00
- Adding/removing DCs. Want this to work reasonably mainly to support dogfooding
with internal DCs. Also to allow this to be a general tool for *SDC*,
with default values for JPC, but not restricted to. Also allow the right thing
to happen if JPC adds new DCs.
- Don't use "all" catch all DC. Use "joyent" alias for the default set.
- Add DC aliases (starting a generic aliasing).
- Show the aliases in `sdc dcs`
- support aliases in the command lookups. Method to get the DCs for the current
profile
XXX START HERE
- changing dcs:
sdc dcs add us-beta-4 https://beta4-cloudapi.joyent.us
sdc dcs set-url us-beta-4 https://beta4-cloudapi.joyent.us
sdc dcs rm us-beta-4
Note: If having config.dcs override this means that any DC change means
that user doesn't "see" DC changes by new node-sdc versions.
- Impl 'sdc config' to edit these easily on the CLI.
sdc config alias.dc.<alias> <dc-name-1> <dc-name-2> ...
sdc config alias.image.<alias> <image-uuid> ...
2014-02-07 13:21:24 -08:00
- machines:
- short default output
2015-07-25 22:45:20 -07:00
- 'cdate' short created, just the date
- 'img' is 'name/version'
- 'sid' is the short id prefix
2014-02-07 13:21:24 -08:00
- long '-l' output, -H, -o, -s
- get image defaults and fill those in
2015-07-25 22:45:20 -07:00
2014-02-20 15:45:15 -08:00
- few more commands? provision (create-machine?)
2015-07-25 22:45:20 -07:00
2014-02-07 13:21:24 -08:00
- uuid caching
- UUID prefix support
- profile command (adding profile, edit, etc.)
2015-07-25 22:45:20 -07:00
- `sdc config` command similar to git config
2014-02-07 13:21:24 -08:00
2015-07-25 22:45:20 -07:00
# account vs user vs subuser vs role
See MANTA-2401 and scrum discussion from 14 Aug 2014..
Suggestion: use "account" and "user" since "since those are the documented
tools for the abstractions and that's what smartdc uses."
Envvars: SDC_ACCOUNT and SDC_USER.
2014-02-07 13:21:24 -08:00
# later (in no particular order)
2015-07-25 22:45:20 -07:00
- adding a dc:
sdc dcs -a us-beta-4 https://beta4-cloudapi.joyent.us
or
- signing: should sigstr include more than just the date? How about the request
path??? Not according to the cloudapi docs.
- restify-client and bunyan-light without dtrace-provider
- Get node-smartdc-auth to take a log option. Perhaps borrow from imgapi.js'
cliSigner et al.
- node-smartdc-auth: Support a path to a priv key for "keyId" arg. Or a separate
alternative arg. Copy this from imgapi.cliSigner.
sign: cloudapi.cliSigner({
keyId: <KEY-ID>,
user: <USER>,
log: <BUNYAN-LOGGER>,
}),
- the error reporting for a signing error sucks:
getAccount: err { message: 'error signing request',
code: 'Signing',
exitStatus: 1 }
e.g. when the KEY_ID is nonsense. Does imgapi's auth have better error
reporting?
2014-02-07 13:21:24 -08:00
- how to add/exclude DCs?
- cmdln.js support for bash tab completion
2014-02-07 17:07:58 -08:00
- node-smartdc installs joyentcloud and warns about deprecation on stderr.
- bunyan logging setup:
- one output stream to a file at trace level:
/var/log/joyentcloud/$timestamp.log
- periodically keep the number of those files down. This is hard. Do it
at startup? Yah should be fine.
- another "raw" stream to stderr at WARN at above (maybe INFO?)
where we console.error just the minimal fields that we want to show
joyentcloud: warn: $msg
Not sure about other fields.
2014-02-12 11:30:19 -08:00
- plugin support, e.g. allow 3rd-party node-joyentcloud-foo npm modules that would
add a "joyentcloud foo" subcmd. Reasonable?
2014-02-07 17:07:58 -08:00
- windows testing
2015-07-25 22:45:20 -07:00
# ideas
- `sdc whatsnew` grabs current images and packages and compares to last time
it was called to short new images/packages. Perhaps for other resources too.
# notes on `sdc provision` (in progress)
- Lame: I <# that our packages are separate for kvm vs smartos usage. Do they
have conflicting data?
- Q: "package" or "instance-type"? Probably package for now.
Need: dc (if profile has multiple, have a settable preferred dc for provisions),
image (uuid, name to get latest, have a settable preferred?), package (settable
preferred, settable preferred ram).
What about using "same as last time" or a way to say that?
Want interactive asking for missing params if TTY? -f to avoid.
$ sdc provision ...
Datacenter [us-west-1]: <prompt>
...
Name: AWS equiv is 'aws-cli ec2 run-instances'
http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html
E.g.:
aws ec2 run-instances --image-id ami-c3b8d6aa --count 1 --instance-type t1.micro --key-name MyKeyPair --security-groups MySecurityGroup
sdc create-machine ...
sdc provision ...
sdc provision -i IMAGE -p PACKAGE
shortcut?
sdc provision IMAGE:PKG ?
sdc provision IMAGE PKG ?
sdc provision image=IMAGE package=PKG ? no
sdc provision -i IMAGE -p PKG -c 3 --name 'test%d' # printf codes for the count
sdc provision -d east -i base -p g3-standard-1 -n shirley # -d|--dc
Clarify what IMAGE can be. "Name" matching is first against one's own private
images, then against public ones. UUID. UUID prefix. "Name/version" matching.
Image alias (`sdc config alias.bob $uuid`, though for git that alias is for
*commands*. Perhaps `sdc alias image.bob $uuid`. Dunno. Later.).
Similar matching for PKG.