Stackato Client Command Reference

Usage

stackato [options] command [arguments] [command-options]

Try stackato help, stackato help [command], and stackato options for more information.

Many of the informational commands take a --json option if you wish to generate machine-parseable output. In some cases the --json option reveals additional details.

Note

Administrative user privileges are required where "(admin)" is noted.

Getting Started

target [--allow-http] [URL]
Reports current target or sets a new target. Expects the target URL to use the https scheme. URLs containing the http scheme will be accepted with the --allow-http option.
login [email] [--email email] [--passwd password] [--token-file path] [--group groupname]

Log into the current target.

If --token-file is used, the authentication token is saved in the specified token file. Subsequent stackato commands will make use of the specified authentication and token file.

If --group is used, client will persistently set the current group. (All the applicaton and services commands use the option for current group also, but only for that one operation, i.e. transient).

Note

The admin user has the ability to switch to any other user without password when using the login command.

info
System and account information
usage [--all] [user|group]
Shows the current memory allocation and usage of the active or specified user/group.
version
Shows the version of this stackato command.

Applications

apps
List deployed applications

Application Creation

push [appname]
Create, push, map, and start a new application
push [appname] --path path
Push application from specified path
push [appname] --url URL
Set the URL for the application, such that the application will respond to HTTP requests sent to the given URL.
push [appname] --instances N
Set the expected number N of instances
push [appname] --mem memsize
Set the memory reservation for the application. Memory value memsize can be specified in megabytes (M) as an integer (64M, 256M, 500M) or in gigabytes (G) as an integer or float (1G, 1.5G, 1.75G)
push [appname] --runtime runtime
Set the runtime to use for the application
push [appname] { --framework | -f } framework
Set the framework to use for the application
push [appname] --no-start
Do not auto-start the application
push [appname] { --no-prompt | -n }
No input. Take settings from stackato.yml.
push [appname] --copy-unsafe-links
Copy links to outside of the application into it, instead of rejecting them with an error.

Application Operations

start [appname]
Start the application
stop [appname]
Stop the application
restart [appname]
Restart the application
delete [appname]
Delete the named applications

Application Updates

update [appname] [--path path]
Update the application bits
update [appname] { --no-prompt | -n }
Do not prompt user for details, use defaults.
mem [appname] [memsize]
Update the memory reservation for an application. Memory value memsize can be specified in megabytes (M) as an integer (64M, 256M, 500M) or in gigabytes (G) as an integer or float (1G, 1.5G, 1.75G)
map [appname] URL
Register the application to the URL, such that the application will respond to HTTP requests sent to the given URL.
unmap [appname] URL
Unregister the application from the URL
instances [appname] { number | delta }
Scale the application instances up or down. A number on its own sets the absolute number of instances. A "+" or "-" prefix to a number adjusts from the current number of instances.

Application Information

crashes [appname]
List recent application crashes
crashlogs [appname]
Deprecated in Stackato 2.4. Currently an alias for logs which now includes logs for crashed applications. When targeting Stackato 2.2 and older systems, displays logs for crashed applications. Takes the same options as logs (below)
logs [appname] [options...]

Display logs for application instances. Takes the following options:

--follow : Tail the stream of log entries.

--num N : Show the last N log entries. Default: 100. 0 shows the whole log.

--source S : Show only log entries coming from source S (glob pattern).

--instance N : Show only log entries coming from instance N.

--filename F : Show only log entries coming from file F (glob pattern).

--text T : Show only log entries matching the glob pattern T.

drain add [appname] drain-name drain-uri
Add a named log drain to the application. <uri> specifies the log destination.
drain delete [appname] drain-name
Delete the named log drain from the application.
drain list [appname]
List all log drains defined for the application.
files [appname] [path] [--all]
Display directory listing or file download for optional path

ssh [--instance instance] [appname] [command]

Allows ssh access to an app in an interactive shell:

$ stackato ssh myapp

If a command is added, it is run and the connection exited:

$ stackato ssh myapp ls -l

By default, the first instance (0) is targeted. Specify other instances with the --instance option:

