From 8cf559e826dc2cb28b3bb2684fee671eea393f33 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Fri, 11 Dec 2020 18:18:06 -0800 Subject: [PATCH] Move flags above examples --- .../en/reference/cli/dapr-completion.md | 13 +++---- .../en/reference/cli/dapr-components.md | 14 +++---- .../en/reference/cli/dapr-configurations.md | 13 +++---- .../en/reference/cli/dapr-dashboard.md | 20 +++++----- .../content/en/reference/cli/dapr-init.md | 34 ++++++++-------- .../content/en/reference/cli/dapr-invoke.md | 20 +++++----- .../content/en/reference/cli/dapr-list.md | 14 +++---- .../content/en/reference/cli/dapr-logs.md | 15 +++---- .../content/en/reference/cli/dapr-publish.md | 16 ++++---- daprdocs/content/en/reference/cli/dapr-run.md | 39 +++++++++---------- .../content/en/reference/cli/dapr-status.md | 15 ++++--- .../content/en/reference/cli/dapr-stop.md | 14 +++---- .../en/reference/cli/dapr-uninstall.md | 20 +++++----- 13 files changed, 122 insertions(+), 125 deletions(-) diff --git a/daprdocs/content/en/reference/cli/dapr-completion.md b/daprdocs/content/en/reference/cli/dapr-completion.md index 11717bcb652..5e6e80f7ca8 100644 --- a/daprdocs/content/en/reference/cli/dapr-completion.md +++ b/daprdocs/content/en/reference/cli/dapr-completion.md @@ -16,6 +16,12 @@ dapr completion [flags] dapr completion [command] ``` +## Flags + +| Name | Environment Variable | Default | Description | +|------|----------------------|---------|-------------| +| `--help`, `-h` | | | Prints this help message | + ## Examples ### Installing bash completion on macOS using Homebrew @@ -96,10 +102,3 @@ bash Generates bash completion scripts powershell Generates powershell completion scripts zsh Generates zsh completion scripts ``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--help`, `-h` | | | Prints this help message | -| diff --git a/daprdocs/content/en/reference/cli/dapr-components.md b/daprdocs/content/en/reference/cli/dapr-components.md index 2b1f62e4416..693ae4e108c 100644 --- a/daprdocs/content/en/reference/cli/dapr-components.md +++ b/daprdocs/content/en/reference/cli/dapr-components.md @@ -19,16 +19,16 @@ List all Dapr components. dapr components [flags] ``` -## Examples - -### List Kubernetes components -```bash -dapr components -k -``` - ## Flags | Name | Environment Variable | Default | Description | --- | --- | --- | --- | | `--help`, `-h` | | | Print this help message | | `--kubernetes`, `-k` | | `false` | List all Dapr components in a Kubernetes cluster | + +## Examples + +### List Kubernetes components +```bash +dapr components -k +``` diff --git a/daprdocs/content/en/reference/cli/dapr-configurations.md b/daprdocs/content/en/reference/cli/dapr-configurations.md index 0cab46c939f..e01dd2ad607 100644 --- a/daprdocs/content/en/reference/cli/dapr-configurations.md +++ b/daprdocs/content/en/reference/cli/dapr-configurations.md @@ -19,13 +19,6 @@ List all Dapr configurations. dapr configurations [flags] ``` -## Examples - -### List Kubernetes Dapr configurations -```bash -dapr configurations -k -``` - ## Flags | Name | Environment Variable | Default | Description @@ -35,3 +28,9 @@ dapr configurations -k | `--output`, `-o` | | `list`| Output format (options: json or yaml or list) | `--help`, `-h` | | | Print this help message | +## Examples + +### List Kubernetes Dapr configurations +```bash +dapr configurations -k +``` diff --git a/daprdocs/content/en/reference/cli/dapr-dashboard.md b/daprdocs/content/en/reference/cli/dapr-dashboard.md index 7f5042fe752..ade1bf52512 100644 --- a/daprdocs/content/en/reference/cli/dapr-dashboard.md +++ b/daprdocs/content/en/reference/cli/dapr-dashboard.md @@ -19,6 +19,16 @@ Start [Dapr dashboard](https://github.com/dapr/dashboard). dapr dashboard [flags] ``` +## Flags + +| Name | Environment Variable | Default | Description | +|------|----------------------|---------|-------------| +| `--help`, `-h` | | | Prints this help message | +| `--kubernetes`, `-k` | | `false` | Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster | +| `--namespace`, `-n` | | `dapr-system` | The namespace where Dapr dashboard is running | +| `--port`, `-p` | | `8080` | The local port on which to serve Dapr dashboard | +| `--version`, `-v` | | `false` | Print the version for Dapr dashboard | + ## Examples ### Start dashboard locally @@ -40,13 +50,3 @@ dapr dashboard -k ```bash dapr dashboard -k -p 9999 ``` - -## Flags - -| Name | Environment Variable | Default | Description | -|------|----------------------|---------|-------------| -| `--help`, `-h` | | | Prints this help message | -| `--kubernetes`, `-k` | | `false` | Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster | -| `--namespace`, `-n` | | `dapr-system` | The namespace where Dapr dashboard is running | -| `--port`, `-p` | | `8080` | The local port on which to serve Dapr dashboard | -| `--version`, `-v` | | `false` | Print the version for Dapr dashboard | diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index 5880dc720f3..959a4324f1f 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -19,6 +19,19 @@ Install Dapr on supported hosting platforms. dapr init [flags] ``` +## Flags + +| Name | Environment Variable | Default | Description +| --- | --- | --- | --- | +| `--enable-ha` | | `false` | Enable high availability (HA) mode | +| `--enable-mtls` | | `true` | Enable mTLS in your cluster | +| `--help`, `-h` | | | Print this help message | +| `--kubernetes`, `-k` | | `false` | Deploy Dapr to a Kubernetes cluster | +| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to install Dapr in | +| `--network` | `DAPR_NETWORK` | | The Docker network on which to deploy the Dapr runtime | +| `--runtime-version` | | `latest` | The version of the Dapr runtime to install, for example: `1.0.0` | +| `--slim`, `-s` | | `false` | Exclude placement service, Redis and Zipkin containers from self-hosted installation | + ## Examples ### Initialize Dapr in self-hosted mode @@ -31,30 +44,17 @@ dapr init dapr init -k ``` -### Initialize particular Dapr runtime in self-hosted mode +### Initialize specified version of Dapr runtime in self-hosted mode ```bash dapr init --runtime-version 0.10.0 ``` -### Initialize particular Dapr runtime in Kubernetes +### Initialize specified version of Dapr runtime in Kubernetes ```bash dapr init -k --runtime-version 0.10.0 ``` -### Initialize Dapr in slim self-hosted mode +### Initialize Dapr in [slim self-hosted mode]({{< ref self-hosted-no-docker.md >}}) ```bash dapr init -s -``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--enable-ha` | | `false` | Enable high availability (HA) mode | -| `--enable-mtls` | | `true` | Enable mTLS in your cluster | -| `--help`, `-h` | | | Print this help message | -| `--kubernetes`, `-k` | | `false` | Deploy Dapr to a Kubernetes cluster | -| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to install Dapr in | -| `--network` | `DAPR_NETWORK` | | The Docker network on which to deploy the Dapr runtime | -| `--runtime-version` | | `latest` | The version of the Dapr runtime to install, for example: `1.0.0` | -| `--slim`, `-s` | | `false` | Exclude placement service, Redis and Zipkin containers from self-hosted installation | +``` \ No newline at end of file diff --git a/daprdocs/content/en/reference/cli/dapr-invoke.md b/daprdocs/content/en/reference/cli/dapr-invoke.md index fb321d188a0..78603539294 100644 --- a/daprdocs/content/en/reference/cli/dapr-invoke.md +++ b/daprdocs/content/en/reference/cli/dapr-invoke.md @@ -18,6 +18,16 @@ Invoke a method on a given Dapr application. dapr invoke [flags] ``` +## Flags + +| Name | Environment Variable | Default | Description +| --- | --- | --- | --- | +| `--app-id`, `-a` | | | The application id to invoke | +| `--help`, `-h` | | | Print this help message | +| `--method`, `-m` | | | The method to invoke | +| `--data`, `-d` | | | The JSON serialized data string (optional) | +| `--verb`, `-v` | | `POST` | The HTTP verb to use | + ## Examples ### Invoke a sample method on target app with POST Verb @@ -29,13 +39,3 @@ dapr invoke --app-id target --method sample --data '{"key":"value"}' ```bash dapr invoke --app-id target --method sample --verb GET ``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--app-id`, `-a` | | | The application id to invoke | -| `--help`, `-h` | | | Print this help message | -| `--method`, `-m` | | | The method to invoke | -| `--data`, `-d` | | | The JSON serialized data string (optional) | -| `--verb`, `-v` | | `POST` | The HTTP verb to use | diff --git a/daprdocs/content/en/reference/cli/dapr-list.md b/daprdocs/content/en/reference/cli/dapr-list.md index 21f086ba930..108d6c4b778 100644 --- a/daprdocs/content/en/reference/cli/dapr-list.md +++ b/daprdocs/content/en/reference/cli/dapr-list.md @@ -19,6 +19,13 @@ List all Dapr instances. dapr list [flags] ``` +## Flags + +| Name | Environment Variable | Default | Description +| --- | --- | --- | --- | +| `--help`, `-h` | | | Print this help message | +| `--kubernetes`, `-k` | | `false` | List all Dapr pods in a Kubernetes cluster | + ## Examples ### List Dapr instances in self-hosted mode @@ -30,10 +37,3 @@ dapr list ```bash dapr list -k ``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--help`, `-h` | | | Print this help message | -| `--kubernetes`, `-k` | | `false` | List all Dapr pods in a Kubernetes cluster | diff --git a/daprdocs/content/en/reference/cli/dapr-logs.md b/daprdocs/content/en/reference/cli/dapr-logs.md index a4f6126aa81..45e6bb5c550 100644 --- a/daprdocs/content/en/reference/cli/dapr-logs.md +++ b/daprdocs/content/en/reference/cli/dapr-logs.md @@ -18,13 +18,6 @@ Get Dapr sidecar logs for an application. dapr logs [flags] ``` -## Examples - -### Get logs of sample app from target pod in custom namespace -```bash -dapr logs -k --app-id sample --pod-name target --namespace custom -``` - ## Flags | Name | Environment Variable | Default | Description @@ -34,3 +27,11 @@ dapr logs -k --app-id sample --pod-name target --namespace custom | `--kubernetes`, `-k` | | `true` | Get logs from a Kubernetes cluster | | `--namespace`, `-n` | | `default` | The Kubernetes namespace in which your application is deployed | | `--pod-name`, `-p` | | | The name of the pod in Kubernetes, in case your application has multiple pods (optional) | + + +## Examples + +### Get logs of sample app from target pod in custom namespace +```bash +dapr logs -k --app-id sample --pod-name target --namespace custom +``` diff --git a/daprdocs/content/en/reference/cli/dapr-publish.md b/daprdocs/content/en/reference/cli/dapr-publish.md index c6de51d597c..f27189fec46 100644 --- a/daprdocs/content/en/reference/cli/dapr-publish.md +++ b/daprdocs/content/en/reference/cli/dapr-publish.md @@ -19,14 +19,6 @@ Publish a pub-sub event. dapr publish [flags] ``` -## Examples - -### Publish to sample topic in target pubsub -```bash -dapr publish --publish-app-id appId --topic sample --pubsub target --data '{"key":"value"}' -``` - - ## Flags | Name | Environment Variable | Default | Description @@ -36,3 +28,11 @@ dapr publish --publish-app-id appId --topic sample --pubsub target --data '{"key | `--topic`, `-t` | | | The topic to be published to | | `--data`, `-d` | | | The JSON serialized string (optional) | | `--help`, `-h` | | | Print this help message | + + +## Examples + +### Publish to sample topic in target pubsub +```bash +dapr publish --publish-app-id appId --topic sample --pubsub target --data '{"key":"value"}' +``` diff --git a/daprdocs/content/en/reference/cli/dapr-run.md b/daprdocs/content/en/reference/cli/dapr-run.md index 163cc531acd..42d339cde9f 100644 --- a/daprdocs/content/en/reference/cli/dapr-run.md +++ b/daprdocs/content/en/reference/cli/dapr-run.md @@ -19,6 +19,25 @@ Run Dapr and (optionally) your application side by side. dapr run [flags] [command] ``` +## Flags + +| Name | Environment Variable | Default | Description +| --- | --- | --- | --- | +| `--app-id`, `-a` | | | The id for your application, used for service discovery | +| `--app-max-concurrency` | | `unlimited` | The concurrency level of the application, otherwise is unlimited | +| `--app-port`, `-p` | | | The port your application is listening on +| `--app-protocol`, `-P` | | `http` | The protocol (gRPC or HTTP) Dapr uses to talk to the application. Valid values are: `http` or `grpc` | +| `--app-ssl` | | `false` | Enable https when Dapr invokes the application +| `--components-path`, `-d` | | `Linux & Mac: $HOME/.dapr/components`, `Windows: %USERPROFILE%\.dapr\components` | The path for components directory +| `--config`, `-c` | | `Linux & Mac: $HOME/.dapr/config.yaml`, `Windows: %USERPROFILE%\.dapr\config.yaml` | Dapr configuration file | +| `--dapr-grpc-port` | | `3500` | The gRPC port for Dapr to listen on | +| `--dapr-http-port` | | `50001` | The HTTP port for Dapr to listen on | +| `--enable-profiling` | | `false` | Enable `pprof` profiling via an HTTP endpoint +| `--help`, `-h` | | | Print this help message | +| `--log-level` | | `info` | The log verbosity. Valid values are: `debug`, `info`, `warning`, `error`, `fatal`, or `panic` | +| `--placement-host-address` | `DAPR_PLACEMENT_HOST_ADDRESS` | `localhost` | The host on which the placement service resides | +| `--profile-port` | | `7777` | The port for the profile server to listen on | + ## Examples ### Run a .NET application @@ -50,23 +69,3 @@ dapr run --app-id myapp -- python myapp.py ```bash dapr run --app-id myapp ``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--app-id`, `-a` | | | The id for your application, used for service discovery | -| `--app-max-concurrency` | | `unlimited` | The concurrency level of the application, otherwise is unlimited | -| `--app-port`, `-p` | | | The port your application is listening on -| `--app-protocol`, `-P` | | `http` | The protocol (gRPC or HTTP) Dapr uses to talk to the application. Valid values are: `http` or `grpc` | -| `--app-ssl` | | `false` | Enable https when Dapr invokes the application -| `--components-path`, `-d` | | `Linux & Mac: $HOME/.dapr/components`, `Windows: %USERPROFILE%\.dapr\components` | The path for components directory -| `--config`, `-c` | | `Linux & Mac: $HOME/.dapr/config.yaml`, `Windows: %USERPROFILE%\.dapr\config.yaml` | Dapr configuration file | -| `--dapr-grpc-port` | | `3500` | The gRPC port for Dapr to listen on | -| `--dapr-http-port` | | `50001` | The HTTP port for Dapr to listen on | -| `--enable-profiling` | | `false` | Enable `pprof` profiling via an HTTP endpoint -| `--help`, `-h` | | | Print this help message | -| `--log-level` | | `info` | The log verbosity. Valid values are: `debug`, `info`, `warning`, `error`, `fatal`, or `panic` | -| `--placement-host-address` | `DAPR_PLACEMENT_HOST_ADDRESS` | `localhost` | The host on which the placement service resides | -| `--profile-port` | | `7777` | The port for the profile server to listen on | - diff --git a/daprdocs/content/en/reference/cli/dapr-status.md b/daprdocs/content/en/reference/cli/dapr-status.md index 3ddaf1a3736..dc0087e07f2 100644 --- a/daprdocs/content/en/reference/cli/dapr-status.md +++ b/daprdocs/content/en/reference/cli/dapr-status.md @@ -19,17 +19,16 @@ Show the health status of Dapr services. dapr status -k ``` -## Examples - -### Get status of Dapr services from Kubernetes -```bash -dapr status -k -``` - - ## Flags | Name | Environment Variable | Default | Description | --- | --- | --- | --- | | `--help`, `-h` | | | Print this help message | | `--kubernetes`, `-k` | | `false` | Show the health status of Dapr services on Kubernetes cluster | + +## Examples + +### Get status of Dapr services from Kubernetes +```bash +dapr status -k +``` diff --git a/daprdocs/content/en/reference/cli/dapr-stop.md b/daprdocs/content/en/reference/cli/dapr-stop.md index 521f7781001..c4f44581da3 100644 --- a/daprdocs/content/en/reference/cli/dapr-stop.md +++ b/daprdocs/content/en/reference/cli/dapr-stop.md @@ -19,16 +19,16 @@ Stop Dapr instances and their associated apps. dapr stop [flags] ``` -## Examples - -### Stop Dapr application -```bash -dapr stop --app-id -``` - ## Flags | Name | Environment Variable | Default | Description | --- | --- | --- | --- | | `--app-id`, `-a` | | | The application id to be stopped | | `--help`, `-h` | | | Print this help message | + +## Examples + +### Stop Dapr application +```bash +dapr stop --app-id +``` diff --git a/daprdocs/content/en/reference/cli/dapr-uninstall.md b/daprdocs/content/en/reference/cli/dapr-uninstall.md index 1c6bcd9b9e7..28130221d9f 100644 --- a/daprdocs/content/en/reference/cli/dapr-uninstall.md +++ b/daprdocs/content/en/reference/cli/dapr-uninstall.md @@ -20,6 +20,16 @@ Uninstall Dapr runtime. dapr uninstall [flags] ``` +## Flags + +| Name | Environment Variable | Default | Description +| --- | --- | --- | --- | +| `--all` | | `false` | Remove Redis, Zipkin containers in addition to actor placement container. Remove default dapr dir located at `$HOME/.dapr or %USERPROFILE%\.dapr\`. | +| `--help`, `-h` | | | Print this help message | +| `--kubernetes`, `-k` | | `false` | Uninstall Dapr from a Kubernetes cluster | +| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to uninstall Dapr from | +| `--network` | `DAPR_NETWORK` | | The Docker network from which to remove the Dapr runtime | + ## Examples ### Uninstall from self-hosted mode @@ -36,13 +46,3 @@ dapr uninstall --all ```bash dapr uninstall -k ``` - -## Flags - -| Name | Environment Variable | Default | Description -| --- | --- | --- | --- | -| `--all` | | `false` | Remove Redis, Zipkin containers in addition to actor placement container. Remove default dapr dir located at `$HOME/.dapr or %USERPROFILE%\.dapr\`. | -| `--help`, `-h` | | | Print this help message | -| `--kubernetes`, `-k` | | `false` | Uninstall Dapr from a Kubernetes cluster | -| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to uninstall Dapr from | -| `--network` | `DAPR_NETWORK` | | The Docker network from which to remove the Dapr runtime |