Update related vela show/status docs

updated related `vela show/status` docs, also update
`vela ls/delete` related documentation
This commit is contained in:
zzxwill
2020-11-02 11:49:48 +08:00
parent 5f34351706
commit f77999e8dc
54 changed files with 151 additions and 167 deletions

View File

@@ -74,43 +74,60 @@ vela env init myenv --namespace myenv --email my@email.com --domain kubevela.io
For example, use the following command to create and run an application.
```shell script
$ vela comp deploy mycomp -t webservice --image crccheck/hello-world --port 8000
Creating AppConfig appcomp
SUCCEED
$ vela svc deploy mysvc -t webservice --image crccheck/hello-world --port 8000 -a abc
App abc deployed
```
* Add Trait
```shell script
$ vela route mycomp
Adding route for app abc
Succeeded!
$ vela route abc
Adding route for app mysvc
⠋ Deploying ...
✅ Application Deployed Successfully!
- Name: mysvc
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:17:28 +0800 CST
Updated at: 2020-11-02T11:21:23+08:00
Routes:
- route: Visiting URL: http://abc.kubevela.io IP: 47.242.68.137
```
* Check Status
```
$ vela comp status abc
Showing status of Component abc deployed in Environment t2
Component Status:
Name: abc PodSpecWorkload(type) UNKNOWN APIVersion standard.oam.dev/v1alpha1 Kind PodSpecWorkload workload is unknown for HealthScope
Traits
└─Trait/route
Last Deployment:
Created at: 2020-09-18 18:47:09 +0800 CST
Updated at: 2020-09-18T18:47:16+08:00
$ vela status abc
About:
Name: abc
Namespace: default
Created at: 2020-11-02 11:17:28.067738 +0800 CST
Updated at: 2020-11-02 11:28:13.490986 +0800 CST
Services:
- Name: mysvc
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:17:28 +0800 CST
Updated at: 2020-11-02T11:28:13+08:00
Routes:
- route: Visiting URL: http://abc.kubevela.io IP: 47.242.68.137
```
* Delete App
```shell script
$ vela app ls
abc
$ vela ls
SERVICE APP TYPE TRAITS STATUS CREATED-TIME
mysvc abc Deployed 2020-11-02 11:17:28 +0800 CST
$ vela app delete abc
Deleting Application "abc"
delete apps succeed abc from t2
$ vela delete abc
Deleting Application "abc"
delete apps succeed abc from default
```
## Tests

View File

