Skip to content

Commit

Permalink
Move flags above examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCrawfis committed Dec 12, 2020
1 parent 3007759 commit 8cf559e
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 125 deletions.
13 changes: 6 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-completion.md
Expand Up @@ -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
Expand Down Expand Up @@ -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 |
|
14 changes: 7 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-components.md
Expand Up @@ -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
```
13 changes: 6 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-configurations.md
Expand Up @@ -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
Expand All @@ -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
```
20 changes: 10 additions & 10 deletions daprdocs/content/en/reference/cli/dapr-dashboard.md
Expand Up @@ -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
Expand All @@ -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 |
34 changes: 17 additions & 17 deletions daprdocs/content/en/reference/cli/dapr-init.md
Expand Up @@ -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
Expand All @@ -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 |
```
20 changes: 10 additions & 10 deletions daprdocs/content/en/reference/cli/dapr-invoke.md
Expand Up @@ -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
Expand All @@ -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 |
14 changes: 7 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-list.md
Expand Up @@ -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
Expand All @@ -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 |
15 changes: 8 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-logs.md
Expand Up @@ -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
Expand All @@ -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
```
16 changes: 8 additions & 8 deletions daprdocs/content/en/reference/cli/dapr-publish.md
Expand Up @@ -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
Expand All @@ -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"}'
```
39 changes: 19 additions & 20 deletions daprdocs/content/en/reference/cli/dapr-run.md
Expand Up @@ -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
Expand Down Expand Up @@ -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 |

15 changes: 7 additions & 8 deletions daprdocs/content/en/reference/cli/dapr-status.md
Expand Up @@ -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
```
14 changes: 7 additions & 7 deletions daprdocs/content/en/reference/cli/dapr-stop.md
Expand Up @@ -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>
```
20 changes: 10 additions & 10 deletions daprdocs/content/en/reference/cli/dapr-uninstall.md
Expand Up @@ -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
Expand All @@ -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 |

0 comments on commit 8cf559e

Please sign in to comment.