From 65b0450de96a2f176a47e5abf3e80a2313da9d58 Mon Sep 17 00:00:00 2001
From: lijianguo <lijianguo@zhumengyuan.com>
Date: Thu, 15 Oct 2020 15:49:28 +0800
Subject: [PATCH] chore(ps):add ps:stop/start docs

---
 src/applications/managing-app-processes.md   | 64 ++++++++++++++++----
 src/applications/managing-resource-limits.md |  2 +-
 src/quickstart/deploy-an-app.md              |  2 +-
 3 files changed, 55 insertions(+), 13 deletions(-)

diff --git a/src/applications/managing-app-processes.md b/src/applications/managing-app-processes.md
index 3d247fa56..921e51122 100644
--- a/src/applications/managing-app-processes.md
+++ b/src/applications/managing-app-processes.md
@@ -90,9 +90,9 @@ $ drycc scale sleeper=1 -a steely-mainsail
 Scaling processes... but first, coffee!
 done in 0s
 === steely-mainsail Processes
---- cmd:
+--- cmd (started): 1
 steely-mainsail-cmd-3291896318-nyrim up (v3)
---- sleeper:
+--- sleeper (started): 1
 steely-mainsail-sleeper-3291896318-oq1jr up (v3)
 ```
 
@@ -107,8 +107,9 @@ $ drycc scale sleeper=0 -a steely-mainsail
 Scaling processes... but first, coffee!
 done in 3s
 === steely-mainsail Processes
---- cmd:
+--- cmd (started): 1
 steely-mainsail-cmd-3291896318-nyrim up (v3)
+--- sleeper (started): 0
 ```
 
 ## Scaling Processes
@@ -121,7 +122,7 @@ $ drycc scale cmd=5 -a iciest-waggoner
 Scaling processes... but first, coffee!
 done in 3s
 === iciest-waggoner Processes
---- cmd:
+--- cmd (started): 5
 iciest-waggoner-web-3291896318-09j0o up (v2)
 iciest-waggoner-web-3291896318-3r7kp up (v2)
 iciest-waggoner-web-3291896318-gc4xv up (v2)
@@ -140,13 +141,13 @@ $ drycc scale web=5
 Scaling processes... but first, coffee!
 done in 4s
 === scenic-icehouse Processes
---- web:
+--- web (started): 5
 scenic-icehouse-web-3291896318-7lord up (v2)
 scenic-icehouse-web-3291896318-jn957 up (v2)
 scenic-icehouse-web-3291896318-rsekj up (v2)
 scenic-icehouse-web-3291896318-vwhnh up (v2)
 scenic-icehouse-web-3291896318-vokg7 up (v2)
---- background:
+--- background (started): 1
 scenic-icehouse-web-3291896318-background-yf8kh up (v2)
 ```
 
@@ -164,14 +165,55 @@ $ drycc scale web=3
 Scaling processes... but first, coffee!
 done in 1s
 === scenic-icehouse Processes
---- background:
+--- background (started): 1
 scenic-icehouse-web-3291896318-background-yf8kh up (v2)
---- web:
+--- web (started): 3
 scenic-icehouse-web-3291896318-7lord up (v2)
 scenic-icehouse-web-3291896318-rsekj up (v2)
 scenic-icehouse-web-3291896318-vokg7 up (v2)
 ```
 
+## Stop or Start Processes
+
+Applications deployed on Drycc Workflow,we can stop or start processes via the [process model][].
+Use `drycc ps:stop` to stop the processes, and `drycc ps:start` to start the processes
+
+```
+$ drycc ps -a echoed-lollipop
+===  echoed-lollipop Processes
+--- background (started): 1
+echoed-lollipop-background-794c749dc4-yf8kh up (v2)
+--- web (started): 3
+echoed-lollipop-web-67cfc78bdc-7lord up (v2)
+echoed-lollipop-web-67cfc78bdc-rsekj up (v2)
+echoed-lollipop-web-67cfc78bdc-vokg7 up (v2)
+```
+
+In this example, we are stopping the process type `background` and `web`.
+
+```
+$ drycc ps:stop background web -a echoed-lollipop
+Scaling processes... but first, coffee!
+done in 3s
+=== echoed-lollipop Processes
+--- background (stopped): 1
+--- web (stopped): 3
+```
+
+In this example, we are starting the process `web`, and keep the process `background` stopping.
+
+```
+$ drycc ps:start web
+Scaling processes... but first, coffee!
+done in 4s
+=== echoed-lollipop Processes
+--- background (stopped): 1
+--- web (started): 3
+echoed-lollipop-web-67cfc78bdc-4z2hw up (v2)
+echoed-lollipop-web-67cfc78bdc-fdx4n up (v2)
+echoed-lollipop-web-67cfc78bdc-h2vxf up (v2)
+```
+
 ## Autoscale
 
 Autoscale allows adding a minimum and maximum number of pods on a per process type basis. This is accomplished by specifying a target CPU usage across all available pods.
@@ -232,17 +274,17 @@ Kubernetes to terminate the old process and launch a new one in its place.
 ```
 $ drycc ps
 === scenic-icehouse Processes
---- web:
+--- web (started): 3
 scenic-icehouse-web-3291896318-7lord up (v2)
 scenic-icehouse-web-3291896318-rsekj up (v2)
 scenic-icehouse-web-3291896318-vokg7 up (v2)
---- background:
+--- background (started): 1
 scenic-icehouse-background-3291896318-yf8kh up (v2)
 $ drycc ps:restart scenic-icehouse-background-3291896318-yf8kh
 Restarting processes... but first, coffee!
 done in 6s
 === scenic-icehouse Processes
---- background:
+--- background (started): 1
 scenic-icehouse-background-3291896318-yd87g up (v2)
 ```
 
diff --git a/src/applications/managing-resource-limits.md b/src/applications/managing-resource-limits.md
index 4b2be3989..1256c3393 100644
--- a/src/applications/managing-resource-limits.md
+++ b/src/applications/managing-resource-limits.md
@@ -105,7 +105,7 @@ You can verify the CPU and memory limits by inspecting the application process P
 ```
 $ drycc ps
 === indoor-whitecap Processes
---- web:
+--- web (started): 1
 indoor-whitecap-v14-web-8slcj up (v14)
 $ kubectl --namespace=indoor-whitecap describe po indoor-whitecap-v14-web-8slcj
 Name:       indoor-whitecap-v14-web-8slcj
diff --git a/src/quickstart/deploy-an-app.md b/src/quickstart/deploy-an-app.md
index 909dbbd9e..3abb5761d 100644
--- a/src/quickstart/deploy-an-app.md
+++ b/src/quickstart/deploy-an-app.md
@@ -95,7 +95,7 @@ $ drycc scale cmd=2 -a proper-barbecue
 Scaling processes... but first, coffee!
 done in 36s
 === proper-barbecue Processes
---- cmd:
+--- cmd (started): 2
 proper-barbecue-v18-cmd-rk644 up (v18)
 proper-barbecue-v18-cmd-0ag04 up (v18)
 ```