$ stackato ssh myapp --instance 1 ls -l
ssh api [command]
Opens an ssh session to the Stackato VM (Primary) as the 'stackato' system user. Available to Admin users only. Prompts for the 'stackato' user password.
scp [--instance N] [appname] [:]source [:]destination
Copy files and directories to and from application containers. The colon ":" character preceding a specified source or destination indicates a remote file or path. Sources and destinations can be file names, directory names, or full paths.
run [--instance instance] [appname] [command]
Run an arbitrary command on a running instance.
stats [appname]
Display resource usage for the application
instances [appname]
List application instances
open [appname]
Open primary application URL in a browser
open URL
Open any URL in a browser [HTTP]
open api
Open target web console in a browser [HTTPS]

Application Environment

env [appname]
List application environment variables
env-add [appname] variable [=] value
Add an environment variable in an application
env-del [appname] variable
Delete an environment variable in an application

Services

service servicename
Shows the specific details of a particular service
services
Lists of services available and provisioned
create-service service [--name servicename] [--bind appname]
Create a provisioned service
create-service service servicename
Create a provisioned service and assign it name
create-service service servicename [appname]
Create a provisioned service, assign it name, and bind to appname
delete-service [--all] [servicename]
Delete a provisioned service by servicename, or delete all services not bound to any application using --all
bind-service [servicename] [appname]
Bind a service to an application
unbind-service [servicename] [appname]
Unbind service from the application
clone-services src-app dst-app
Clone service bindings from src-app application to dst-app
dbshell [appname]* [servicename]
Invoke interactive db shell for a bound service.
tunnel [servicename] [--port port] [--allow-http]
Create a local tunnel to a service.
tunnel [servicename] [client-command] [--allow-http]
As above, and start a local client.

Administration

user
Display user account information
passwd
Change the password for the current user
logout { URL | --all }
Logs current user out of the current target. With an API endpoint URL argument, logs user out of the specified target only. With --all argument, logs user out of all targets.
add-user [--email email] [--passwd password] [--admin] (admin)
Register a new user. If --admin is specified, grant the new user admin privileges.
delete-user email (admin)
Delete a user and all associated applications and services
users (admin)
List all users and associated applications
admin grant|revoke email (admin)
Grant or revoke admin privileges for the specified user. The email address is validated against the list of known users and rejected if unknown. Caution: The revoke command can be used on the current user. Be careful not to lock yourself out.
admin list (admin)
List users with admin privileges.
admin patch [patchfile|name|url]
Upload and execute patchfile (via ssh) to modify the server. Will ask for the stackato password.
admin report [destinationfile] (admin)
Retrieve a gzip compressed tarball of a Stackato system report from the primary node. Used for diagnosing server issues. If output filename is not specified, it defaults to <target>-report.tgz. To generate a report for a node other than the primary, run kato report on that node.

System

runtimes
Display the supported runtimes of the target system
frameworks
Display the recognized frameworks of the target system

Host File

host add [--dry-run] [<ip-address> <host>]

host update [--dry-run] [<ip-address> <host>]

host remove [--dry-run] [<ip-address>|<host>]

host list

Manipulate the hosts file on the Stackato client system. Add mappings, replace, remove, and show them.

Note

Unlike most stackato command options, this one operates on the client system, not the target system.

Misc

aliases
List aliases
alias alias [=] command
Create an alias for a command
unalias alias
Remove an alias
targets
List known targets and associated authorization tokens

Users, Groups, and Limits

group
Show the current group. May be none.
group groupname
Make the named group the current group to use. Once set, the group name does not need to be specified for stackato groups commands.
group --reset
Unset the current group
groups create groupname (admin)
Create a new named group
groups delete groupname (admin)
Remove the named group
groups (admin)
List the known groups, and the users belonging to them
limits { groupname | username } [--mem mem] [--apps N] [--appuris N] [--services N] [--sudo { true | false }]
Set (admin only) or retrieve limits for a group or user. Without groupname or username use current group. Without current group use current user.
groups limits groupname
Displays the current limits for a group
groups add-user groupname username (admin)
Add the specified user username to the group groupname
groups delete-user groupname username (admin)
Remove the specified user username from the group groupname
groups users [groupname]
List users belonging to group groupname. Without groupname, list for the current group. Non-admin users can only query groups for which they are a member.

Help

help [command]
Get general help or help on a specific command
options
Get help on available options