@@ -36,6 +36,7 @@ vela [flags]
* [vela route](vela_route.md) - Attach route trait to an app
* [vela scaler](vela_scaler.md) - Attach scaler trait to an app
* [vela show](vela_show.md) - Get details of an application
* [vela status](vela_status.md) - get status of an application
* [vela svc](vela_svc.md) - Manage services
* [vela system](vela_system.md) - System management utilities
* [vela template](vela_template.md) - Manage templates
@@ -44,4 +45,4 @@ vela [flags]
* [vela version](vela_version.md) - Prints out build version information
* [vela workloads](vela_workloads.md) - List workloads
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -28,6 +28,5 @@ vela app <command>
* [vela](vela.md) -
* [vela app run](vela_app_run.md) - Run a bundle of OAM Applications
* [vela app status](vela_app_status.md) - get status of an application
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela app run myAppBundle
* [vela app](vela_app.md) - Manage applications
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ Capability Management with config, list, add, remove capabilities
* [vela cap ls](vela_cap_ls.md) - List all capabilities in center
* [vela cap remove](vela_cap_remove.md) - Remove capability from cluster
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela cap add mycenter/route
* [vela cap](vela_cap.md) - Capability Management
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ Manage Capability Center with config, sync, list
* [vela cap center remove](vela_cap_center_remove.md) - Remove specified capability center
* [vela cap center sync](vela_cap_center_sync.md) - Sync capabilities from remote center, default to sync all centers
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela cap center config mycenter https://github.com/oam-dev/catalog/cap-center
* [vela cap center](vela_cap_center.md) - Manage Capability Center
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela cap center ls
* [vela cap center](vela_cap_center.md) - Manage Capability Center
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela cap center remove mycenter
* [vela cap center](vela_cap_center.md) - Manage Capability Center
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela cap center sync mycenter
* [vela cap center](vela_cap_center.md) - Manage Capability Center
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela cap ls
* [vela cap](vela_cap.md) - Capability Management
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela cap remove route
* [vela cap](vela_cap.md) - Capability Management
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -27,4 +27,4 @@ of vela commands.
* [vela completion bash](vela_completion_bash.md) - generate autocompletions script for bash
* [vela completion zsh](vela_completion_zsh.md) - generate autocompletions script for zsh
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -36,4 +36,4 @@ vela completion bash
* [vela completion](vela_completion.md) - Output shell completion code for the specified shell (bash or zsh)
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela completion zsh
* [vela completion](vela_completion.md) - Output shell completion code for the specified shell (bash or zsh)
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ Manage application configurations under given env
* [vela config ls](vela_config_ls.md) - List configs
* [vela config set](vela_config_set.md) - Set data for a config
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela config del <config-name>
* [vela config](vela_config.md) - Manage application configurations
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela config get <config-name>
* [vela config](vela_config.md) - Manage application configurations
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela config ls
* [vela config](vela_config.md) - Manage application configurations
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela config set <config-name> KEY=VALUE K2=V2
* [vela config](vela_config.md) - Manage application configurations
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -38,4 +38,4 @@ dashboard
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela delete frontend
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ Manage application environments
* [vela env ls](vela_env_ls.md) - List environments
* [vela env set](vela_env_set.md) - Set an environment
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela env delete test
* [vela env](vela_env.md) - Manage application environments
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -35,4 +35,4 @@ vela env init test --namespace test --email my@email.com
* [vela env](vela_env.md) - Manage application environments
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela env ls [env-name]
* [vela env](vela_env.md) - Manage application environments
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela env set test
* [vela env](vela_env.md) - Manage application environments
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -29,4 +29,4 @@ vela exec [flags] AppName -- COMMAND [args...]
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela init
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -31,4 +31,4 @@ vela install [flags]
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -27,4 +27,4 @@ vela logs [flags]
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela ls
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -40,4 +40,4 @@ vela metric frontend
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -28,4 +28,4 @@ vela port-forward APP_NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -37,4 +37,4 @@ vela route frontend
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -36,4 +36,4 @@ vela scaler frontend
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela show <APPLICATION-NAME>
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -1,4 +1,4 @@
## vela app status
## vela status
get status of an application
@@ -7,7 +7,7 @@ get status of an application
get status of an application, including workloads and traits of each service.
```
vela app status <APPLICATION-NAME> [flags]
vela status <APPLICATION-NAME> [flags]
```
### Examples
@@ -19,7 +19,8 @@ vela status <APPLICATION-NAME>
### Options
```
-h, --help help for status
-h, --help help for status
-s, --svc string service name
```
### Options inherited from parent commands
@@ -30,6 +31,6 @@ vela status <APPLICATION-NAME>
### SEE ALSO
* [vela app](vela_app.md) - Manage applications
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -23,6 +23,5 @@ Manage services
* [vela](vela.md) -
* [vela svc deploy](vela_svc_deploy.md) - Initialize and run a service
* [vela svc status](vela_svc_status.md) - get status of a service
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -35,4 +35,4 @@ vela svc deploy -t <SERVICE_TYPE>
* [vela svc](vela_svc.md) - Manage services
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -1,36 +0,0 @@
## vela svc status
get status of a service
### Synopsis
get status of a service, including its workload and health status
```
vela svc status <SERVICE-NAME> [flags]
```
### Examples
```
vela svc status <SERVICE-NAME>
```
### Options
```
-h, --help help for status
```
### Options inherited from parent commands
```
-a, --app string specify the name of application containing the services
-e, --env string specify environment name for application
```
### SEE ALSO
* [vela svc](vela_svc.md) - Manage services
###### Auto generated by spf13/cobra on 30-Oct-2020

View File

@@ -24,4 +24,4 @@ System management utilities
* [vela system info](vela_system_info.md) - Show vela client and cluster chartPath
* [vela system update](vela_system_update.md) - Sync definition from cluster
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ vela system info [flags]
* [vela system](vela_system.md) - System management utilities
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela system update
* [vela system](vela_system.md) - System management utilities
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -23,4 +23,4 @@ Manage templates
* [vela](vela.md) -
* [vela template context](vela_template_context.md) - Show context parameters
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela template context
* [vela template](vela_template.md) - Manage templates
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -33,4 +33,4 @@ vela traits
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -27,4 +27,4 @@ vela up
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -26,4 +26,4 @@ vela version [flags]
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -32,4 +32,4 @@ vela workloads
* [vela](vela.md) -
###### Auto generated by spf13/cobra on 30-Oct-2020
###### Auto generated by spf13/cobra on 2-Nov-2020

