Browse Source

Merge pull request #24748 from abpframework/auto-merge/rel-10-1/4323

Merge branch dev with rel-10.1
pull/21149/merge
Ma Liming 2 weeks ago
committed by GitHub
parent
commit
1e3ae554c8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      docs/en/docs-nav.json
  2. BIN
      docs/en/studio/images/overview/kubernetes-integration-helm.png
  3. BIN
      docs/en/studio/images/overview/solution-runner.png
  4. BIN
      docs/en/studio/images/solution-explorer/solution-explorer.png
  5. BIN
      docs/en/studio/images/solution-runner/add-task-window.png
  6. BIN
      docs/en/studio/images/solution-runner/builtin-tasks.png
  7. BIN
      docs/en/studio/images/solution-runner/csharp-application-context-menu-run-connection.png
  8. BIN
      docs/en/studio/images/solution-runner/csharp-application-context-menu.png
  9. BIN
      docs/en/studio/images/solution-runner/folder-context-menu-add.png
  10. BIN
      docs/en/studio/images/solution-runner/folder-context-menu.png
  11. BIN
      docs/en/studio/images/solution-runner/initial-task-properties-behavior.png
  12. BIN
      docs/en/studio/images/solution-runner/profile-root-context-menu-add.png
  13. BIN
      docs/en/studio/images/solution-runner/profile-root-context-menu.png
  14. BIN
      docs/en/studio/images/solution-runner/solution-runner-edit.png
  15. BIN
      docs/en/studio/images/solution-runner/solution-runner-properties.png
  16. BIN
      docs/en/studio/images/solution-runner/solution-runner.png
  17. BIN
      docs/en/studio/images/solution-runner/solutioın-runner-properties.png
  18. BIN
      docs/en/studio/images/solution-runner/task-context-menu-add.png
  19. BIN
      docs/en/studio/images/solution-runner/task-context-menu.png
  20. BIN
      docs/en/studio/images/solution-runner/task-logs-window.png
  21. BIN
      docs/en/studio/images/solution-runner/task-panel.png
  22. BIN
      docs/en/studio/images/solution-runner/task-properties.png
  23. 2
      docs/en/studio/monitoring-applications.md
  24. 4
      docs/en/studio/overview.md
  25. 234
      docs/en/studio/running-applications.md
  26. 2
      docs/en/studio/solution-explorer.md
  27. 2
      docs/en/tutorials/microservice/part-07.md

2
docs/en/docs-nav.json

