A Microservice Template using Dapr.io and Kubernetes
A Microservice Template for visual studio using Dapr.io and Kubernetes
This VS template makes it easy to create microservices that can be deployed as Dapr applications into a Kubernetes Cluster. Includes a .VSIX project to create a VS Extention installer.
Available from the Visual Studio Marketplace : Visual Studio 2022 - https://marketplace.visualstudio.com/items?itemName=IgnitionGroup.DaprMicroServiceVS2022
Older versions -https://marketplace.visualstudio.com/items?itemName=IgnitionGroup.DaprMicroService
Install the Dapr microservice template from the link above. Once installed click on Extensions -> Manage Extensions from the menu in visual Studio. Under installed extentions you should find the Extension Installed.
To create a new project in visual studio using the template
The information captured in the customer prompt will replace the template variables in the yaml files found in the project.
annotations: dapr.io/enabled: "true" dapr.io/id: "$daprAppName$" dapr.io/port: 3000
A new project will be created as below
DockerFile - Contains the commands to build a Docker image for the microservice.
T4 Templating - Deployment files are generated using T4 template. See Data.txt for settings.
DeployDev.yaml - For development - Contains the information for deployment into a dev/Test kubernetes cluster
DeployProd.yaml - For Production - Contains the information for deployment into a production kubernetes cluster
Azure-Pipelines.yaml - File used to Create the microservice Deployment pipeline for Micrsoft Azure Dev Ops
Nuget.config - Add any additional package sources to this file. Required to build the docker image correctly using dot net Restore.
Log4Net.config - This template uses Log4net for logging. Contains a console and Gelf4Net.UdpAppender logger. Development and Production files generated by T4 template
Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs
Uses AutoWrapper.Core for a consistent api response format across microservices :https://github.com/proudmonkey/AutoWrapper
Through this middleware, we can get all the detailed information of the exception object like the Stack trace, inner exception , message, etc for all http calls.
This project will create a .VSIX installer for the Microservice Template.
This project is licensed under the MIT License - see the LICENSE.md file for details