1414
1515 apps manage applications used to provide services
1616 clusters manage clusters used to host applications
17- containers manage containers used to handle requests and jobs
17+ ps manage processes inside an app container
1818 config manage environment variables that define app config
1919 builds manage builds created using `git push`
2020 releases manage releases of an application
2525Developer shortcut commands::
2626
2727 create create a new application
28- scale scale containers by type (web=2, worker=1)
28+ scale scale processes by type (web=2, worker=1)
2929 info view information about the current app
3030 open open a URL to the app in a browser
3131 logs view aggregated log info for the app
@@ -549,7 +549,7 @@ def apps_info(self, args):
549549 print ("=== {} Application" .format (app ))
550550 print (json .dumps (response .json (), indent = 2 ))
551551 print ()
552- self .containers_list (args )
552+ self .ps_list (args )
553553 print ()
554554 else :
555555 raise ResponseError (response )
@@ -1055,24 +1055,24 @@ def config_unset(self, args):
10551055 else :
10561056 raise ResponseError (response )
10571057
1058- def containers (self , args ):
1058+ def ps (self , args ):
10591059 """
1060- Valid commands for containers :
1060+ Valid commands for processes :
10611061
1062- containers :list list application containers
1063- containers :scale scale app containers (e.g. web=4 worker=2)
1062+ ps :list list application processes
1063+ ps :scale scale processes (e.g. web=4 worker=2)
10641064
10651065 Use `deis help [command]` to learn more
10661066 """
1067- sys .argv [1 ] = 'containers :list'
1068- args = docopt (self .containers_list .__doc__ )
1069- return self .containers_list (args )
1067+ sys .argv [1 ] = 'ps :list'
1068+ args = docopt (self .ps_list .__doc__ )
1069+ return self .ps_list (args )
10701070
1071- def containers_list (self , args , app = None ):
1071+ def ps_list (self , args , app = None ):
10721072 """
1073- List containers servicing an application
1073+ List processes servicing an application
10741074
1075- Usage: deis containers :list [--app=<app>]
1075+ Usage: deis ps :list [--app=<app>]
10761076 """
10771077 if not app :
10781078 app = args .get ('--app' )
@@ -1082,10 +1082,10 @@ def containers_list(self, args, app=None):
10821082 "/api/apps/{}/containers" .format (app ))
10831083 if response .status_code != requests .codes .ok : # @UndefinedVariable
10841084 raise ResponseError (response )
1085- containers = response .json ()
1086- print ("=== {} Containers " .format (app ))
1085+ processes = response .json ()
1086+ print ("=== {} Processes " .format (app ))
10871087 c_map = {}
1088- for item in containers ['results' ]:
1088+ for item in processes ['results' ]:
10891089 c_map .setdefault (item ['type' ], []).append (item )
10901090 print ()
10911091 for c_type in c_map .keys ():
@@ -1094,13 +1094,13 @@ def containers_list(self, args, app=None):
10941094 print ("{type}.{num} {state} ({release})" .format (** c ))
10951095 print ()
10961096
1097- def containers_scale (self , args ):
1097+ def ps_scale (self , args ):
10981098 """
1099- Scale an application's containers by type
1099+ Scale an application's processes by type
11001100
1101- Example: deis containers :scale web=4 worker=2
1101+ Example: deis ps :scale web=4 worker=2
11021102
1103- Usage: deis containers :scale <type=num>... [--app=<app>]
1103+ Usage: deis ps :scale <type=num>... [--app=<app>]
11041104 """
11051105 app = args .get ('--app' )
11061106 if not app :
@@ -1109,7 +1109,7 @@ def containers_scale(self, args):
11091109 for type_num in args .get ('<type=num>' ):
11101110 typ , count = type_num .split ('=' )
11111111 body .update ({typ : int (count )})
1112- print ('Scaling containers ... but first, coffee!' )
1112+ print ('Scaling processes ... but first, coffee!' )
11131113 try :
11141114 progress = TextProgress ()
11151115 progress .start ()
@@ -1122,7 +1122,7 @@ def containers_scale(self, args):
11221122 progress .join ()
11231123 if response .status_code == requests .codes .no_content : # @UndefinedVariable
11241124 print ('done in {}s\n ' .format (int (time .time () - before )))
1125- self .containers_list ({}, app )
1125+ self .ps_list ({}, app )
11261126 else :
11271127 raise ResponseError (response )
11281128
@@ -1568,8 +1568,7 @@ def shortcuts(self, args):
15681568 ('register' , 'auth:register' ),
15691569 ('login' , 'auth:login' ),
15701570 ('logout' , 'auth:logout' ),
1571- ('ps' , 'containers:list' ),
1572- ('scale' , 'containers:scale' ),
1571+ ('scale' , 'ps:scale' ),
15731572 ('rollback' , 'releases:rollback' ),
15741573 ('sharing' , 'perms:list' ),
15751574 ('sharing:list' , 'perms:list' ),
0 commit comments