tye
Deploy, debug, and test .NET microservices
TLDR
Scaffold a tye.yaml file representing the application
Run an application locally
Build an application's containers
Push an application's containers
Deploy an application to Kubernetes
Remove a deployed application from Kubernetes
SYNOPSIS
tye [command] [options]
PARAMETERS
init
Initializes a new `tye.yaml` file in the current directory based on the applications and services found.
run
Runs the application locally using the configuration specified in `tye.yaml`.
build
Builds the Docker images for the application based on the `tye.yaml` configuration.
deploy
Deploys the application to a Kubernetes cluster.
debug
Runs the application locally in debug mode using the configuration specified in `tye.yaml`.
version
Displays the version of the Tye tool.
help
Displays help information about the Tye tool or a specific command.
--watch
(with run) Automatically rebuilds and restarts applications when code changes are detected.
--framework
(with build, deploy) The target framework to build for. Defaults to net6.0.
--verbosity
Set the verbosity level. Allowed values are `Debug`, `Information`, `Warning`, `Error`, `Critical`, `None`.
--docker
(with build, run) Build or use Docker containers for the application. When running the command in dockerized environment, you may need to specify ports, for example: '--docker --ports 8000:80'
DESCRIPTION
The tye command is a developer tool that simplifies developing, testing, and deploying .NET microservices. It enables you to run multiple .NET applications, often referred to as microservices, with minimal configuration. It handles containerization, service discovery, and deployment to Kubernetes, streamlining the development and deployment workflow.
The `tye` tool supports running your application locally in debug mode which allows for hot reloading changes. It simplifies deploying your application to a Kubernetes cluster. Tye uses a `tye.yaml` file to define your application, its services, and their dependencies. This configuration file centralizes the application's structure, making it easier to manage and deploy.
Using the `tye` tool significantly speeds up .NET development process when dealing with microservices and containerized apps.
CAVEATS
Tye is primarily designed for .NET microservices. Its support for other languages or technologies might be limited.
While Tye simplifies Kubernetes deployment, a basic understanding of Kubernetes concepts is still beneficial.
The tye global tool must be installed via the .NET SDK.
CONFIGURATION FILE
The `tye.yaml` file defines the application's structure, services, and dependencies. It uses a YAML format and contains information like the service name, project path, Dockerfile path (if applicable), and environment variables. It's a key component for managing the application within the Tye ecosystem.
SERVICE DISCOVERY
Tye provides built-in service discovery. When applications are run using `tye run`, they automatically register with the Tye service discovery mechanism. This allows services to locate and communicate with each other without hardcoding URLs or IP addresses.
HISTORY
Tye was developed by Microsoft as an open-source project to address the complexities of developing, testing, and deploying .NET microservices. It was created to provide a simpler alternative to more complex orchestration tools like Kubernetes, especially during the development and testing phases. Initially released as a preview, it gained traction due to its ease of use and its ability to streamline the microservices workflow. Microsoft announced that Tye has been superseded by more robust and integrated tools withing .NET infrastructure. So it's no longer actively developed.