.NET Project Tye is a microservices development tool designed to make running many .NET services easy. Tye enables you to store a configuration of multiple .NET services, processes, and container images as a runnable application.
Tye is advantageous for a .NET Dapr developer because:
Pros/cons:
Follow the Tye Getting Started to install the tye
CLI and create a tye.yaml
for your application.
Next follow the steps in the Tye Dapr recipe to add Dapr. Make sure to specify the relative path to your components folder with components-path
in tye.yaml
.
Next add any additional container dependencies and add component definitions to the folder you created earlier.
You should end up with something like this:
name: store-application
extensions:
# Configuration for dapr goes here.
- name: dapr
components-path: <components-path>
# Services to run go here.
services:
# The name will be used as the app-id. For a .NET project, Tye only needs the path to the project file.
- name: orders
project: orders/orders.csproj
- name: products
project: products/products.csproj
- name: store
project: store/store.csproj
# Containers you want to run need an image name and set of ports to expose.
- name: redis
image: redis
bindings:
- port: 6973
Checkin tye.yaml
in source control wiht the application code.
You can now use tye run
to launch the whole application from one terminal. When running, Tye has a dashboard at http://localhost:8000
to view application status and logs.
Tye runs your services locally as normal .NET process. If you need to debug, then use the attach feature of your debugger to attach to one of the running processes. Since Tye is .NET aware, it has the ability to start a process suspended for startup debugging.
Tye also has an option to run your services in containers if you wish to test locally in containers.