From f77999e8dc8923407f07ec9bd8a5186f9d3e19ff Mon Sep 17 00:00:00 2001 From: zzxwill Date: Mon, 2 Nov 2020 11:49:48 +0800 Subject: [PATCH] Update related `vela show/status` docs updated related `vela show/status` docs, also update `vela ls/delete` related documentation --- CONTRIBUTING.md | 59 +++++++++++------- docs/cli/vela.md | 3 +- docs/cli/vela_app.md | 3 +- docs/cli/vela_app_run.md | 2 +- docs/cli/vela_cap.md | 2 +- docs/cli/vela_cap_add.md | 2 +- docs/cli/vela_cap_center.md | 2 +- docs/cli/vela_cap_center_config.md | 2 +- docs/cli/vela_cap_center_ls.md | 2 +- docs/cli/vela_cap_center_remove.md | 2 +- docs/cli/vela_cap_center_sync.md | 2 +- docs/cli/vela_cap_ls.md | 2 +- docs/cli/vela_cap_remove.md | 2 +- docs/cli/vela_completion.md | 2 +- docs/cli/vela_completion_bash.md | 2 +- docs/cli/vela_completion_zsh.md | 2 +- docs/cli/vela_config.md | 2 +- docs/cli/vela_config_del.md | 2 +- docs/cli/vela_config_get.md | 2 +- docs/cli/vela_config_ls.md | 2 +- docs/cli/vela_config_set.md | 2 +- docs/cli/vela_dashboard.md | 2 +- docs/cli/vela_delete.md | 2 +- docs/cli/vela_env.md | 2 +- docs/cli/vela_env_delete.md | 2 +- docs/cli/vela_env_init.md | 2 +- docs/cli/vela_env_ls.md | 2 +- docs/cli/vela_env_set.md | 2 +- docs/cli/vela_exec.md | 2 +- docs/cli/vela_init.md | 2 +- docs/cli/vela_install.md | 2 +- docs/cli/vela_logs.md | 2 +- docs/cli/vela_ls.md | 2 +- docs/cli/vela_metric.md | 2 +- docs/cli/vela_port-forward.md | 2 +- docs/cli/vela_route.md | 2 +- docs/cli/vela_scaler.md | 2 +- docs/cli/vela_show.md | 2 +- .../{vela_app_status.md => vela_status.md} | 11 ++-- docs/cli/vela_svc.md | 3 +- docs/cli/vela_svc_deploy.md | 2 +- docs/cli/vela_svc_status.md | 36 ----------- docs/cli/vela_system.md | 2 +- docs/cli/vela_system_info.md | 2 +- docs/cli/vela_system_update.md | 2 +- docs/cli/vela_template.md | 2 +- docs/cli/vela_template_context.md | 2 +- docs/cli/vela_traits.md | 2 +- docs/cli/vela_up.md | 2 +- docs/cli/vela_version.md | 2 +- docs/cli/vela_workloads.md | 2 +- docs/developers/deploy-app.md | 60 ++++++------------- docs/developers/devex/appfile.md | 49 +++++++++++---- pkg/commands/up.go | 4 +- 54 files changed, 151 insertions(+), 167 deletions(-) rename docs/cli/{vela_app_status.md => vela_status.md} (63%) delete mode 100644 docs/cli/vela_svc_status.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e2a53572..bbe7e0ac7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/docs/cli/vela.md b/docs/cli/vela.md index cc49b0a35..5b7bf52fe 100644 --- a/docs/cli/vela.md +++ b/docs/cli/vela.md @@ -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 diff --git a/docs/cli/vela_app.md b/docs/cli/vela_app.md index 5c9da9424..a0a8a9e02 100644 --- a/docs/cli/vela_app.md +++ b/docs/cli/vela_app.md @@ -28,6 +28,5 @@ vela app * [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 diff --git a/docs/cli/vela_app_run.md b/docs/cli/vela_app_run.md index a135b6649..a2687e21d 100644 --- a/docs/cli/vela_app_run.md +++ b/docs/cli/vela_app_run.md @@ -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 diff --git a/docs/cli/vela_cap.md b/docs/cli/vela_cap.md index 0b5d817a4..1ecbb5067 100644 --- a/docs/cli/vela_cap.md +++ b/docs/cli/vela_cap.md @@ -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 diff --git a/docs/cli/vela_cap_add.md b/docs/cli/vela_cap_add.md index 7b72a68a4..21408ee9f 100644 --- a/docs/cli/vela_cap_add.md +++ b/docs/cli/vela_cap_add.md @@ -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 diff --git a/docs/cli/vela_cap_center.md b/docs/cli/vela_cap_center.md index 0dd20f9a3..71bc6dfce 100644 --- a/docs/cli/vela_cap_center.md +++ b/docs/cli/vela_cap_center.md @@ -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 diff --git a/docs/cli/vela_cap_center_config.md b/docs/cli/vela_cap_center_config.md index 4be3309ec..a1a1e9076 100644 --- a/docs/cli/vela_cap_center_config.md +++ b/docs/cli/vela_cap_center_config.md @@ -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 diff --git a/docs/cli/vela_cap_center_ls.md b/docs/cli/vela_cap_center_ls.md index caf89d983..de01e4628 100644 --- a/docs/cli/vela_cap_center_ls.md +++ b/docs/cli/vela_cap_center_ls.md @@ -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 diff --git a/docs/cli/vela_cap_center_remove.md b/docs/cli/vela_cap_center_remove.md index b98400044..a87bdf73a 100644 --- a/docs/cli/vela_cap_center_remove.md +++ b/docs/cli/vela_cap_center_remove.md @@ -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 diff --git a/docs/cli/vela_cap_center_sync.md b/docs/cli/vela_cap_center_sync.md index d8ab46351..168ff8168 100644 --- a/docs/cli/vela_cap_center_sync.md +++ b/docs/cli/vela_cap_center_sync.md @@ -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 diff --git a/docs/cli/vela_cap_ls.md b/docs/cli/vela_cap_ls.md index 625bc55fc..8e86d7195 100644 --- a/docs/cli/vela_cap_ls.md +++ b/docs/cli/vela_cap_ls.md @@ -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 diff --git a/docs/cli/vela_cap_remove.md b/docs/cli/vela_cap_remove.md index e6f89e577..469d2403d 100644 --- a/docs/cli/vela_cap_remove.md +++ b/docs/cli/vela_cap_remove.md @@ -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 diff --git a/docs/cli/vela_completion.md b/docs/cli/vela_completion.md index 521fbb9ec..55fb84adf 100644 --- a/docs/cli/vela_completion.md +++ b/docs/cli/vela_completion.md @@ -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 diff --git a/docs/cli/vela_completion_bash.md b/docs/cli/vela_completion_bash.md index 0b29ec522..9565c4739 100644 --- a/docs/cli/vela_completion_bash.md +++ b/docs/cli/vela_completion_bash.md @@ -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 diff --git a/docs/cli/vela_completion_zsh.md b/docs/cli/vela_completion_zsh.md index a2d7353ff..90d4d941a 100644 --- a/docs/cli/vela_completion_zsh.md +++ b/docs/cli/vela_completion_zsh.md @@ -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 diff --git a/docs/cli/vela_config.md b/docs/cli/vela_config.md index 1fc264053..3e1409153 100644 --- a/docs/cli/vela_config.md +++ b/docs/cli/vela_config.md @@ -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 diff --git a/docs/cli/vela_config_del.md b/docs/cli/vela_config_del.md index 0e6cb524b..887406410 100644 --- a/docs/cli/vela_config_del.md +++ b/docs/cli/vela_config_del.md @@ -32,4 +32,4 @@ vela config del * [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 diff --git a/docs/cli/vela_config_get.md b/docs/cli/vela_config_get.md index b7b863c30..d96451552 100644 --- a/docs/cli/vela_config_get.md +++ b/docs/cli/vela_config_get.md @@ -32,4 +32,4 @@ vela config get * [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 diff --git a/docs/cli/vela_config_ls.md b/docs/cli/vela_config_ls.md index 715002186..0b537b933 100644 --- a/docs/cli/vela_config_ls.md +++ b/docs/cli/vela_config_ls.md @@ -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 diff --git a/docs/cli/vela_config_set.md b/docs/cli/vela_config_set.md index 63fb713a1..7c2955091 100644 --- a/docs/cli/vela_config_set.md +++ b/docs/cli/vela_config_set.md @@ -32,4 +32,4 @@ vela config set 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 diff --git a/docs/cli/vela_dashboard.md b/docs/cli/vela_dashboard.md index 5ea3ccef7..1e2eac94e 100644 --- a/docs/cli/vela_dashboard.md +++ b/docs/cli/vela_dashboard.md @@ -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 diff --git a/docs/cli/vela_delete.md b/docs/cli/vela_delete.md index ac25a4e19..f506abcf8 100644 --- a/docs/cli/vela_delete.md +++ b/docs/cli/vela_delete.md @@ -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 diff --git a/docs/cli/vela_env.md b/docs/cli/vela_env.md index d218365e9..00bf56539 100644 --- a/docs/cli/vela_env.md +++ b/docs/cli/vela_env.md @@ -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 diff --git a/docs/cli/vela_env_delete.md b/docs/cli/vela_env_delete.md index 505c7c49b..92e81715e 100644 --- a/docs/cli/vela_env_delete.md +++ b/docs/cli/vela_env_delete.md @@ -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 diff --git a/docs/cli/vela_env_init.md b/docs/cli/vela_env_init.md index ea50d7347..209b1d80f 100644 --- a/docs/cli/vela_env_init.md +++ b/docs/cli/vela_env_init.md @@ -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 diff --git a/docs/cli/vela_env_ls.md b/docs/cli/vela_env_ls.md index 0b96fa52a..621e7bcf8 100644 --- a/docs/cli/vela_env_ls.md +++ b/docs/cli/vela_env_ls.md @@ -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 diff --git a/docs/cli/vela_env_set.md b/docs/cli/vela_env_set.md index f169f3d4a..12b3d9aae 100644 --- a/docs/cli/vela_env_set.md +++ b/docs/cli/vela_env_set.md @@ -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 diff --git a/docs/cli/vela_exec.md b/docs/cli/vela_exec.md index d68ea853e..3d9c70ead 100644 --- a/docs/cli/vela_exec.md +++ b/docs/cli/vela_exec.md @@ -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 diff --git a/docs/cli/vela_init.md b/docs/cli/vela_init.md index a556e31ba..b1cc3e895 100644 --- a/docs/cli/vela_init.md +++ b/docs/cli/vela_init.md @@ -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 diff --git a/docs/cli/vela_install.md b/docs/cli/vela_install.md index 1b4428a0e..2423518a3 100644 --- a/docs/cli/vela_install.md +++ b/docs/cli/vela_install.md @@ -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 diff --git a/docs/cli/vela_logs.md b/docs/cli/vela_logs.md index 23aebcb2b..2c4d7febc 100644 --- a/docs/cli/vela_logs.md +++ b/docs/cli/vela_logs.md @@ -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 diff --git a/docs/cli/vela_ls.md b/docs/cli/vela_ls.md index 20f31a39c..f450dd634 100644 --- a/docs/cli/vela_ls.md +++ b/docs/cli/vela_ls.md @@ -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 diff --git a/docs/cli/vela_metric.md b/docs/cli/vela_metric.md index a1df716e2..8771e7153 100644 --- a/docs/cli/vela_metric.md +++ b/docs/cli/vela_metric.md @@ -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 diff --git a/docs/cli/vela_port-forward.md b/docs/cli/vela_port-forward.md index b36ff8b57..b43448cf1 100644 --- a/docs/cli/vela_port-forward.md +++ b/docs/cli/vela_port-forward.md @@ -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 diff --git a/docs/cli/vela_route.md b/docs/cli/vela_route.md index e90d7e79b..0cc646fdb 100644 --- a/docs/cli/vela_route.md +++ b/docs/cli/vela_route.md @@ -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 diff --git a/docs/cli/vela_scaler.md b/docs/cli/vela_scaler.md index 6ff02c6fb..bdcf1a1e4 100644 --- a/docs/cli/vela_scaler.md +++ b/docs/cli/vela_scaler.md @@ -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 diff --git a/docs/cli/vela_show.md b/docs/cli/vela_show.md index 45467b3b5..74e9a09ff 100644 --- a/docs/cli/vela_show.md +++ b/docs/cli/vela_show.md @@ -33,4 +33,4 @@ vela show * [vela](vela.md) - -###### Auto generated by spf13/cobra on 30-Oct-2020 +###### Auto generated by spf13/cobra on 2-Nov-2020 diff --git a/docs/cli/vela_app_status.md b/docs/cli/vela_status.md similarity index 63% rename from docs/cli/vela_app_status.md rename to docs/cli/vela_status.md index 062565dec..735fcd4c0 100644 --- a/docs/cli/vela_app_status.md +++ b/docs/cli/vela_status.md @@ -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 [flags] +vela status [flags] ``` ### Examples @@ -19,7 +19,8 @@ vela status ### 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 ### 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 diff --git a/docs/cli/vela_svc.md b/docs/cli/vela_svc.md index 2d1a656aa..e1063535f 100644 --- a/docs/cli/vela_svc.md +++ b/docs/cli/vela_svc.md @@ -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 diff --git a/docs/cli/vela_svc_deploy.md b/docs/cli/vela_svc_deploy.md index 2d51df8a0..f356683ce 100644 --- a/docs/cli/vela_svc_deploy.md +++ b/docs/cli/vela_svc_deploy.md @@ -35,4 +35,4 @@ vela svc deploy -t * [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 diff --git a/docs/cli/vela_svc_status.md b/docs/cli/vela_svc_status.md deleted file mode 100644 index 6abb93441..000000000 --- a/docs/cli/vela_svc_status.md +++ /dev/null @@ -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 [flags] -``` - -### Examples - -``` -vela svc status -``` - -### 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 diff --git a/docs/cli/vela_system.md b/docs/cli/vela_system.md index 71667ab6a..9ba83f19c 100644 --- a/docs/cli/vela_system.md +++ b/docs/cli/vela_system.md @@ -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 diff --git a/docs/cli/vela_system_info.md b/docs/cli/vela_system_info.md index dfba5860a..c98d34c53 100644 --- a/docs/cli/vela_system_info.md +++ b/docs/cli/vela_system_info.md @@ -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 diff --git a/docs/cli/vela_system_update.md b/docs/cli/vela_system_update.md index 8ced3409f..e072c60d8 100644 --- a/docs/cli/vela_system_update.md +++ b/docs/cli/vela_system_update.md @@ -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 diff --git a/docs/cli/vela_template.md b/docs/cli/vela_template.md index a79af33af..5a9a7fcab 100644 --- a/docs/cli/vela_template.md +++ b/docs/cli/vela_template.md @@ -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 diff --git a/docs/cli/vela_template_context.md b/docs/cli/vela_template_context.md index f7d9672d8..e11bfa010 100644 --- a/docs/cli/vela_template_context.md +++ b/docs/cli/vela_template_context.md @@ -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 diff --git a/docs/cli/vela_traits.md b/docs/cli/vela_traits.md index e1e57e921..1cbd492be 100644 --- a/docs/cli/vela_traits.md +++ b/docs/cli/vela_traits.md @@ -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 diff --git a/docs/cli/vela_up.md b/docs/cli/vela_up.md index 2e999ace3..c125828e3 100644 --- a/docs/cli/vela_up.md +++ b/docs/cli/vela_up.md @@ -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 diff --git a/docs/cli/vela_version.md b/docs/cli/vela_version.md index 1c044e337..996c1c36a 100644 --- a/docs/cli/vela_version.md +++ b/docs/cli/vela_version.md @@ -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 diff --git a/docs/cli/vela_workloads.md b/docs/cli/vela_workloads.md index f0d6124c8..6033e7a20 100644 --- a/docs/cli/vela_workloads.md +++ b/docs/cli/vela_workloads.md @@ -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 diff --git a/docs/developers/deploy-app.md b/docs/developers/deploy-app.md index 6e747ca6f..3b10d2c09 100644 --- a/docs/developers/deploy-app.md +++ b/docs/developers/deploy-app.md @@ -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 ``` diff --git a/docs/developers/devex/appfile.md b/docs/developers/devex/appfile.md index c25c250ae..47e9973c8 100644 --- a/docs/developers/devex/appfile.md +++ b/docs/developers/devex/appfile.md @@ -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: diff --git a/pkg/commands/up.go b/pkg/commands/up.go index a790a5ce2..49dcf21f8 100644 --- a/pkg/commands/up.go +++ b/pkg/commands/up.go @@ -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) } }