renaming to spearhead

This commit is contained in:
Marius Pana 2018-02-10 20:17:02 +02:00
parent 6f4b5deb5e
commit 6f9cd272b7
52 changed files with 100 additions and 101 deletions

View File

@ -142,7 +142,7 @@ var OPTIONS = [
'See `spearhead cloudapi /--ping` to list supported versions. ' + 'See `spearhead cloudapi /--ping` to list supported versions. ' +
'The default is "' + lib_tritonapi.CLOUDAPI_ACCEPT_VERSION + '". ' + 'The default is "' + lib_tritonapi.CLOUDAPI_ACCEPT_VERSION + '". ' +
'*This is intended for development use only. It could cause ' + '*This is intended for development use only. It could cause ' +
'`triton` processing of responses to break.*', '`spearhead` processing of responses to break.*',
hidden: true hidden: true
} }
]; ];
@ -179,7 +179,7 @@ cmdln.dashdash.addOptionType({
function CLI() { function CLI() {
Cmdln.call(this, { Cmdln.call(this, {
name: 'triton', name: 'spearhead',
desc: packageJson.description, desc: packageJson.description,
options: OPTIONS, options: OPTIONS,
helpOpts: { helpOpts: {
@ -244,7 +244,7 @@ CLI.prototype.init = function (opts, args, callback) {
} }
if (opts.version) { if (opts.version) {
console.log('Triton CLI', packageJson.version); console.log('Spearhead CLI', packageJson.version);
console.log(packageJson.homepage); console.log(packageJson.homepage);
callback(false); callback(false);
return; return;

View File

@ -30,8 +30,8 @@ var mod_path = require('path');
* For *testing* only, we allow override of this dir. * For *testing* only, we allow override of this dir.
*/ */
var CLI_CONFIG_DIR; var CLI_CONFIG_DIR;
if (process.env.TRITONTEST_CLI_CONFIG_DIR) { if (process.env.SCTEST_CLI_CONFIG_DIR) {
CLI_CONFIG_DIR = process.env.TRITONTEST_CLI_CONFIG_DIR; CLI_CONFIG_DIR = process.env.SCTEST_CLI_CONFIG_DIR;
} else if (process.platform === 'win32') { } else if (process.platform === 'win32') {
/* /*
* For better or worse we are using APPDATA (i.e. the *Roaming* AppData * For better or worse we are using APPDATA (i.e. the *Roaming* AppData

View File

@ -23,7 +23,7 @@ function AccountCLI(top) {
name: top.name + ' account', name: top.name + ' account',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'Get and update your Triton account.' 'Get and update your Spearhead account.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_create(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_create.help = 'A shortcut for "triton instance create".\n' + targ.help; do_create.help = 'A shortcut for "spearhead instance create".\n' + targ.help;
do_create.helpOpts = targ.helpOpts; do_create.helpOpts = targ.helpOpts;
do_create.synopses = targ.synopses; do_create.synopses = targ.synopses;
do_create.options = targ.options; do_create.options = targ.options;

View File

@ -20,7 +20,7 @@ function do_delete(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_delete.help = 'A shortcut for "triton instance delete".\n' + targ.help; do_delete.help = 'A shortcut for "spearhead instance delete".\n' + targ.help;
do_delete.synopses = targ.synopses; do_delete.synopses = targ.synopses;
do_delete.options = targ.options; do_delete.options = targ.options;
do_delete.completionArgtypes = targ.completionArgtypes; do_delete.completionArgtypes = targ.completionArgtypes;

View File

@ -74,17 +74,17 @@ function do_env(subcmd, opts, args, cb) {
p('# triton'); p('# triton');
if (opts.unset) { if (opts.unset) {
[ [
'TRITON_PROFILE', 'SC_PROFILE',
'TRITON_URL', 'SC_URL',
'TRITON_ACCOUNT', 'SC_ACCOUNT',
'TRITON_USER', 'SC_USER',
'TRITON_KEY_ID', 'SC_KEY_ID',
'TRITON_TLS_INSECURE' 'SC_TLS_INSECURE'
].forEach(function (key) { ].forEach(function (key) {
p('unset %s', key); p('unset %s', key);
}); });
} else { } else {
p('export TRITON_PROFILE="%s"', profile.name); p('export SC_PROFILE="%s"', profile.name);
} }
break; break;
case 'docker': case 'docker':
@ -180,7 +180,7 @@ do_env.options = [
names: ['triton', 't'], names: ['triton', 't'],
type: 'bool', type: 'bool',
help: 'Emit environment commands for node-triton itself (i.e. the ' + help: 'Emit environment commands for node-triton itself (i.e. the ' +
'"TRITON_PROFILE" variable).' '"SC_PROFILE" variable).'
}, },
{ {
names: ['docker', 'd'], names: ['docker', 'd'],
@ -210,8 +210,8 @@ do_env.help = [
'Emit shell commands to setup environment.', 'Emit shell commands to setup environment.',
'', '',
'Supported "clients" here are: node-smartdc (i.e. the `sdc-*` tools),', 'Supported "clients" here are: node-smartdc (i.e. the `sdc-*` tools),',
'and node-triton itself. By default this emits the environment for all', 'node-triton and spearhead-node. By default this emits the environment '
'supported tools. Use options to be specific.', 'for all supported tools. Use options to be specific.',
'', '',
'{{usage}}', '{{usage}}',
'', '',
@ -220,7 +220,7 @@ do_env.help = [
'clients. If PROFILE is not given, the current profile is used.', 'clients. If PROFILE is not given, the current profile is used.',
'', '',
'The following Bash function can be added to one\'s "~/.bashrc" to quickly', 'The following Bash function can be added to one\'s "~/.bashrc" to quickly',
'change between Triton profiles:', 'change between Spearhead profiles:',
' triton-select () { eval "$(triton env $1)"; }', ' triton-select () { eval "$(triton env $1)"; }',
'for example:', 'for example:',
' $ triton-select west1', ' $ triton-select west1',

View File

@ -80,7 +80,7 @@ do_create.options = [
names: ['disabled', 'd'], names: ['disabled', 'd'],
type: 'bool', type: 'bool',
help: 'Disable the created firewall rule. By default a created ' help: 'Disable the created firewall rule. By default a created '
+ 'firewall rule is enabled. Use "triton fwrule enable" ' + 'firewall rule is enabled. Use "spearhead fwrule enable" '
+ 'to enable it later.' + 'to enable it later.'
}, },
{ {
@ -102,10 +102,10 @@ do_create.help = [
'{{options}}', '{{options}}',
'Examples:', 'Examples:',
' # Allow SSH access from any IP to all instances in a datacenter.', ' # Allow SSH access from any IP to all instances in a datacenter.',
' triton fwrule create -D "ssh" "FROM any TO all vms ALLOW tcp PORT 22"', ' spearhead fwrule create -D "ssh" "FROM any TO all vms ALLOW tcp PORT 22"',
'', '',
' # Allow SSH access to a specific instance.', ' # Allow SSH access to a specific instance.',
' triton fwrule create \\', ' spearhead fwrule create \\',
' "FROM any TO vm ba2c95e9-1cdf-4295-8253-3fee371374d9 ALLOW tcp PORT 22"' ' "FROM any TO vm ba2c95e9-1cdf-4295-8253-3fee371374d9 ALLOW tcp PORT 22"'
// TODO: link to // TODO: link to
// https://github.com/joyent/sdc-fwrule/blob/master/docs/examples.md // https://github.com/joyent/sdc-fwrule/blob/master/docs/examples.md

View File

@ -22,7 +22,7 @@ function FirewallRuleCLI(top) {
Cmdln.call(this, { Cmdln.call(this, {
name: top.name + ' fwrule', name: top.name + ' fwrule',
desc: 'List and manage Triton firewall rules.', desc: 'List and manage Spearhead firewall rules.',
helpSubcmds: [ helpSubcmds: [
'help', 'help',
'list', 'list',

View File

@ -20,7 +20,7 @@ function do_fwrules(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_fwrules.help = 'A shortcut for "triton fwrule list".\n' + targ.help; do_fwrules.help = 'A shortcut for "spearhead fwrule list".\n' + targ.help;
do_fwrules.synopses = targ.synopses; do_fwrules.synopses = targ.synopses;
do_fwrules.options = targ.options; do_fwrules.options = targ.options;
do_fwrules.completionArgtypes = targ.completionArgtypes; do_fwrules.completionArgtypes = targ.completionArgtypes;

View File

@ -141,7 +141,6 @@ do_list.help = [
'', '',
'Note: Currently, *docker* images are not included in this endpoint\'s responses.', 'Note: Currently, *docker* images are not included in this endpoint\'s responses.',
'You must use `docker images` against the Docker service for this data center.', 'You must use `docker images` against the Docker service for this data center.',
'See <https://apidocs.joyent.com/docker>.',
'', '',
'{{usage}}', '{{usage}}',
'', '',

View File

@ -123,7 +123,7 @@ do_wait.help = [
'', '',
'{{options}}', '{{options}}',
'Where "states" is a comma-separated list of target instance states,', 'Where "states" is a comma-separated list of target instance states,',
'by default "active,failed". In other words, "triton img wait foo0" will', 'by default "active,failed". In other words, "spearhead img wait foo0" will',
'wait for image "foo0" to complete creation.' 'wait for image "foo0" to complete creation.'
].join('\n'); ].join('\n');

View File

@ -23,7 +23,7 @@ function ImageCLI(top) {
name: top.name + ' image', name: top.name + ' image',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and manage Triton images.' 'List and manage Spearhead images.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_images(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_images.help = 'A shortcut for "triton image list".\n' + targ.help; do_images.help = 'A shortcut for "spearhead image list".\n' + targ.help;
do_images.synopses = targ.synopses; do_images.synopses = targ.synopses;
do_images.options = targ.options; do_images.options = targ.options;
do_images.completionArgtypes = targ.completionArgtypes; do_images.completionArgtypes = targ.completionArgtypes;

View File

@ -542,7 +542,7 @@ do_create.options = [
names: ['firewall'], names: ['firewall'],
type: 'bool', type: 'bool',
help: 'Enable Cloud Firewall on this instance. See ' + help: 'Enable Cloud Firewall on this instance. See ' +
'<https://docs.joyent.com/public-cloud/network/firewall>' '<https://docs.spearhead.cloud/network/firewall>'
}, },
{ {
names: ['volume', 'v'], names: ['volume', 'v'],
@ -617,8 +617,8 @@ do_create.help = [
'', '',
'{{options}}', '{{options}}',
'Where IMAGE is an image name, name@version, id, or short id (from ', 'Where IMAGE is an image name, name@version, id, or short id (from ',
'`triton image list`) and PACKAGE is a package name, id, or short id', '`spearhead image list`) and PACKAGE is a package name, id, or short id',
'(from `triton package list`).' '(from `spearhead package list`).'
/* END JSSTYLED */ /* END JSSTYLED */
].join('\n'); ].join('\n');

View File

@ -19,7 +19,7 @@ function InstanceFwruleCLI(parent) {
Cmdln.call(this, { Cmdln.call(this, {
name: parent.name + ' fwrule', name: parent.name + ' fwrule',
desc: [ desc: [
'List fwrules on Triton instances.' 'List fwrules on Spearhead instances.'
].join('\n'), ].join('\n'),
helpOpts: { helpOpts: {
minHelpCol: 24 /* line up with option help */ minHelpCol: 24 /* line up with option help */

View File

@ -71,7 +71,7 @@ do_ip.help = [
'', '',
'{{options}}', '{{options}}',
'Where "INST" is an instance name, id, or short id.', 'Where "INST" is an instance name, id, or short id.',
'For example: ssh root@$(triton ip my-instance)' 'For example: ssh root@$(spearhead ip my-instance)'
].join('\n'); ].join('\n');

View File

@ -22,7 +22,7 @@ function SnapshotCLI(top) {
Cmdln.call(this, { Cmdln.call(this, {
name: top.name + ' snapshot', name: top.name + ' snapshot',
desc: 'List, get, create and delete Triton instance snapshots.', desc: 'List, get, create and delete Spearhead instance snapshots.',
helpSubcmds: [ helpSubcmds: [
'help', 'help',
'create', 'create',
@ -31,7 +31,7 @@ function SnapshotCLI(top) {
'delete' 'delete'
], ],
helpBody: 'Instances can be rolled back to a snapshot using\n' + helpBody: 'Instances can be rolled back to a snapshot using\n' +
'`triton instance start --snapshot=SNAPNAME`.' '`spearhead instance start --snapshot=SNAPNAME`.'
}); });
} }
util.inherits(SnapshotCLI, Cmdln); util.inherits(SnapshotCLI, Cmdln);

View File

@ -21,7 +21,7 @@ function do_snapshots(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_snapshots.help = 'A shortcut for "triton instance snapshot list".\n' + do_snapshots.help = 'A shortcut for "spearhead instance snapshot list".\n' +
targ.help; targ.help;
do_snapshots.synopses = targ.synopses; do_snapshots.synopses = targ.synopses;
do_snapshots.options = targ.options; do_snapshots.options = targ.options;

View File

@ -155,7 +155,7 @@ do_ssh.help = [
'is spawned with options disabling ControlMaster. See ', 'is spawned with options disabling ControlMaster. See ',
'<https://github.com/joyent/node-triton/issues/52> for details. If you ', '<https://github.com/joyent/node-triton/issues/52> for details. If you ',
'want to use ControlMaster, an alternative is:', 'want to use ControlMaster, an alternative is:',
' ssh root@$(triton ip INST)' ' ssh root@$(spearhead ip INST)'
/* END JSSTYLED */ /* END JSSTYLED */
].join('\n'); ].join('\n');

View File

@ -22,7 +22,7 @@ function InstanceTagCLI(parent) {
name: parent.name + ' tag', name: parent.name + ' tag',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List, get, set and delete tags on Triton instances.' 'List, get, set and delete tags on Spearhead instances.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_tags(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_tags.help = 'A shortcut for "triton instance tag list".\n' + targ.help; do_tags.help = 'A shortcut for "spearhead instance tag list".\n' + targ.help;
do_tags.synopses = targ.synopses; do_tags.synopses = targ.synopses;
do_tags.options = targ.options; do_tags.options = targ.options;
do_tags.completionArgtypes = targ.completionArgtypes; do_tags.completionArgtypes = targ.completionArgtypes;

View File

@ -122,7 +122,7 @@ do_wait.help = [
'{{options}}', '{{options}}',
'Where "INST" is an instance name, id, or short id; and "STATES" is a', 'Where "INST" is an instance name, id, or short id; and "STATES" is a',
'comma-separated list of target instance states, by default "running,failed".', 'comma-separated list of target instance states, by default "running,failed".',
'In other words, "triton inst wait foo0" will wait for instance "foo0" to', 'In other words, "spearhead inst wait foo0" will wait for instance "foo0" to',
'complete provisioning.' 'complete provisioning.'
/* END JSSTYLED */ /* END JSSTYLED */
].join('\n'); ].join('\n');

View File

@ -22,7 +22,7 @@ function InstanceCLI(top) {
name: top.name + ' instance', name: top.name + ' instance',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and manage Triton instances.' 'List and manage Spearhead instances.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_instances(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_instances.help = 'A shortcut for "triton instance list".\n' + targ.help; do_instances.help = 'A shortcut for "spearhead instance list".\n' + targ.help;
do_instances.synopses = targ.synopses; do_instances.synopses = targ.synopses;
do_instances.options = targ.options; do_instances.options = targ.options;
do_instances.completionArgtypes = targ.completionArgtypes; do_instances.completionArgtypes = targ.completionArgtypes;

View File

@ -20,7 +20,7 @@ function do_ip(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_ip.help = 'A shortcut for "triton instance ip".\n' + targ.help; do_ip.help = 'A shortcut for "spearhead instance ip".\n' + targ.help;
do_ip.synopses = targ.synopses; do_ip.synopses = targ.synopses;
do_ip.options = targ.options; do_ip.options = targ.options;
do_ip.completionArgtypes = targ.completionArgtypes; do_ip.completionArgtypes = targ.completionArgtypes;

View File

@ -20,7 +20,7 @@ function do_keys(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_keys.help = 'A shortcut for "triton key list".\n' + targ.help; do_keys.help = 'A shortcut for "spearhead key list".\n' + targ.help;
do_keys.synopses = targ.synopses; do_keys.synopses = targ.synopses;
do_keys.options = targ.options; do_keys.options = targ.options;
do_keys.completionArgtypes = targ.completionArgtypes; do_keys.completionArgtypes = targ.completionArgtypes;

View File

@ -117,7 +117,7 @@ do_list.help = [
'', '',
'{{options}}', '{{options}}',
'Fields (most are self explanatory, the significant ones are as follows):', 'Fields (most are self explanatory, the significant ones are as follows):',
' managed IP is manged by Triton and cannot be modified directly.', ' managed IP is manged by Spearhead and cannot be modified directly.',
'', '',
'See https://apidocs.joyent.com/cloudapi/#ListNetworkIPs for a full' + 'See https://apidocs.joyent.com/cloudapi/#ListNetworkIPs for a full' +
' listing.' ' listing.'

View File

@ -23,7 +23,7 @@ function IpCLI(top) {
name: top.name + ' ip', name: top.name + ' ip',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and manage Triton network IPs.' 'List and manage Spearhead network IPs.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -23,7 +23,7 @@ function NetworkCLI(top) {
name: top.name + ' network', name: top.name + ' network',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and manage Triton networks.' 'List and manage Spearhead networks.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_networks(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_networks.help = 'A shortcut for "triton network list".\n' + targ.help; do_networks.help = 'A shortcut for "spearhead network list".\n' + targ.help;
do_networks.synopses = targ.synopses; do_networks.synopses = targ.synopses;
do_networks.options = targ.options; do_networks.options = targ.options;
do_networks.completionArgtypes = targ.completionArgtypes; do_networks.completionArgtypes = targ.completionArgtypes;

View File

@ -23,7 +23,7 @@ function PackageCLI(top) {
name: top.name + ' package', name: top.name + ' package',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and get Triton packages.', 'List and get Spearhead packages.',
'', '',
'A package is a collection of attributes -- for example disk quota,', 'A package is a collection of attributes -- for example disk quota,',
'amount of RAM -- used when creating an instance. They have a name', 'amount of RAM -- used when creating an instance. They have a name',

View File

@ -20,7 +20,7 @@ function do_packages(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_packages.help = 'A shortcut for "triton package list".\n' + targ.help; do_packages.help = 'A shortcut for "spearhead package list".\n' + targ.help;
do_packages.synopses = targ.synopses; do_packages.synopses = targ.synopses;
do_packages.options = targ.options; do_packages.options = targ.options;
do_packages.completionArgtypes = targ.completionArgtypes; do_packages.completionArgtypes = targ.completionArgtypes;

View File

@ -220,7 +220,7 @@ function _createProfile(opts, cb) {
var fields = [ { var fields = [ {
desc: 'A profile name. A short string to identify this ' + desc: 'A profile name. A short string to identify this ' +
'profile to the `triton` command.', 'profile to the `spearhead` command.',
key: 'name', key: 'name',
default: defaults.name, default: defaults.name,
validate: function validateName(value, valCb) { validate: function validateName(value, valCb) {
@ -359,7 +359,7 @@ function _createProfile(opts, cb) {
console.log(common.ansiStylizeTty('\n\n# Docker setup\n', 'bold')); console.log(common.ansiStylizeTty('\n\n# Docker setup\n', 'bold'));
console.log(wrap80('This section will setup authentication to ' + console.log(wrap80('This section will setup authentication to ' +
'Triton DataCenter\'s Docker endpoint using your account ' + 'Spearhead Datacenter\'s Docker endpoint using your account ' +
'and key information specified above. This is only required ' + 'and key information specified above. This is only required ' +
'if you intend to use `docker` with this profile.\n')); 'if you intend to use `docker` with this profile.\n'));
@ -428,7 +428,7 @@ do_create.options = [
names: ['file', 'f'], names: ['file', 'f'],
type: 'string', type: 'string',
helpArg: 'FILE', helpArg: 'FILE',
help: 'A JSON file (of the same form as "triton profile get -j") ' + help: 'A JSON file (of the same form as "spearhead profile get -j") ' +
'with the profile, or "-" to read JSON from stdin.' 'with the profile, or "-" to read JSON from stdin.'
}, },
{ {
@ -441,7 +441,7 @@ do_create.options = [
{ {
names: ['no-docker'], names: ['no-docker'],
type: 'bool', type: 'bool',
help: 'As of Triton CLI 4.9, creating a profile will attempt (on ' help: 'As of Spearhead CLI 4.9, creating a profile will attempt (on '
+ 'non-Windows) to also setup for running Docker. This is ' + 'non-Windows) to also setup for running Docker. This is '
+ 'experimental and might fail. Use this option to disable ' + 'experimental and might fail. Use this option to disable '
+ 'the attempt.' + 'the attempt.'
@ -456,19 +456,19 @@ do_create.options = [
do_create.synopses = ['{{name}} {{cmd}} [OPTIONS]']; do_create.synopses = ['{{name}} {{cmd}} [OPTIONS]'];
do_create.help = [ do_create.help = [
'Create a Triton CLI profile.', 'Create a Spearhead CLI profile.',
'', '',
'{{usage}}', '{{usage}}',
'', '',
'{{options}}', '{{options}}',
'', '',
'Examples:', 'Examples:',
' triton profile create # interactively create a profile', ' spearhead profile create # interactively create a profile',
' triton profile create --copy env # ... copying from "env" profile', ' spearhead profile create --copy env # ... copying from "env" profile',
'', '',
' # Or non-interactively create from stdin or a file:', ' # Or non-interactively create from stdin or a file:',
' cat a-profile.json | triton profile create -f -', ' cat a-profile.json | spearhead profile create -f -',
' triton profile create -f another-profile.json' ' spearhead profile create -f another-profile.json'
].join('\n'); ].join('\n');

View File

@ -122,7 +122,7 @@ do_delete.options = [
do_delete.synopses = ['{{name}} {{cmd}} PROFILE']; do_delete.synopses = ['{{name}} {{cmd}} PROFILE'];
do_delete.help = [ do_delete.help = [
'Delete a Triton CLI profile.', 'Delete a Spearhead CLI profile.',
'', '',
'{{usage}}', '{{usage}}',
'', '',

View File

@ -43,21 +43,21 @@ do_docker_setup.options = [
do_docker_setup.synopses = ['{{name}} {{cmd}} [PROFILE]']; do_docker_setup.synopses = ['{{name}} {{cmd}} [PROFILE]'];
do_docker_setup.help = [ do_docker_setup.help = [
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
'Setup for using Docker with the current Triton CLI profile.', 'Setup for using Docker with the current Spearhead CLI profile.',
'', '',
'{{usage}}', '{{usage}}',
'', '',
'{{options}}', '{{options}}',
'A Triton datacenter can act as a virtual Docker Engine, where the entire', 'A Spearhead datacenter can act as a virtual Docker Engine, where the entire',
'datacenter is available on for running containers. The datacenter provides', 'datacenter is available for running containers. The datacenter provides',
'an endpoint against which you can run the regular `docker` client. This', 'an endpoint against which you can run the regular `docker` client. This',
'requires a one time setup to (a) generate a client TLS certificate to enable', 'requires a one time setup to (a) generate a client TLS certificate to enable',
'secure authentication with the Triton Docker Engine, and (b) to determine', 'secure authentication with the Spearhead Docker Engine, and (b) to determine',
'the DOCKER_HOST and related environment variables.', 'the DOCKER_HOST and related environment variables.',
'', '',
'After running this, you can setup your shell environment for `docker` via:', 'After running this, you can setup your shell environment for `docker` via:',
' eval "$(triton env --docker)"', ' eval "$(triton env --docker)"',
'or the equivalent. See `triton env --help` for details.' 'or the equivalent. See `spearhead env --help` for details.'
/* END JSSTYLED */ /* END JSSTYLED */
].join('\n'); ].join('\n');

View File

@ -157,7 +157,7 @@ do_edit.options = [
do_edit.synopses = ['{{name}} {{cmd}} [PROFILE]']; do_edit.synopses = ['{{name}} {{cmd}} [PROFILE]'];
do_edit.help = [ do_edit.help = [
'Edit a Triton CLI profile in your $EDITOR.', 'Edit a Spearhead CLI profile in your $EDITOR.',
'', '',
'{{usage}}', '{{usage}}',
'', '',

View File

@ -76,7 +76,7 @@ do_get.options = [
do_get.synopses = ['{{name}} {{cmd}} [PROFILE]']; do_get.synopses = ['{{name}} {{cmd}} [PROFILE]'];
do_get.help = [ do_get.help = [
'Get a Triton CLI profile.', 'Get a Spearhead CLI profile.',
'', '',
'{{usage}}', '{{usage}}',
'', '',

View File

@ -81,12 +81,12 @@ function _listProfiles(cli, opts, args, cb) {
if (profiles.length === 0) { if (profiles.length === 0) {
process.stderr.write('\nWarning: There is no current profile. ' process.stderr.write('\nWarning: There is no current profile. '
+ 'Use "triton profile create" to create one,\n' + 'Use "triton profile create" to create one,\n'
+ 'or set the required "SDC_*/TRITON_*" environment ' + 'or set the required "SC_*" environment '
+ 'variables: see "triton --help".\n'); + 'variables: see "spearhead --help".\n');
} else { } else {
process.stderr.write('\nWarning: There is no current profile. ' process.stderr.write('\nWarning: There is no current profile. '
+ 'Use "triton profile set-current ..."\n' + 'Use "spearhead profile set-current ..."\n'
+ 'to set one or "triton profile create" to create one.\n'); + 'to set one or "spearhead profile create" to create one.\n');
} }
} }
} }
@ -117,15 +117,15 @@ do_list.options = [
do_list.synopses = ['{{name}} {{cmd}} [OPTIONS]']; do_list.synopses = ['{{name}} {{cmd}} [OPTIONS]'];
do_list.help = [ do_list.help = [
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
'List Triton CLI profiles.', 'List Spearhead CLI profiles.',
'', '',
'{{usage}}', '{{usage}}',
'', '',
'{{options}}', '{{options}}',
'A profile is a configured Triton CloudAPI endpoint and associated info.', 'A profile is a configured Spearhead Datacenter endpoint and associated info.',
'I.e. the URL, account name, SSH key fingerprint, etc. information required', 'I.e. the URL, account name, SSH key fingerprint, etc. information required',
'to call a CloudAPI endpoint in a Triton datacenter. You can then switch', 'to call a CloudAPI endpoint in a Spearhead datacenter. You can then switch',
'between profiles with `triton -p PROFILE`, the TRITON_PROFILE environment', 'between profiles with `spearhead -p PROFILE`, the SC_PROFILE environment',
'variable, or by setting your current profile.', 'variable, or by setting your current profile.',
'', '',
'The "CURR" column indicates which profile is the current one.' 'The "CURR" column indicates which profile is the current one.'

View File

@ -34,7 +34,7 @@ do_set_current.options = [
do_set_current.synopses = ['{{name}} {{cmd}} PROFILE']; do_set_current.synopses = ['{{name}} {{cmd}} PROFILE'];
do_set_current.help = [ do_set_current.help = [
'Set the current Triton CLI profile.', 'Set the current Spearhead CLI profile.',
'', '',
'{{usage}}', '{{usage}}',
'', '',
@ -43,7 +43,7 @@ do_set_current.help = [
'previously set profile.', 'previously set profile.',
'', '',
'The "current" profile is the one used by default, unless overridden by', 'The "current" profile is the one used by default, unless overridden by',
'`triton -p PROFILE-NAME ...` or the TRITON_PROFILE environment variable.' '`spearhead -p PROFILE-NAME ...` or the SC_PROFILE environment variable.'
].join('\n'); ].join('\n');
do_set_current.aliases = ['set']; do_set_current.aliases = ['set'];

View File

@ -23,12 +23,12 @@ function ProfileCLI(top) {
name: top.name + ' profile', name: top.name + ' profile',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List, get, create and update Triton CLI profiles.', 'List, get, create and update Spearhead CLI profiles.',
'', '',
'A profile is a configured Triton CloudAPI endpoint. I.e. the', 'A profile is a configured Spearhead Datacenter endpoint. I.e. the',
'url, account, key, etc. information required to call a CloudAPI.', 'url, account, key, etc. information required to call a CloudAPI.',
'You can then switch between profiles with `triton -p PROFILE`', 'You can then switch between profiles with `triton -p PROFILE`',
'or the TRITON_PROFILE environment variable.' 'or the SC_PROFILE environment variable.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -168,7 +168,7 @@ function profileDockerSetup(opts, cb) {
'(passphrase protected) keys or SSH agents. If you continue, ' + '(passphrase protected) keys or SSH agents. If you continue, ' +
'this profile setup will attempt to write a copy of your ' + 'this profile setup will attempt to write a copy of your ' +
'SSH private key formatted as an unencrypted TLS certificate ' + 'SSH private key formatted as an unencrypted TLS certificate ' +
'in "~/.triton/docker" for use by the Docker client.\n')); 'in "~/.spearhead/docker" for use by the Docker client.\n'));
if (yes) { if (yes) {
next(); next();
return; return;
@ -176,7 +176,7 @@ function profileDockerSetup(opts, cb) {
common.promptYesNo({msg: 'Continue? [y/n] '}, function (answer) { common.promptYesNo({msg: 'Continue? [y/n] '}, function (answer) {
if (answer !== 'y') { if (answer !== 'y') {
console.error('Skipping Docker setup (you can run ' console.error('Skipping Docker setup (you can run '
+ '"triton profile docker-setup" later).'); + '"spearhead profile docker-setup" later).');
next(true); next(true);
} else { } else {
console.log(); console.log();
@ -267,7 +267,7 @@ function profileDockerSetup(opts, cb) {
if (err) { if (err) {
console.log(wordwrap('\nNote: No "docker" was found on ' console.log(wordwrap('\nNote: No "docker" was found on '
+ 'your PATH. It is not needed for this setup, but ' + 'your PATH. It is not needed for this setup, but '
+ 'will be to run docker commands against Triton. ' + 'will be to run docker commands against Spearhead. '
+ 'You can find out how to install it at ' + 'You can find out how to install it at '
+ '<https://docs.docker.com/engine/installation/>.')); + '<https://docs.docker.com/engine/installation/>.'));
} else { } else {
@ -478,10 +478,10 @@ function profileDockerSetup(opts, cb) {
'Successfully setup profile "%s" to use Docker%s.', 'Successfully setup profile "%s" to use Docker%s.',
'', '',
'To setup environment variables to use the Docker client, run:', 'To setup environment variables to use the Docker client, run:',
' eval "$(triton env --docker %s)"', ' eval "$(spearhead env --docker %s)"',
' docker%s info', ' docker%s info',
'Or you can place the commands in your shell profile, e.g.:', 'Or you can place the commands in your shell profile, e.g.:',
' triton env --docker %s >> ~/.profile' ' spearhead env --docker %s >> ~/.profile'
].join('\n'), ].join('\n'),
profile.name, profile.name,
(arg.dockerVersion ? format(' (v%s)', arg.dockerVersion) : ''), (arg.dockerVersion ? format(' (v%s)', arg.dockerVersion) : ''),

View File

@ -20,7 +20,7 @@ function do_profiles(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_profiles.help = 'A shortcut for "triton profile list".\n' + targ.help; do_profiles.help = 'A shortcut for "spearhead profile list".\n' + targ.help;
do_profiles.synopses = targ.synopses; do_profiles.synopses = targ.synopses;
do_profiles.options = targ.options; do_profiles.options = targ.options;
do_profiles.completionArgtypes = targ.completionArgtypes; do_profiles.completionArgtypes = targ.completionArgtypes;

View File

@ -198,7 +198,7 @@ do_apply.options = [
{ {
names: ['dev-create-keys-and-profiles'], names: ['dev-create-keys-and-profiles'],
type: 'bool', type: 'bool',
help: 'Convenient option to generate keys and Triton CLI profiles ' + help: 'Convenient option to generate keys and Spearhead CLI profiles ' +
'for all users. For experimenting only. See section below.' 'for all users. For experimenting only. See section below.'
} }
]; ];
@ -214,7 +214,7 @@ do_apply.help = [
'{{options}}', '{{options}}',
'If "--file FILE" is not specified, this defaults to using "./rbac.json".', 'If "--file FILE" is not specified, this defaults to using "./rbac.json".',
'The RBAC configuration is loaded from FILE and compared to the live', 'The RBAC configuration is loaded from FILE and compared to the live',
'RBAC state (see `triton rbac info`). It then calculates necessary updates,', 'RBAC state (see `spearhead rbac info`). It then calculates necessary updates,',
'confirms, and applies them.', 'confirms, and applies them.',
'', '',
'Warning: Currently, RBAC state updates can take a few seconds to appear', 'Warning: Currently, RBAC state updates can take a few seconds to appear',
@ -223,10 +223,10 @@ do_apply.help = [
'', '',
'The "--dev-create-keys-and-profiles" option is provided for **experimenting', 'The "--dev-create-keys-and-profiles" option is provided for **experimenting',
'with, developing, or testing** Triton RBAC. It will create a key and setup a ', 'with, developing, or testing** Triton RBAC. It will create a key and setup a ',
'Triton CLI profile for each user (named "$currprofile-user-$login"). This ', 'Spearhead CLI profile for each user (named "$currprofile-user-$login"). This ',
'simplies using the CLI as that user:', 'simplies using the CLI as that user:',
' triton -p coal-user-bob create ...', ' spearhead -p coal-user-bob create ...',
' triton -p coal-user-sarah imgs', ' spearhead -p coal-user-sarah imgs',
'Note that proper production usage of RBAC should have the administrator', 'Note that proper production usage of RBAC should have the administrator',
'never seeing each user\'s private key.', 'never seeing each user\'s private key.',
'', '',

View File

@ -25,7 +25,7 @@ function RbacCLI(top) {
desc: [ desc: [
'Role-based Access Control (RBAC) commands.', 'Role-based Access Control (RBAC) commands.',
'See <https://docs.joyent.com/public-cloud/rbac> for a general start.', 'See <https://docs.joyent.com/public-cloud/rbac> for a general start.',
'**Warning: `triton rbac ...` is experimental, not well tested and in flux.**' '**Warning: `spearhead rbac ...` is experimental, not well tested and in flux.**'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_reboot(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_reboot.help = 'A shortcut for "triton instance reboot".\n' + targ.help; do_reboot.help = 'A shortcut for "spearhead instance reboot".\n' + targ.help;
do_reboot.synopses = targ.synopses; do_reboot.synopses = targ.synopses;
do_reboot.options = targ.options; do_reboot.options = targ.options;
do_reboot.completionArgtypes = targ.completionArgtypes; do_reboot.completionArgtypes = targ.completionArgtypes;

View File

@ -20,7 +20,7 @@ function do_ssh(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_ssh.help = 'A shortcut for "triton instance ssh".\n' + targ.help; do_ssh.help = 'A shortcut for "spearhead instance ssh".\n' + targ.help;
do_ssh.synopses = targ.synopses; do_ssh.synopses = targ.synopses;
do_ssh.interspersedOptions = targ.interspersedOptions; do_ssh.interspersedOptions = targ.interspersedOptions;
do_ssh.options = targ.options; do_ssh.options = targ.options;

View File

@ -20,7 +20,7 @@ function do_start(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_start.help = 'A shortcut for "triton instance start".\n' + targ.help; do_start.help = 'A shortcut for "spearhead instance start".\n' + targ.help;
do_start.synopses = targ.synopses; do_start.synopses = targ.synopses;
do_start.options = targ.options; do_start.options = targ.options;
do_start.completionArgtypes = targ.completionArgtypes; do_start.completionArgtypes = targ.completionArgtypes;

View File

@ -20,7 +20,7 @@ function do_stop(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_stop.help = 'A shortcut for "triton instance stop".\n' + targ.help; do_stop.help = 'A shortcut for "spearhead instance stop".\n' + targ.help;
do_stop.synopses = targ.synopses; do_stop.synopses = targ.synopses;
do_stop.options = targ.options; do_stop.options = targ.options;
do_stop.completionArgtypes = targ.completionArgtypes; do_stop.completionArgtypes = targ.completionArgtypes;

View File

@ -78,7 +78,7 @@ function do_create(subcmd, opts, args, cb) {
if (volCreateErr && if (volCreateErr &&
volCreateErr.name === 'VolumeSizeNotAvailableError') { volCreateErr.name === 'VolumeSizeNotAvailableError') {
next(new Error('volume size not available, use ' + next(new Error('volume size not available, use ' +
'triton volume sizes command for available sizes')); 'spearhead volume sizes command for available sizes'));
return; return;
} }

View File

@ -19,7 +19,7 @@ function VolumeCLI(top) {
name: top.name + ' volume', name: top.name + ' volume',
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
desc: [ desc: [
'List and manage Triton volumes.' 'List and manage Spearhead volumes.'
].join('\n'), ].join('\n'),
/* END JSSTYLED */ /* END JSSTYLED */
helpOpts: { helpOpts: {

View File

@ -20,7 +20,7 @@ function do_volumes(subcmd, opts, args, callback) {
}, callback); }, callback);
} }
do_volumes.help = 'A shortcut for "triton volumes list".\n' + targ.help; do_volumes.help = 'A shortcut for "spearhead volumes list".\n' + targ.help;
do_volumes.aliases = ['vols']; do_volumes.aliases = ['vols'];
do_volumes.hidden = true; do_volumes.hidden = true;
do_volumes.options = targ.options; do_volumes.options = targ.options;

View File

@ -245,7 +245,7 @@ function loadRbacConfig(ctx, cb) {
ctx.rbacConfig = JSON.parse(data); ctx.rbacConfig = JSON.parse(data);
} catch (jsonErr) { } catch (jsonErr) {
throw new errors.TritonError(format( throw new errors.TritonError(format(
'Triton RBAC config file, %s, is not valid JSON: %s', 'Spearhead RBAC config file, %s, is not valid JSON: %s',
ctx.rbacConfigPath, jsonErr)); ctx.rbacConfigPath, jsonErr));
} }
next(); next();
@ -598,7 +598,7 @@ function executeRbacUpdatePlan(ctx, cb) {
return; return;
} }
console.log('Created user %s (use `triton rbac passwd ' + console.log('Created user %s (use `spearhead rbac passwd ' +
'%s` to change password)', c.wantThing.login, '%s` to change password)', c.wantThing.login,
c.wantThing.login); c.wantThing.login);
next(); next();