From d5ddbeb453f5b0312ddbabd6be8e57d5ae8c2b45 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 15 Oct 2020 14:41:53 -0700 Subject: [PATCH] CLI reference --- daprdocs/content/en/reference/cli/_index.md | 3 +- .../en/reference/cli/dapr-components.md | 23 ++++++ .../en/reference/cli/dapr-configurations.md | 23 ++++++ .../en/reference/cli/dapr-dashboard.md | 26 +++++++ .../content/en/reference/cli/dapr-help.md | 22 ++++++ .../content/en/reference/cli/dapr-init.md | 27 +++++++ .../content/en/reference/cli/dapr-invoke.md | 25 +++++++ .../en/reference/cli/dapr-invokeGet.md | 24 +++++++ .../en/reference/cli/dapr-invokePost.md | 25 +++++++ .../content/en/reference/cli/dapr-list.md | 23 ++++++ .../content/en/reference/cli/dapr-logs.md | 26 +++++++ .../content/en/reference/cli/dapr-mtls.md | 23 ++++++ .../content/en/reference/cli/dapr-publish.md | 24 +++++++ daprdocs/content/en/reference/cli/dapr-run.md | 35 +++++++++ .../content/en/reference/cli/dapr-status.md | 23 ++++++ .../content/en/reference/cli/dapr-stop.md | 23 ++++++ .../en/reference/cli/dapr-uninstall.md | 26 +++++++ daprdocs/content/en/reference/cli/overview.md | 71 +++++++++++++++++++ 18 files changed, 471 insertions(+), 1 deletion(-) create mode 100644 daprdocs/content/en/reference/cli/dapr-components.md create mode 100644 daprdocs/content/en/reference/cli/dapr-configurations.md create mode 100644 daprdocs/content/en/reference/cli/dapr-dashboard.md create mode 100644 daprdocs/content/en/reference/cli/dapr-help.md create mode 100644 daprdocs/content/en/reference/cli/dapr-init.md create mode 100644 daprdocs/content/en/reference/cli/dapr-invoke.md create mode 100644 daprdocs/content/en/reference/cli/dapr-invokeGet.md create mode 100644 daprdocs/content/en/reference/cli/dapr-invokePost.md create mode 100644 daprdocs/content/en/reference/cli/dapr-list.md create mode 100644 daprdocs/content/en/reference/cli/dapr-logs.md create mode 100644 daprdocs/content/en/reference/cli/dapr-mtls.md create mode 100644 daprdocs/content/en/reference/cli/dapr-publish.md create mode 100644 daprdocs/content/en/reference/cli/dapr-run.md create mode 100644 daprdocs/content/en/reference/cli/dapr-status.md create mode 100644 daprdocs/content/en/reference/cli/dapr-stop.md create mode 100644 daprdocs/content/en/reference/cli/dapr-uninstall.md create mode 100644 daprdocs/content/en/reference/cli/overview.md diff --git a/daprdocs/content/en/reference/cli/_index.md b/daprdocs/content/en/reference/cli/_index.md index 57d3b0b2e..8064dd8a0 100644 --- a/daprdocs/content/en/reference/cli/_index.md +++ b/daprdocs/content/en/reference/cli/_index.md @@ -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" --- \ No newline at end of file diff --git a/daprdocs/content/en/reference/cli/dapr-components.md b/daprdocs/content/en/reference/cli/dapr-components.md new file mode 100644 index 000000000..90f8358d5 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-components.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-configurations.md b/daprdocs/content/en/reference/cli/dapr-configurations.md new file mode 100644 index 000000000..6c44cbf14 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-configurations.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-dashboard.md b/daprdocs/content/en/reference/cli/dapr-dashboard.md new file mode 100644 index 000000000..7a5446e94 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-dashboard.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-help.md b/daprdocs/content/en/reference/cli/dapr-help.md new file mode 100644 index 000000000..91b1be50f --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-help.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md new file mode 100644 index 000000000..7b0cb7ec7 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -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.| diff --git a/daprdocs/content/en/reference/cli/dapr-invoke.md b/daprdocs/content/en/reference/cli/dapr-invoke.md new file mode 100644 index 000000000..050e9b84c --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-invoke.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-invokeGet.md b/daprdocs/content/en/reference/cli/dapr-invokeGet.md new file mode 100644 index 000000000..0cc75ea63 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-invokeGet.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-invokePost.md b/daprdocs/content/en/reference/cli/dapr-invokePost.md new file mode 100644 index 000000000..b9a4866e4 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-invokePost.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-list.md b/daprdocs/content/en/reference/cli/dapr-list.md new file mode 100644 index 000000000..af60092fd --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-list.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-logs.md b/daprdocs/content/en/reference/cli/dapr-logs.md new file mode 100644 index 000000000..9a34a95eb --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-logs.md @@ -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) | diff --git a/daprdocs/content/en/reference/cli/dapr-mtls.md b/daprdocs/content/en/reference/cli/dapr-mtls.md new file mode 100644 index 000000000..a8cf4c207 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-mtls.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-publish.md b/daprdocs/content/en/reference/cli/dapr-publish.md new file mode 100644 index 000000000..f5f8e879a --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-publish.md @@ -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 | \ No newline at end of file diff --git a/daprdocs/content/en/reference/cli/dapr-run.md b/daprdocs/content/en/reference/cli/dapr-run.md new file mode 100644 index 000000000..efb74b108 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-run.md @@ -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` | diff --git a/daprdocs/content/en/reference/cli/dapr-status.md b/daprdocs/content/en/reference/cli/dapr-status.md new file mode 100644 index 000000000..d6fec1ecd --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-status.md @@ -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) | \ No newline at end of file diff --git a/daprdocs/content/en/reference/cli/dapr-stop.md b/daprdocs/content/en/reference/cli/dapr-stop.md new file mode 100644 index 000000000..87cecf435 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-stop.md @@ -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 | diff --git a/daprdocs/content/en/reference/cli/dapr-uninstall.md b/daprdocs/content/en/reference/cli/dapr-uninstall.md new file mode 100644 index 000000000..08ee72842 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-uninstall.md @@ -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) | diff --git a/daprdocs/content/en/reference/cli/overview.md b/daprdocs/content/en/reference/cli/overview.md new file mode 100644 index 000000000..1671ba11e --- /dev/null +++ b/daprdocs/content/en/reference/cli/overview.md @@ -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. \ No newline at end of file