@ -333,7 +333,7 @@
"path": "studio/solution-explorer.md"
},
{
"text": "Running Applications",
"text": "Solution Runner",
"path": "studio/running-applications.md"
},
{

BIN
docs/en/studio/images/overview/kubernetes-integration-helm.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/en/studio/images/overview/solution-runner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 73 KiB

BIN
docs/en/studio/images/solution-explorer/solution-explorer.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/studio/images/solution-runner/add-task-window.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
docs/en/studio/images/solution-runner/builtin-tasks.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
docs/en/studio/images/solution-runner/csharp-application-context-menu-run-connection.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/en/studio/images/solution-runner/csharp-application-context-menu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/studio/images/solution-runner/folder-context-menu-add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/studio/images/solution-runner/folder-context-menu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
docs/en/studio/images/solution-runner/initial-task-properties-behavior.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/studio/images/solution-runner/profile-root-context-menu-add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
docs/en/studio/images/solution-runner/profile-root-context-menu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
docs/en/studio/images/solution-runner/solution-runner-edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/studio/images/solution-runner/solution-runner-properties.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/studio/images/solution-runner/solution-runner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/en/studio/images/solution-runner/solutioın-runner-properties.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/en/studio/images/solution-runner/task-context-menu-add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
docs/en/studio/images/solution-runner/task-context-menu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
docs/en/studio/images/solution-runner/task-logs-window.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
docs/en/studio/images/solution-runner/task-panel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
docs/en/studio/images/solution-runner/task-properties.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

2
docs/en/studio/monitoring-applications.md

@ -27,7 +27,7 @@ If you want to open any of these tabs in separate window, just drag it from the
## Collecting Telemetry Information
There are two application [types](./running-applications.md#abp-studio-running-applications): C# and CLI. Only C# applications can establish a connection with ABP Studio and transmit telemetry information via the `Volo.Abp.Studio.Client.AspNetCore` package. However, we can view the *Logs* and *Browse* (if there is a *Launch URL*) for both CLI and C# application types. Upon starting C# applications, they attempt to establish a connection with ABP Studio. When connection successful, you should see a chain icon next to the application name in [Solution Runner](./running-applications.md#run-1). Applications can connect the ABP Studio with *Solution Runner* -> *C# Application* -> *Run* -> *Start* or from an outside environment such as debugging with Visual Studio. Additionally, they can establish a connection from a Kubernetes Cluster through the ABP Studio [Kubernetes Integration: Connecting to the Cluster](../get-started/microservice.md#kubernetes-integration-connecting-to-the-cluster).
There are two application [types](./running-applications.md#applications): C# and CLI. Only C# applications can establish a connection with ABP Studio and transmit telemetry information via the `Volo.Abp.Studio.Client.AspNetCore` package. However, we can view the *Logs* and *Browse* (if there is a *Launch URL*) for both CLI and C# application types. Upon starting C# applications, they attempt to establish a connection with ABP Studio. When connection successful, you should see a chain icon next to the application name in [Solution Runner](./running-applications.md#start--stop--restart). Applications can connect the ABP Studio with *Solution Runner* -> *C# Application* -> *Run* -> *Start* or from an outside environment such as debugging with Visual Studio. Additionally, they can establish a connection from a Kubernetes Cluster through the ABP Studio [Kubernetes Integration: Connecting to the Cluster](../get-started/microservice.md#kubernetes-integration-connecting-to-the-cluster).
You can [configure](../framework/fundamentals/options.md) the `AbpStudioClientOptions` to disable send telemetry information. The package automatically gets the [configuration](../framework/fundamentals/configuration.md) from the `IConfiguration`. So, you can set your configuration inside the `appsettings.json`:

4
docs/en/studio/overview.md

@ -91,13 +91,13 @@ Kubernetes integration in ABP Studio enables users to deploy solutions directly
This pane is dedicated to managing [Helm](https://helm.sh/) charts, which are packages used in Kubernetes deployments. It simplifies the process of building images and installing charts.
![kubernetes-integration-helm-pane](./images/overview/kubernetes-integration-helm.png)
![kubernetes-integration-helm-panel](./images/overview/kubernetes-integration-helm.png)
#### Kubernetes
This pane is dedicated to managing Kubernetes services. It simplifies the process of redeploying and intercepting application service.
![kubernetes-integration-kubernetes-pane](./images/overview/kubernetes-integration-kubernetes.png)
![kubernetes-integration-kubernetes-panel](./images/overview/kubernetes-integration-kubernetes.png)
### AI Assistant

234
docs/en/studio/running-applications.md

@ -1,11 +1,11 @@
```json
//[doc-seo]
{
"Description": "Learn how to use the ABP Studio's Solution Runner to efficiently run applications and organize projects with customizable profiles."
"Description": "Learn how to use the ABP Studio's Solution Runner to run applications, manage tasks, and organize projects with customizable profiles."
}
```
# ABP Studio: Running Applications
# ABP Studio: Solution Runner
````json
//[doc-nav]
@ -17,19 +17,16 @@
}
````
Use the *Solution Runner* to easily run your application(s) and set up infrastructure. You can create different profiles to organize projects based on your needs and teams. Simply navigate to the *Solution Runner* panel in the left menu.
Use the *Solution Runner* to easily run your application(s), execute tasks, and set up infrastructure. You can create different profiles to organize projects based on your needs and teams. Simply navigate to the *Solution Runner* panel in the left menu.
![solution-runner](images/solution-runner/solution-runner.png)
> The project structure might be different based on your selection. For example MVC microservice project, looks like the following. You can edit the tree structure as you wish.
The Solution Runner contains two tabs:
The solution runner contains 4 different types to define tree structure.
- **Applications**: For managing and running your applications.
- **Tasks**: For managing tasks that can be executed on demand or automatically when the solution is opened.
- **Profile**: We can create different profiles to manage the tree as our needs. For example we can create 2 different profile for `team-1` and `team-2`. `team-1` want to see the only *Administration* and *Identity* service, `team-2` see the *Saas* and *AuditLogging* services. With that way each team see the only services they need to run. In this example `Default` profile *Acme.BookStore (Default)* comes out of the box when we create the project.
- **Folder**: We can organize the applications with *Folder* type. In this example, we keep services in `services` folder for our microservice projects. We can also use nested folder if we want `apps`, `gateways`` and `services` is the folders in current(`Default`) profile.
- **C# Application**: We can add any C# application from our [Solution Explorer](./solution-explorer.md). If the application is not in our solution, we can add it externally by providing the *.csproj* file path. The .NET icon indicates that the application is a C# project. For example, `Acme.BookStore.AuthServer`, `Acme.BookStore.Web`, `Acme.BookStore.WebGateway`, etc., are C# applications.
- **CLI Application**: We can add [powershell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core) commands to prepare some environments or run other application types than C# such as angular.
- **Docker Container**: We can add Docker container files to control them on UI, start/stop containers individually.
> The project structure might be different based on your selection. For example MVC microservice project, looks like the following. You can edit the tree structure as you wish.
## Profile
@ -47,13 +44,23 @@ When you click *Add New Profile*, it opens the *Create New Profile* window. You
> When a profile is edited or deleted while running some applications, those applications will be stopped. However, applications running under a different profile will continue to run unaffected. Lastly, if we add a new profile, all applications running under existing profiles will be stopped.
## Using the Profile
## Applications
The **Applications tab** allows you to manage and run your applications. The solution runner contains 4 different types to define tree structure:
- **Profile**: We can create different profiles to manage the tree as our needs. For example we can create 2 different profile for `team-1` and `team-2`. `team-1` want to see the only *Administration* and *Identity* service, `team-2` see the *Saas* and *AuditLogging* services. With that way each team see the only services they need to run. In this example `Default` profile *Acme.BookStore (Default)* comes out of the box when we create the project.
- **Folder**: We can organize the applications with *Folder* type. In this example, we keep services in `services` folder for our microservice projects. We can also use nested folder if we want `apps`, `gateways` and `services` are the folders in current(`Default`) profile.
- **C# Application**: We can add any C# application from our [Solution Explorer](./solution-explorer.md). If the application is not in our solution, we can add it externally by providing the *.csproj* file path. The .NET icon indicates that the application is a C# project. For example, `Acme.BookStore.AuthServer`, `Acme.BookStore.Web`, `Acme.BookStore.WebGateway`, etc., are C# applications.
- **CLI Application**: We can add [powershell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core) commands to prepare some environments or run other application types than C# such as angular.
- **Docker Container**: We can add Docker container files to control them on UI, start/stop containers individually.
### Using the Profile
After selecting the current profile, which is the *Default* profile that comes pre-configured, we can utilize the tree items. This allows us to execute collective commands and create various tree structures based on our specific needs. You can navigate through the root of the tree and right-click to view the context menu, which includes the following options: `Start All`, `Stop All`, `Build`, `Add`, and `Manage Start Actions`.
![profile-root-context-menu](images/solution-runner/profile-root-context-menu.png)
### Start/Stop All
#### Start/Stop All
We can start/stop the applications with these options. Go to the root of the tree and right-click to view the context menu:
@ -62,7 +69,7 @@ We can start/stop the applications with these options. Go to the root of the tre
> You can change the current profile while applications are running in the previous profile. The applications continue to run under the previous profile. For example, if we start the `Acme.BookStore.AdministrationService`, `Acme.BookStore.IdentityService` applications when the current profile is *team-1* and after changing the current profile to *team-2* the applications continue to run under *team-1*.
### Build
#### Build
We can use common [dotnet](https://learn.microsoft.com/en-us/dotnet/core/tools) commands in this option. Go to the root of the tree and right-click to view the context menu, in this example *Acme.Bookstore(Default)* -> *Build*, there are 4 options available:
@ -75,7 +82,7 @@ We can use common [dotnet](https://learn.microsoft.com/en-us/dotnet/core/tools)
> Since *Solution Runner* may contain numerous C# projects, the *Build* options uses the [Background Tasks](./overview#background-tasks), ensuring a seamless experience while using ABP Studio.
### Add
#### Add
We can add 4 different item types to *Profile* for defining the tree structure. Those options are `C# Application`, `CLI Application`, `Docker Container`, and `Folder`.
@ -83,7 +90,7 @@ We can add 4 different item types to *Profile* for defining the tree structure.
![profile-root-context-menu-add](images/solution-runner/profile-root-context-menu-add.png)
#### C# Application
##### C# Application
When we go to the root of the tree and right-click, in this example *Acme.BookStore(Default)* -> *Add* -> *C# Application* it opens the *Add Application* window. There are two methods to add applications: *This solution* and *External*. To add via the *This solution* tab, follow these steps:
@ -100,7 +107,6 @@ The C# project doesn't have to be within the current [Solution Explorer](./solut
![profile-root-add-external-csharp-application](images/solution-runner/profile-root-add-external-csharp-application.png)
- `Path`: Provide the path to the .csproj file you wish to add. The path will be [normalized](https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#path-normalization), allowing the project location to be flexible, as long as it's accessible from the current [ABP Solution](./concepts.md#solution).
- `Name`: Give an arbitrary name to see in solution runner. This name should be unique for each profile.
- `Launch url`: This is the url when we want to browse. But if the added project doesn't have launch url we can leave it empty.
@ -108,7 +114,7 @@ The C# project doesn't have to be within the current [Solution Explorer](./solut
You can click the `OK` button to add the C# application to the profile.
#### CLI Application
##### CLI Application
We can add any [powershell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core) file to execute from the solution runner. With this flexibility we can prepare our infrastructure environment such as `Docker-Dependencies` or run different application types like `Angular`. You can add CLI applications with root of the tree and right-click, in this example *Acme.BookStore(Default)* -> *Add* -> *CLI Application*.
@ -124,7 +130,7 @@ We can add any [powershell](https://learn.microsoft.com/en-us/powershell/module/
You can click the `OK` button to add the CLI application to the profile.
#### Folder
##### Folder
When adding applications directly to the root of the tree, it can become disorganized, especially with numerous projects. Utilizing a folder structure allows us to organize applications more efficiently. This method enables executing collective commands within a specified folder. When we go to root of the tree and right-click, in this example *Acme.BookStore(Default)* -> *Add* -> *Folder* it opens *New folder* window.
@ -134,7 +140,7 @@ When adding applications directly to the root of the tree, it can become disorga
You can click the `OK` button to add the folder to the profile.
### Miscellaneous
#### Miscellaneous
- You can drag and drop folder and application into folder for organization purposes. Click and hold an item, then drag it into the desired folder.
- We can start all applications by clicking the *Play* icon on the left side, similar way we can stop all applications by clicking the *Stop* icon on the left side.
@ -142,7 +148,7 @@ You can click the `OK` button to add the folder to the profile.
- To remove a folder from the tree, open the context menu by right-clicking the folder and selecting *Delete*.
- When starting applications, they continue to restart until the application starts gracefully. To stop the restarting process when attempting to restart the application, click the icon on the left. Additionally, you can review the *Logs* to understand why the application isn't starting gracefully.
### Manage Start Actions
#### Manage Start Actions
This command will open a dialog where you can set start actions and start orders of sub-applications and sub-folders.
@ -154,40 +160,40 @@ You can order the applications by dragging the icon in the first column. In the
- **Build**: This option allows to disable/enable build before starting the application. If you are working on a single application, you can exclude the other applications from build to save time. This option can also be set by performing `right click > properties` on applications.
- **Watch**: When enabled, changes in your code are watched and dotnet hot-reloads the application or restarts it if needed. This option also can be set by performing `right click > properties` on applications.
## Folder
### Folder Context Menu
We already now why we need folder in the [previous](./running-applications.md#folder) section, we can use collective commands within this folder items. To do that go to folder and open the context menu by right-clicking, which includes 5 options `Start`, `Stop`, `Build`, `Add`, `Manage Start Actions`, `Rename` and `Delete`.
We already now why we need folder in the [previous](#folder) section, we can use collective commands within this folder items. To do that go to folder and open the context menu by right-clicking, which includes 5 options `Start`, `Stop`, `Build`, `Add`, `Manage Start Actions`, `Rename` and `Delete`.
![folder-context-menu](images/solution-runner/folder-context-menu.png)
### Start/Stop
#### Start/Stop
You can see the context menu by right-clicking *Folder*. It will start/stop all the applications under the folder.
### Build
#### Build
*Folder* -> *Build* context menu, it's the [similar](#build) options like *Acme.BookStore(Default)* -> *Builds* options there are 4 options available. The only difference between them it's gonna be execute in selected folder.
![folder-context-menu-build](images/solution-runner/folder-context-menu-build.png)
### Add
#### Add
*Folder* -> *Add* context menu, it's the [same](#add) options like *Acme.BookStore(Default)* -> *Add* there are 3 options avaiable. The only difference, it's gonna add item to the selected folder.
![folder-context-menu-add](images/solution-runner/folder-context-menu-add.png)
### Miscellaneous
#### Miscellaneous
- You can rename a folder with *Folder* -> *Rename*.
- You can delete a folder with *Folder* -> *Delete*.
## C# Application
### C# Application
The .NET icon indicates that the application is a C# project. After we [add](#c-application) the C# applications to the root of the tree or folder, we can go to any C# application and right-click to view the context menu; `Start`, `Stop`, `Restart`, `Build`, `Browse`, `Health Status`, `Requests`, `Exceptions`, `Logs`, `Copy URL`, `Properties`, `Remove`, and `Open with`.
![csharp-application-context-menu](images/solution-runner/csharp-application-context-menu.png)
### Start / Stop / Restart
#### Start / Stop / Restart
- **Start**: Starts the selected application.
- **Stop**: Stops the running application.
@ -195,13 +201,13 @@ The .NET icon indicates that the application is a C# project. After we [add](#c-
> When you start the C# application, you should see a *chain* icon next to the application name, that means the started application connected to ABP Studio. C# applications can connect to ABP Studio even when running from outside the ABP Studio environment, for example debugging with Visual Studio. If the application is run from outside the ABP Studio environment, it will display *(external)* information next to the chain icon.
### Build
#### Build
It's the [similar](#build) options like root of the tree options. The only difference between them it's gonna be execute the selected application.
![csharp-application-context-menu-build](images/solution-runner/csharp-application-context-menu-build.png)
### Monitoring
#### Monitoring
When the C# application is connected to ABP Studio, it starts sending telemetry information to see in one place. We can easily click these options to see the detail; `Browse`, `Health Status`, `Requests`, `Exceptions`, `Events` and `Logs`.
@ -216,11 +222,11 @@ When the C# application is connected to ABP Studio, it starts sending telemetry
- `Events`: Opens the *Events* tab filtered by this application. You can view all [Distributed Events](../framework/infrastructure/event-bus/distributed) sent or received by this application.
- `Logs`: Clicking this option opens the *Logs* tab with adding the selected application filter.
### Properties
#### Properties
We can open the *Application Properties* window to change *Launch url*, *Health check endpoints*, *Kubernetes service* and *run* information. To access the *Application Properties* window, navigate to a C# application, right-click to view the context menu, and select the Properties option.
![solutioın-runner-properties](images/solution-runner/solutioın-runner-properties.png)
![solution-runner-properties](images/solution-runner/solution-runner-properties.png)
- **Launch URL**: The URL used when browsing the application. This is the address where the application is accessible.
- **Kubernetes service**: A regex pattern to match Kubernetes service names. When connected to a Kubernetes cluster, ABP Studio uses this pattern to find the corresponding Kubernetes service and uses its URL instead of the Launch URL. This applies to *Browse*, *Copy URL*, and *Health UI* features. For example, if your Helm chart creates a service named `bookstore-identity-service`, you can use `.*-identity-service` or `bookstore-identity.*` as the pattern. For [microservice](../get-started/microservice.md) templates, this is pre-configured.
@ -234,7 +240,7 @@ We can open the *Application Properties* window to change *Launch url*, *Health
![csharp-application-context-menu-run-connection](images/solution-runner/csharp-application-context-menu-run-connection.png)
### Open with
#### Open with
The *Open with* submenu provides options to open the application project in external tools:
@ -254,7 +260,7 @@ You can add custom commands that appear in the context menu of Solution Runner i
- You can change the target framework by right-click the selected application and change the *Target Framework* option. This option visible if the project has multiple target framework such as MAUI applications.
- To remove an application from the tree, open the context menu by right-clicking the application and selecting *Remove*.
## CLI Application
### CLI Application
CLI applications uses the [powershell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core) commands. With this way we can start and stop anything we want. After we add the CLI applications to root of the tree or folder, we can go to any CLI application and right-click to view the context menu.
@ -268,7 +274,7 @@ CLI applications uses the [powershell](https://learn.microsoft.com/en-us/powersh
> When CLI applications start chain icon won't be visible, because only C# applications can connect the ABP Studio.
## Docker Containers
### Docker Containers
Each Docker container represents a `.yml` file. Each file can be run on UI individually. A file may contain one or more services. To start/stop each service individually, we recommend to keep services in separate files.
@ -320,9 +326,7 @@ If the `yml` file contains multiple services, they will be represented as a sing
>
> ![docker-container-warning](images/solution-runner/docker-container-warning.png)
### Properties
#### Properties
![docker-container-properties](images/solution-runner/docker-container-properties.png)
@ -330,10 +334,160 @@ In properties dialog, you can set the name of docker compose stack name of the c
![docker-container-stack](images/solution-runner/docker-container-stack.png)
## Docker Compose
### Docker Compose
You can manually run applications using [Docker Compose](https://docs.docker.com/compose/). This allows for easy setup and management of multi-container Docker applications. To get started, ensure you have Docker and Docker Compose installed on your machine.
Refer to the [Deployment with Docker Compose](../solution-templates/layered-web-application/deployment/deployment-docker-compose.md) documentation for detailed instructions on how to configure and run your applications using `docker-compose`.
> Note: The **Docker Compose** is not available in the ABP Studio interface.
> Note: The **Docker Compose** is not available in the ABP Studio interface.
## Tasks
The **Tasks tab** in the Solution Runner allows you to define and execute tasks for your solution. You can run initialization tasks after solution creation, create reusable tasks that can be executed on demand, and optionally configure tasks to run automatically when a solution is opened. Navigate to the *Solution Runner* panel in the left menu and select the *Tasks* tab.
![task-panel](images/solution-runner/task-panel.png)
> The task structure might vary based on your solution template. ABP Studio solution templates come with pre-configured tasks like *Initialize Solution*.
### Tasks Panel Overview
The Tasks panel has a tree structure similar to the Applications panel:
- **Root**: The root item displays your solution name, similar to the Solution Explorer.
- **Tasks**: Individual tasks that can be started, stopped, and configured.
Tasks are associated with the current *Profile*, just like applications. When you switch profiles, the task configuration may differ based on what's defined in each profile.
### Built-in Tasks
When you create a new solution using ABP Studio templates, the following tasks are automatically configured in the *Default* profile:
![builtin-tasks](images/solution-runner/builtin-tasks.png)
#### Initialize Solution
The *Initialize Solution* task performs the initial setup required after creating a new solution or cloning an existing one from source control. This task is configured with the *Run on solution initialization (1 time per computer)* behaviour, meaning it runs automatically only once per computer when the solution is initialized.
![task-behavior](images/solution-runner/initial-task-properties-behavior.png)
The initialization typically includes:
- Installing NPM packages (`abp install-libs`)
- Creating development certificates (for OpenIddict)
- and more... (depends on solution type)
> This task is designed to be idempotent, meaning it can be run multiple times without causing issues.
#### Migrate Database
The *Migrate Database* task runs the database migration for your solution. This is useful when you need to apply new migrations after pulling changes from source control or when you've added new migrations yourself.
> Unlike the *Initialize Solution* task, the *Migrate Database* task is not configured to run automatically on solution open by default.
### Adding a Task
To add a new task, right-click on the root item (solution name) in the Tasks panel and select *AddTask* item.
![task-context-menu-add](images/solution-runner/task-context-menu-add.png)
This opens the *Add Task* window where you can configure the task:
![add-task-window](images/solution-runner/add-task-window.png)
- **Name**: Provide a unique name for the task. This name will be displayed in the Tasks panel tree.
- **Working Directory**: Specify the directory where the task will be executed. You can use the folder picker to browse and select the directory. The path will be [normalized](https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#path-normalization), allowing flexibility in the folder location.
- **Start Command**: Provide the script or command to execute when the task starts. Use the local path prefix `./` if the script is in the working directory (e.g., `./scripts/my-task.ps1`). You can also pass arguments like `./my-script.ps1 -param value`.
- **Task Behaviour**: Select how the task should run: *Manual*, *Run on solution open*, or *Run on solution initialization (1 per computer)*.
- **Short Description**: Short description for the task.
Click *OK* to add the task to the profile.
### Managing Tasks
Once tasks are added to the panel, you can manage them using the context menu. Right-click on a task to see the available options:
![task-context-menu](images/solution-runner/task-context-menu.png)
#### Start / Stop
- **Start**: Executes the task's start command. The task status will change to indicate it's running.
- **Stop**: Stops a running task. If a stop command is configured, it will be executed; otherwise, the process will be terminated.
> Unlike applications, tasks do not automatically restart if they fail or stop. A task can complete its execution and stop itself (like running a database migration), or it can continue running until manually stopped.
#### Logs
Click *Logs* to view the task's output in a dedicated window. This shows the console output from the task's execution, which is helpful for debugging or monitoring progress.
![task-logs-window](images/solution-runner/task-logs-window.png)
#### Properties
Click *Properties* to open the task configuration window where you can modify the task settings:
![task-properties](images/solution-runner/task-properties.png)
- **Name**: The display name of the task.
- **Working Directory**: The execution directory for the task.
- **Start Command**: The command to run when starting the task.
- **Task Behaviour**: Select how the task should run: *Manual*, *Run on solution open*, or *Run on solution initialization (1 per computer)*.
- **Short Description**: Short description for the task.
#### Remove
Select *Remove* to delete the task from the profile. This action only removes the task configuration; it does not delete any script files.
### Run On Solution Open
Tasks configured with *Run on solution open* behaviour are automatically executed every time you open the solution in ABP Studio. This is useful for:
- **Environment checks**: Verifying that required services or dependencies are available.
- **Recurring setup**: Tasks that need to run on each session, such as starting background services or refreshing configurations.
When the solution is opened:
1. ABP Studio loads the solution and profiles
2. Tasks marked with *Run on solution open* are queued for execution
3. Tasks execute in the background, and you can monitor their progress in the [Background Tasks](./overview.md#background-tasks) panel
> Tasks configured with this behaviour should be idempotent, meaning running them multiple times should not cause errors or duplicate operations.
### Run On Solution Initialization (1 Per Computer)
Tasks configured with *Run on solution initialization (1 per computer)* behaviour are executed only once per computer when the solution is first opened. After the initial execution, the task will not run automatically on subsequent solution opens. This is ideal for:
- **One-time setup**: Tasks like *Initialize Solution* that install dependencies, run database migrations, or create development certificates.
- **First-time configuration**: Setting up environment-specific configurations that only need to happen once.
This behaviour is particularly useful for:
1. **New team members**: When a developer clones the repository and opens the solution for the first time, all initialization tasks run automatically.
2. **Fresh clones**: Ensures the solution is properly configured without requiring manual intervention.
3. **Avoiding redundant operations**: Prevents running time-consuming setup tasks on every solution open.
> The *Initialize Solution* task that comes with ABP Studio templates uses this behaviour by default. It checks if NPM packages are already installed before running `abp install-libs` and performs other initialization steps only when necessary.
### Task Configuration in Profiles
Tasks are stored in the run profile JSON files (`*.abprun.json`). The task configuration looks like this:
```json
{
"tasks": {
"Initialize Solution": {
"behaviour": 2,
"startCommand": "./initialize-solution.ps1",
"workingDirectory": "../../scripts",
"shortDescription": "Installs required UI libraries and creates required certificates."
}
}
}
```
You can manually edit these files if needed, but it's recommended to use the ABP Studio UI for managing tasks to ensure proper formatting and validation.
## See Also
- [Solution Explorer](./solution-explorer.md)
- [Monitoring Applications](./monitoring-applications.md)

2
docs/en/studio/solution-explorer.md

@ -11,7 +11,7 @@
//[doc-nav]
{
"Next": {
"Name": "Running Applications",
"Name": "Solution Runner",
"Path": "studio/running-applications"
}
}

2
docs/en/tutorials/microservice/part-07.md

@ -216,7 +216,7 @@ Implementing `ITransientDependency` registers the `OrderEventHandler` class to t
### Testing the Order Creation
To keep this tutorial simple, we will not implement a user interface for creating orders. Instead, we will use the Swagger UI to create an order. Open the *Solution Runner* panel in ABP Studio and use the *Start* action to launch the `CloudCrm.OrderingService` and `CloudCrm.CatalogService` applications. Then, use the *Start All* action to start the remaining applications listed in the [Solution Runner root item](../../studio/running-applications.md#run).
To keep this tutorial simple, we will not implement a user interface for creating orders. Instead, we will use the Swagger UI to create an order. Open the *Solution Runner* panel in ABP Studio and use the *Start* action to launch the `CloudCrm.OrderingService` and `CloudCrm.CatalogService` applications. Then, use the *Start All* action to start the remaining applications listed in the [Solution Runner root item](../../studio/running-applications.md#startall).
Once the application is running and ready, [Browse](../../studio/running-applications.md#c-application) the `CloudCrm.OrderingService` application. Use the `POST /api/ordering/order` endpoint to create a new order:

Loading…
Cancel
Save