updates per mukundan

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
Hannah Hunter 2023-02-06 11:43:31 -06:00
parent c408e460ee
commit 2b08c5b7fd
3 changed files with 16 additions and 14 deletions

View File

@ -1,7 +1,7 @@
---
type: docs
title: "Multi-app Run"
linkTitle: "Multi-app Run"
title: "Multi-App Run"
linkTitle: "Multi-App Run"
weight: 300
description: "Support for running multiple Dapr applications with one command"
---

View File

@ -1,9 +1,9 @@
---
type: docs
title: Multi-app Run overview
title: Multi-App Run overview
linkTitle: Multi-App Run overview
weight: 1000
description: Learn the scenarios around running multiple applications with one CLI command
description: Run multiple applications with one CLI command
---
{{% alert title="Note" color="primary" %}}
@ -19,7 +19,7 @@ Instead, you simply want to run them as local executables in self-hosted mode.
- Remember the resources folders and configuration files that each application refers to.
- Recall all of the additional flags you used to tweak the `dapr run` command behavior (`--app-health-check-path`, `--dapr-grpc-port`, `--unix-domain-socket`, etc.)
With Multi-app Run, you can start multiple applications in self-hosted mode using a single `dapr run -f` command using a template file. The template file describes how to start multiple applications as if you had run many separate CLI `run`commands. By default, this template file is called `dapr.yaml`.
With Multi-App Run, you can start multiple applications in self-hosted mode using a single `dapr run -f` command using a template file. The template file describes how to start multiple applications as if you had run many separate CLI `run`commands. By default, this template file is called `dapr.yaml`.
## Multi-App Run template file
@ -27,7 +27,7 @@ When you execute `dapr run -f .`, it uses the multi-app template file (named `da
You can name template file with preferred name other than the default. For example `dapr run -f ./<your-preferred-file-name>.yaml`.
The following `dapr.yaml` example includes some of the template properties you can customize for your applications. In the example, you can simultaneously launch 2 applications with app IDs of `processor` and `emit-metrics`.
The following example includes some of the template properties you can customize for your applications. In the example, you can simultaneously launch 2 applications with app IDs of `processor` and `emit-metrics`.
```yaml
version: 1
@ -82,4 +82,4 @@ Watch [this video for an overview on Multi-App Run](https://youtu.be/s1p9MNl4VGo
## Next steps
[Unpack the Multi-App Run template file and its properties]({{< ref multi-app-template.md >}})
[Learn the Multi-App Run template file structure and its properties]({{< ref multi-app-template.md >}})

View File

@ -27,7 +27,7 @@ When you provide a directory path, the CLI will try to locate the Multi-App Run
Execute the following CLI command to read the Multi-App Run template file, named `dapr.yaml` by default:
```cmd
// the template file needs to be called `dapr.yaml` by default
# the template file needs to be called `dapr.yaml` by default if a directory path is given
dapr run -f <dir_path>
```
@ -37,7 +37,7 @@ dapr run -f <dir_path>
If the Multi-App Run template file is named something other than `dapr.yaml`, then you can provide the relative or absolute file path to the command:
```cmd
dapr run -f ./<your-preferred-file-name>.yaml
dapr run -f ./path/to/<your-preferred-file-name>.yaml
```
## View the started applications
@ -53,12 +53,14 @@ dapr list
Stop the multi-app run template anytime with either of the following commands:
```cmd
# the template file needs to be called `dapr.yaml` by default if a directory path is given
dapr stop -f
```
or:
```cmd
dapr stop -f dapr.yaml
dapr stop -f ./path/to/<your-preferred-file-name>.yaml
```
## Template file structure
@ -72,16 +74,16 @@ common: # optional section for variables shared across apps
env: # any environment variable shared across apps
- DEBUG: true
apps:
- appID: webapp
appDirPath: .dapr/webapp/ # required
- appID: webapp # optional
appDirPath: .dapr/webapp/ # REQUIRED
resourcesPath: .dapr/resources # (optional) can be default by convention
configFilePath: .dapr/config.yaml # (optional) can be default by convention too, ignore if file is not found.
appProtocol: HTTP
appPort: 8080
appHealthCheckPath: "/healthz"
command: ["python3" "app.py"]
- appID: backend
appDirPath: .dapr/backend/
- appID: backend # optional
appDirPath: .dapr/backend/ # REQUIRED
appProtocol: GRPC
appPort: 3000
unixDomainSocket: "/tmp/test-socket"