mirror of https://github.com/dapr/docs.git
CLI reference
This commit is contained in:
parent
06e2d17bed
commit
d5ddbeb453
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
type: docs
|
||||
title: Dapr CLI reference
|
||||
title: "Dapr CLI reference"
|
||||
linkTitle: "Dapr CLI"
|
||||
description: "Detailed information on the Dapr CLI commands"
|
||||
---
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "components CLI command reference"
|
||||
linkTitle: "components"
|
||||
description: "Detailed information on the components CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
List all Dapr components
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr components [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for components |
|
||||
| `--kubernetes`, `-k` | | `false` | List all Dapr components in a k8s cluster |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "configurations CLI command reference"
|
||||
linkTitle: "configurations"
|
||||
description: "Detailed information on the configurations CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
List all Dapr configurations
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr configurations [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for configurations |
|
||||
| `--kubernetes`, `-k` | | `false` | List all Dapr configurations in a k8s cluster |
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
type: docs
|
||||
title: "dashboard CLI command reference"
|
||||
linkTitle: "dashboard"
|
||||
description: "Detailed information on the dashboard CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Start Dapr dashboard.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr dashboard [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for dashboard |
|
||||
| `--kubernetes`, `-k` | | `false` | Start Dapr dashboard in local browser |
|
||||
| `--version`, `-v` | | `false` | Check Dapr dashboard version |
|
||||
| `--port`, `-p` | | `8080` | The local port on which to serve dashboard |
|
||||
| `--namespace`, `-n` | | `dapr-system` | The namespace where Dapr dashboard is running |
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
type: docs
|
||||
title: "help CLI command reference"
|
||||
linkTitle: "help"
|
||||
description: "Detailed information on the help CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Help provides help for any command in the application.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr help [command] [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for help |
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
type: docs
|
||||
title: "init CLI command reference"
|
||||
linkTitle: "init"
|
||||
description: "Detailed information on the init CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Setup Dapr in Kubernetes or Standalone modes
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr init [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for init |
|
||||
| `--kubernetes`, `-k` | | `false` | Deploy Dapr to a Kubernetes cluster |
|
||||
| `--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: `v0.1.0-alpha` |
|
||||
| `--redis-host` | `DAPR_REDIS_HOST` | `localhost` | The host on which the Redis service resides |
|
||||
| `--slim`, `-s` | | `false` | Initialize dapr in self-hosted mode without placement, redis and zipkin containers.|
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
type: docs
|
||||
title: "invoke CLI command reference"
|
||||
linkTitle: "invoke"
|
||||
description: "Detailed information on the invoke CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Invokes a Dapr app with an optional payload (deprecated, use invokePost)
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invoke [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app ID to invoke |
|
||||
| `--help`, `-h` | | | Help for invoke |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
||||
| `--payload`, `-p` | | | (optional) a json payload |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
type: docs
|
||||
title: "invokeGet CLI command reference"
|
||||
linkTitle: "invokeGet"
|
||||
description: "Detailed information on the invokeGet CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Issue HTTP GET to Dapr app
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invokeGet [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app ID to invoke |
|
||||
| `--help`, `-h` | | | Help for invokeGet |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
type: docs
|
||||
title: "invokePost CLI command reference"
|
||||
linkTitle: "invokePost"
|
||||
description: "Detailed information on the invokePost CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Issue HTTP POST to Dapr app with an optional payload
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invokePost [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app ID to invoke |
|
||||
| `--help`, `-h` | | | Help for invokePost |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
||||
| `--payload`, `-p` | | | (optional) a json payload |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "list CLI command reference"
|
||||
linkTitle: "list"
|
||||
description: "Detailed information on the list CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
List all Dapr instances
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr list [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for list |
|
||||
| `--kubernetes`, `-k` | | `false` | List all Dapr pods in a k8s cluster |
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
type: docs
|
||||
title: "logs CLI command reference"
|
||||
linkTitle: "logs"
|
||||
description: "Detailed information on the logs CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Gets Dapr sidecar logs for an app in Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr logs [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app id for which logs are needed |
|
||||
| `--help`, `-h` | | | Help for logs |
|
||||
| `--kubernetes`, `-k` | | `true` | only works with a Kubernetes cluster (default true) |
|
||||
| `--namespace`, `-n` | | `default` | (optional) Kubernetes namespace in which your application is deployed. default value is 'default' |
|
||||
| `--pod-name`, `-p` | | | (optional) Name of the Pod. Use this in case you have multiple app instances (Pods) |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "mtls CLI command reference"
|
||||
linkTitle: "mtls"
|
||||
description: "Detailed information on the mtls CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Check if mTLS is enabled in a Kubernetes cluster
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr mtls [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for mtls |
|
||||
| `--kubernetes`, `-k` | | `false` | Check if mTLS is enabled in a Kubernetes cluster |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
type: docs
|
||||
title: "publish CLI command reference"
|
||||
linkTitle: "publish"
|
||||
description: "Detailed information on the publish CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Publish an event to multiple consumers
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr publish [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--data`, `-d` | | | (optional) a json serialized string |
|
||||
| `--help`, `-h` | | | Help for publish |
|
||||
| `--topic`, `-t` | | | The topic the app is listening on |
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
type: docs
|
||||
title: "run CLI command reference"
|
||||
linkTitle: "run"
|
||||
description: "Detailed information on the run CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Launches Dapr and (optionally) your app side by side
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr run [flags] [command]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id` | | | An ID for your application, used for service discovery |
|
||||
| `--app-port` | | `-1` | The port your application is listening o
|
||||
| `--run-path` | | `Linux & Mac: $HOME/.dapr/run`, `Windows: %USERPROFILE%\.dapr\run` | Path for run directory |
|
||||
| `--config` | | `Linux & Mac: $HOME/.dapr/config.yaml`, `Windows: %USERPROFILE%\.dapr\config.yaml` | Dapr configuration file |
|
||||
| `--enable-profiling` | | | Enable `pprof` profiling via an HTTP endpoint |
|
||||
| `--dapr-grpc-port` | | `-1` | The gRPC port for Dapr to listen on |
|
||||
| `--help`, `-h` | | | Help for run |
|
||||
| `--image` | | | The image to build the code in. Input is: `repository/image` |
|
||||
| `--log-level` | | `info` | Sets the log verbosity. Valid values are: `debug`, `info`, `warning`, `error`, `fatal`, or `panic` |
|
||||
| `--max-concurrency` | | `-1` | Controls the concurrency level of the app |
|
||||
| `--placement-host-address` | `DAPR_PLACEMENT_HOST` | `localhost` | The host on which the placement service resides |
|
||||
| `--port`, `-p` | | `-1` | The HTTP port for Dapr to listen on |
|
||||
| `--profile-port` | | `-1` | The port for the profile server to listen on |
|
||||
| `--protocol` | | `http` | Tells Dapr to use HTTP or gRPC to talk to the app. Valid values are: `http` or `grpc` |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "status CLI command reference"
|
||||
linkTitle: "status"
|
||||
description: "Detailed information on the status CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Shows the Dapr system services (control plane) health status.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr status [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Help for status |
|
||||
| `--kubernetes`, `-k` | | `true` | only works with a Kubernetes cluster (default true) |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: docs
|
||||
title: "stop CLI command reference"
|
||||
linkTitle: "stop"
|
||||
description: "Detailed information on the stop CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Stops multiple running Dapr instances and their associated apps
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr stop [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id` | | | The app ID to stop (standalong mode) |
|
||||
| `--help`, `-h` | | | Help for stop |
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
type: docs
|
||||
title: "uninstall CLI command reference"
|
||||
linkTitle: "uninstall"
|
||||
description: "Detailed information on the uninstall CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Removes a Dapr installation
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
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` | | | Help for uninstall |
|
||||
| `--kubernetes`, `-k` | | `false` | Uninstall Dapr from a Kubernetes cluster |
|
||||
| `--network` | `DAPR_NETWORK` | | The Docker network from which to remove the Dapr runtime |
|
||||
| `--runtime-version` | | `latest` | The version of the Dapr runtime to uninstall, for example: `v0.1.0-alpha` (Kubernetes mode only) |
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Dapr command line (CLI) reference"
|
||||
linkTitle: "Overview"
|
||||
description: "Detailed information on the dapr CLI"
|
||||
weight: 10
|
||||
---
|
||||
|
||||
The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster, provides debugging support, and launches and manages Dapr instances.
|
||||
|
||||
```bash
|
||||
__
|
||||
____/ /___ _____ _____
|
||||
/ __ / __ '/ __ \/ ___/
|
||||
/ /_/ / /_/ / /_/ / /
|
||||
\__,_/\__,_/ .___/_/
|
||||
/_/
|
||||
|
||||
======================================================
|
||||
A serverless runtime for hyperscale, distributed systems
|
||||
|
||||
Usage:
|
||||
dapr [command]
|
||||
|
||||
Available Commands:
|
||||
components List all Dapr components
|
||||
configurations List all Dapr configurations
|
||||
help Help about any command
|
||||
init Setup dapr in Kubernetes or Standalone modes
|
||||
invoke Invokes a Dapr app with an optional payload (deprecated, use invokePost)
|
||||
invokeGet Issue HTTP GET to Dapr app
|
||||
invokePost Issue HTTP POST to Dapr app with an optional payload
|
||||
list List all Dapr instances
|
||||
logs Gets Dapr sidecar logs for an app in Kubernetes
|
||||
mtls Check if mTLS is enabled in a Kubernetes cluster
|
||||
publish Publish an event to multiple consumers
|
||||
run Launches Dapr and (optionally) your app side by side
|
||||
status Shows the Dapr system services (control plane) health status.
|
||||
stop Stops multiple running Dapr instances and their associated apps
|
||||
uninstall Removes a Dapr installation
|
||||
|
||||
Flags:
|
||||
-h, --help help for Dapr
|
||||
--version version for Dapr
|
||||
|
||||
Use "dapr [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
## Command Reference
|
||||
|
||||
You can learn more about each Dapr command from the links below.
|
||||
|
||||
- [`dapr components`](dapr-components.md)
|
||||
- [`dapr configurations`](dapr-configurations.md)
|
||||
- [`dapr help`](dapr-help.md)
|
||||
- [`dapr init`](dapr-init.md)
|
||||
- [`dapr invoke`](dapr-invoke.md)
|
||||
- [`dapr invokeGet`](dapr-invokeGet.md)
|
||||
- [`dapr invokePost`](dapr-invokePost.md)
|
||||
- [`dapr list`](dapr-list.md)
|
||||
- [`dapr logs`](dapr-logs.md)
|
||||
- [`dapr mtls`](dapr-mtls.md)
|
||||
- [`dapr publish`](dapr-publish.md)
|
||||
- [`dapr run`](dapr-run.md)
|
||||
- [`dapr status`](dapr-status.md)
|
||||
- [`dapr stop`](dapr-stop.md)
|
||||
- [`dapr uninstall`](dapr-uninstall.md)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable.
|
||||
Loading…
Reference in New Issue