Command Line Utilities
Contents
- 1 Usage
- 2 Commands
- 2.1 dfe:blueprint
- 2.2 dfe:capsule
- 2.3 dfe:cluster
- 2.4 dfe:daily
- 2.5 dfe:deprovision
- 2.6 dfe:export
- 2.7 dfe:import
- 2.8 dfe:info
- 2.9 dfe:manifest
- 2.10 dfe:metrics
- 2.11 dfe:migrate-instance
- 2.12 dfe:mount
- 2.13 dfe:move-instance
- 2.14 dfe:provision
- 2.15 dfe:register
- 2.16 dfe:server
- 2.17 = dfe:setup
- 2.18 dfe:token
- 2.19 dfe:update
- 2.20 dfe:users
Usage
The Console provides command-line access to all GUI features except reporting. This is provided through Laravel's artisan tool. To see the list of available commands, simply run php artisan from the Console installation directory:
dfadmin@console:/var/www/console$ php artisan Laravel Framework version 5.1.x (LTS) Usage: command [options] [arguments] Available commands: ... dfe dfe:blueprint Generate an instance blueprint dfe:capsule Encapsulate a managed instance for direct access dfe:cluster Create, update, delete, and manage clusters dfe:deprovision Deprovisions, or shuts down, a running instance dfe:export Create a portable instance export dfe:import Create an instance from an instance export dfe:manifest Generate a cluster manifest file (.dfe.cluster.json) dfe:metrics Gather system metrics dfe:migrate-instance Run database migration for an instance (php artisan migrate) dfe:mount Create, update, and delete mounts dfe:provision Provision a new instance dfe:register Create a key pair for use with the console API dfe:server Create, update, and delete servers dfe:setup Initialize a new installation and generate a cluster environment file dfe:token Generate a token for an instance dfe:update Update the local DFE installation to the latest version ...
Conventions
In the usage sections to follow, the common options will be omitted. These options exist for**all* console commands:
-h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Command Types
There are two basic types of commands: entity and operational. Entity commands manage the logical entities within the Console. These commands are dfe:cluster, dfe:mount, and dfe:server. Operational commands are all the rest. These commands manipulate the entities or the system.
Commands
dfe:blueprint
Usage:
dfe:blueprint [options] [--] <instance-id> [<instance-uri>] [<admin-email>] [<admin-password>]
Arguments:
instance-id The id of the instance to inspect. instance-uri The URI of the instance (i.e. "http://localhost") admin-email An instance administrator email admin-password An instance administrator password
Options:
--no-commit Do not commit the result to the repo -d, --dump Dump the blueprint to stdout as well as writing to disk -k, --api-key=API-KEY The API key to use instead of auto-generated token -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Generates an instance blueprint
dfe:capsule
Usage:
dfe:capsule [options] [--] <instance-id>
Arguments:
instance-id The instance to encapsulate
Options:
-d, --destroy Destroys a previously created capsule. -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
The dfe:capsule command encapsulates a managed instance for direct access. php artisan dfe:capsule <instance-id> [-d|--destroy]
dfe:cluster
Usage:
dfe:cluster [options] [--] <operation> [<cluster-id>]
Arguments:
operation The operation to perform: show, create, update, delete, add (server to cluster), or remove (server from cluster) cluster-id The id of the cluster upon which to perform operation [default: "cluster-gha-1"]
Options:
--owner-id=OWNER-ID The "owner-id" of this cluster --owner-type=OWNER-TYPE The type of owner: USER, INSTANCE, SERVER, MOUNT, CLUSTER, SERVICE_USER, OWNER_HASH, CONSOLE, DASHBOARD, APPLICATION, SERVICE, TESTING, _DEFAULT_NAMESPACE_ --subdomain=SUBDOMAIN The subdomain in which this cluster resides -m, --max-instances=MAX-INSTANCES The maximum number of instances allowed, if any. --server-id=SERVER-ID The "server-id" to "add" or "remove" -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Create, update, delete, and manage clusters
dfe:daily
Usage:
dfe:daily [options]
Options:
--dry-run When specified, no instances will be deprovisioned. -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Performs daily maintenance tasks
dfe:deprovision
Usage:
dfe:deprovision [options] [--] <instance-id>
Arguments:
instance-id The instance to deprovision
Options:
-c, --cluster-id[=CLUSTER-ID] The cluster containing the instance [default: "cluster-gha-1"] -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Deprovisions, or shuts down, a running instance
dfe:export
Usage:
dfe:export [options] [--] <instance-id>
Arguments:
instance-id The instance to export
Options:
-d, --destination[=DESTINATION] The path to place the export file. -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Create a portable instance export
dfe:import
Usage:
dfe:import [options] [--] <owner-id> <instance-id> <snapshot> [<guest-location>]
Arguments:
owner-id The id of the owner of the new instance instance-id The name of the new instance snapshot The path of the snapshot file guest-location The location of the new instance [default: "dreamfactory"]
Options:
-c, --cluster-id[=CLUSTER-ID] The cluster where this instance is to be placed. [default: "cluster-gha-1"] --indirect If specified, the "snapshot" value is a snapshot-id not a path --owner-type=OWNER-TYPE The owner-id of the new instance -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Import a portable instance export
dfe:info
Usage:
dfe:info [options] [--] <entity-type> [<entity-id>]
Arguments:
entity-type The type of entity information to retrieve: mount, server, cluster, instance, or metrics entity-id The id of the entity-type
Options:
-a, --all Return all data, ignoring entity-id -s, --start-date=START-DATE The start date for a range of metrics data -e, --end-date=END-DATE The end date for a range of metrics data -f, --format[=FORMAT] The format in which to output the information. Available formats are: json or xml -u, --ugly For formatted output, does not pretty-print output --escaped-slashes For JSON formatted output, slashes will be escaped (default is that they are not) -t, --owner-type=OWNER-TYPE The "owner-type" of the entity (required by "app-key") [default: 0] -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Extract information from the system
dfe:manifest
Usage:
dfe:manifest [options] [--] <cluster-id> <web-server-id> [<output-file>]
Arguments:
cluster-id The id/name of the cluster web-server-id The id/name of the web server from "cluster-id" output-file The /path/to/manifest/file to write. Otherwise it is written to the current working directory.
Options:
-c, --create Create a new manifest file. This is the default. -k, --no-keys If specified, no application keys will be generated. -s, --show If specified, show the contents of an installation's manifest. --owner-id=OWNER-ID The owner id for the manifest key if not 0 [default: 0] --owner-type=OWNER-TYPE The owner type for the manifest key if not "dashboard" [default: "dashboard"] -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Generates a cluster manifest file (.dfe.cluster.json) for DFE installations.
dfe:metrics
Usage:
dfe:metrics [options]
Options:
--gather When specified, all metrics are gathered and written to the database. Use when scheduling jobs. -f, --to-file=TO-FILE Write metrics to a file. --console-only Only gather "console" metrics --dashboard-only Only gather "dashboard" metrics --instance-only Only gather "dashboard" metrics --no-usage-data[=NO-USAGE-DATA] Do not send usage data if true [default: false] --force Force overwrite of daily gather -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Gather overall system metrics
dfe:migrate-instance
Usage:
dfe:migrate-instance [options] [--] [<instance-id>]
Arguments:
instance-id The instance to migrate
Options:
-a, --all Migrate *all* cluster instances -c, --cluster-id=CLUSTER-ID If specified with "--all", will migrate only instances managed by "cluster-id". -s, --seed If specified, "--seed" will be passed to any "migrate" commands -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Run migration for an instance.
dfe:mount
Usage:
dfe:mount [options] [--] <operation> [<mount-id>]
Arguments:
operation The operation to perform: show, create, update, or delete mount-id The id of the mount upon which to perform operation
Options:
-t, --mount-type=MOUNT-TYPE The type of mount: LOCAL, SFTP, S3 --owner-id=OWNER-ID The "owner-id" of this mount --owner-type=OWNER-TYPE The type of owner: USER, INSTANCE, SERVER, MOUNT, CLUSTER, SERVICE_USER, OWNER_HASH, CONSOLE, DASHBOARD, APPLICATION, SERVICE, TESTING, _DEFAULT_NAMESPACE_ -p, --root-path=ROOT-PATH The "root-path" of the mount -c, --config=CONFIG JSON-encoded array of configuration data for this mount -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Create, update, and delete mounts
dfe:move-instance
Usage:
dfe:move-instance [options] [--] <server-id> [<instance-id>]
Arguments:
server-id The destination server of the move instance-id The instance to move
Options:
-a, --all Move *all* instances -p, --purge Purge existing credentials from database. Only used with database server moves. -c, --cluster-id=CLUSTER-ID If specified with "--all", only the instances managed by "cluster-id" will be moved. -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Moves an instance from one server to another.
dfe:provision
Usage:
dfe:provision [options] [--] <owner-id> <instance-id> [<guest-location>]
Arguments:
owner-id The id of the owner of the new instance instance-id The name of the new instance guest-location The location of the new instance. Values: "amazon", "dreamfactory", "azure", "rackspace", "openstack", or "local" [default: "dreamfactory"]
Options:
--owner-type[=OWNER-TYPE] The "owner-id" type. Values: "0" (user), "1" (instance), "2" (server), "3" (mount), "4" (cluster), "5" (service_user), "6" (owner_hash), "1000" (console), "1001" (dashboard), "1002" (application), "1003" (service), or "9999" (testing) [default: 0] -c, --cluster-id[=CLUSTER-ID] The cluster where this instance is to be placed. [default: "cluster-gha-1"] -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Provision a new instance
dfe:register
Usage:
dfe:register <owner-id> <owner-type>
Arguments:
owner-id The id of the owner of this key owner-type One of the following owner types: user, instance, server, mount, cluster, service_user, owner_hash, console, dashboard, application, service, or testing
Options:
-h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Creates a key pair used to communicate with the DFE Console
dfe:server
Usage:
dfe:server [options] [--] <operation> [<server-id>]
Arguments:
operation The operation to perform: show, create, update, or delete server-id The id of the server upon which to perform operation
Options:
-t, --server-type=SERVER-TYPE The type of server: APP, WEB, DB -m, --mount-id=MOUNT-ID The id of the storage mount for this server -a, --host-name=HOST-NAME The host name of this server -c, --config=CONFIG JSON-encoded array of configuration data for this server -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Create, update, and delete servers
= dfe:setup
Usage:
dfe:setup [options] [--] <admin-email>
Arguments:
admin-email The admin email address.
Options:
--force Use to force re-initialization of system. --no-manifest Do not create a manifest file. --no-keys Do not create initialization keys. --admin-password[=ADMIN-PASSWORD] The admin account password to use. [default: "dfe.admin"] --api-secret[=API-SECRET] The API secret to use. If not specified, one will be generated -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Initializes a new installation and generates a cluster environment file.
dfe:token
Usage:
dfe:token <instance-id>
Arguments:
instance-id The instance id
Options:
-h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Generates a token for an instance
dfe:update
Usage:
dfe:update [options]
Options:
--no-composer If specified, a "composer update" will NOT be performed after an update. --no-clear If specified, the caches will not be cleared after an update. -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
The dfe:update command checks github.com for newer versions of DFE Console and if found, installs the latest. php artisan dfe:update
dfe:users
Usage:
dfe:users [options] [--] <operation> <email>
Arguments:
operation The operation to perform: show, create, update, delete, activate, deactivate email The email address of the target user
Options:
--format=FORMAT Output show in alternate format. Valid types are: json and xml -u, --ugly For formatted output, does not pretty-print output --escaped-slashes For JSON formatted output, slashes will be escaped (default is that they are not) --force Use to force current operation. --password=PASSWORD The password of the target user -f, --first-name=FIRST-NAME The first name of the target user -l, --last-name=LAST-NAME The last name of the target user --nickname[=NICKNAME] The nickname of the target user -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Manage DFE Dashboard users.