Move flags above examples

This commit is contained in:
Aaron Crawfis 2020-12-11 18:18:06 -08:00
parent 3007759c67
commit 8cf559e826
13 changed files with 132 additions and 135 deletions

View File

@ -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 |
|

View File

@ -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
```

View File

@ -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
```

View File

@ -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 |

View File

@ -19,33 +19,6 @@ Install Dapr on supported hosting platforms.
dapr init [flags]
```
## Examples
### Initialize Dapr in self-hosted mode
```bash
dapr init
```
### Initialize Dapr in Kubernetes
```bash
dapr init -k
```
### Initialize particular Dapr runtime in self-hosted mode
```bash
dapr init --runtime-version 0.10.0
```
### Initialize particular Dapr runtime in Kubernetes
```bash
dapr init -k --runtime-version 0.10.0
```
### Initialize Dapr in slim self-hosted mode
```bash
dapr init -s
```
## Flags
| Name | Environment Variable | Default | Description
@ -58,3 +31,30 @@ dapr init -s
| `--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
```bash
dapr init
```
### Initialize Dapr in Kubernetes
```bash
dapr init -k
```
### Initialize specified version of Dapr runtime in self-hosted mode
```bash
dapr init --runtime-version 0.10.0
```
### Initialize specified version of Dapr runtime in Kubernetes
```bash
dapr init -k --runtime-version 0.10.0
```
### Initialize Dapr in [slim self-hosted mode]({{< ref self-hosted-no-docker.md >}})
```bash
dapr init -s
```

View File

@ -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 |

View File

@ -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 |

View File

@ -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
```

View File

@ -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"}'
```

View File

@ -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 |

View File

@ -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
```

View File

@ -19,16 +19,16 @@ Stop Dapr instances and their associated apps.
dapr stop [flags]
```
## Examples
### Stop Dapr application
```bash
dapr stop --app-id <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 <ID>
```

View File

@ -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 |