View File

@@ -11,51 +11,29 @@ $ vela app init
Check the application:
```console
$ vela app show myapp
$ vela show myapp
About:
Name: myapp
Created at: 2020-09-18 22:42:04.191171 +0800 CST
Updated at: 2020-09-18 22:51:11.128997 +0800 CST
Created at: 2020-11-02 11:39:04.626416 +0800 CST
Updated at: 2020-11-02 11:39:04.627998 +0800 CST
Environment:
Namespace: demo
Namespace: default
Components:
Services:
Name Type Traits
frontend webservice route
```
Check the deployed service:
```console
$ vela svc show mycomp
About:
Name: frontend
WorkloadType: webservice
Application: myapp
Environment:
Namespace: demo
Arguments:
image: crccheck/hello-world
name: frontend
port: 8000
Traits:
route:
domain: frontend.kubevela.demo
issuer: oam-env-demo
name: route
- Name: frontend
WorkloadType: webservice
Arguments:
port: 8000
image: crccheck/hello-world
Traits:
- route:
domain: frontend.example.com
issuer: oam-env-default
```
## Deploy Application Step by Step
@@ -73,8 +51,7 @@ Deploy the first service named `frontend` with `Web Service` type.
```console
$ vela svc deploy frontend -t webservice --image crccheck/hello-world --app myapp
Creating frontend ...
SUCCEED
App myapp deployed
```
> TODO auto generate a random application name, so --app myapp becomes optional
@@ -88,8 +65,7 @@ SUCCEED
```
```console
$ vela svc ls
NAME APP WORKLOAD TRAITS STATUS CREATED-TIME
backend myapp backendworker Deployed 2020-09-18 22:42:04 +0800 CST
frontend myapp webservice Deployed 2020-09-18 22:42:04 +0800 CST
$ vela ls
SERVICE APP TYPE TRAITS STATUS CREATED-TIME
frontend myapp Deployed 2020-11-02 11:39:05 +0800 CST
```

View File

@@ -60,19 +60,32 @@ app has not been deployed, creating a new deployment...
Port forward: vela port-forward testapp
SSH: vela exec testapp
Logging: vela logs testapp
App status: vela app status testapp
Service status: vela svc status express-server
App status: vela status testapp
Service status: vela status testapp --svc express-server
```
Check the status of the service:
```console
$ vela svc status express-server
Service express-server Status: HEALTHY Ready: 1/1
$ vela status testapp
About:
Name: testapp
Namespace: default
Created at: 2020-11-02 11:08:32.138484 +0800 CST
Updated at: 2020-11-02 11:08:32.138485 +0800 CST
Services:
- Name: express-server
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:08:33 +0800 CST
Updated at: 2020-11-02T11:08:32+08:00
Routes:
Last Deployment:
...
```
### Alternative: Local testing without pushing image remotely
@@ -158,11 +171,25 @@ $ vela up
Check status and we can see route trait:
```console
$ vela svc status express-server
Showing status of service(type: webservice) express-server deployed in Environment default
Service express-server Status: HEALTHY Ready: 1/1
route: Visiting URL: http://example.com IP: localhost
...
$ vela status testapp
About:
Name: testapp
Namespace: default
Created at: 2020-11-02 11:12:39.881431 +0800 CST
Updated at: 2020-11-02 11:12:39.881431 +0800 CST
Services:
- Name: express-server
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:08:33 +0800 CST
Updated at: 2020-11-02T11:12:39+08:00
Routes:
- route: Visiting URL: http://example.com IP: 47.242.171.248
```
**In [kind cluster setup](../../install.md#kind)**, we can visit the web service via localhost:

View File

@@ -199,8 +199,8 @@ func (o *appfileOptions) info(appName string, comps []*v1alpha2.Component) {
o.IO.Infof(" Port forward: vela port-forward %s\n", appName)
o.IO.Infof(" SSH: vela exec %s\n", appName)
o.IO.Infof(" Logging: vela logs %s\n", appName)
o.IO.Infof(" App status: vela app status %s\n", appName)
o.IO.Infof(" App status: vela status %s\n", appName)
for _, comp := range comps {
o.IO.Infof(" Service status: vela svc status %s\n", comp.Name)
o.IO.Infof(" Service status: vela status %s --svc %s\n", appName, comp.Name)
}
}