GithubHelp home page GithubHelp logo

ignition-group-open-source-contrib / dapr-microservice-template Goto Github PK

View Code? Open in Web Editor NEW
35.0 10.0 3.0 725 KB

A Microservice Template using Dapr.io and Kubernetes

License: MIT License

C# 96.53% Dockerfile 2.28% Shell 1.19%
dapr-microservice-template dapr visual-studio kubernetes-cluster vsix microservices ignitiongroup

dapr-microservice-template's Introduction

Dapr-Microservice-Template

A Microservice Template for visual studio using Dapr.io and Kubernetes

Introduction

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

Prerequisites

  • Visual Studio 2022 and .NET 8 (current)
  • Visual Studio 2019 and .NET Core 3.1 (template no longer in use)

Getting Started

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.

VS Dapr template Extension

To create a new project in visual studio using the template

  • Add a new project by selecting File -> New Project.
  • Select Dapr Microservice Template for the project type and fill in the project information. Click on Create
  • A custom prompt will ask for the microservice application name to be used by the Dapr on deployment into the Kubernetes cluster.

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

Microservice Project

DaprMicroserviceTemplate project

Building a Docker Image

DockerFile - Contains the commands to build a Docker image for the microservice.

YAML Files

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

Custom Nuget Sources

Nuget.config - Add any additional package sources to this file. Required to build the docker image correctly using dot net Restore.

Log4Net Logging

Log4Net.config - This template uses Log4net for logging. Contains a console and Gelf4Net.UdpAppender logger. Development and Production files generated by T4 template

Open Api (Swagger) Support

Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs

Api Response Wrapper

Uses AutoWrapper.Core for a consistent api response format across microservices :https://github.com/proudmonkey/AutoWrapper

Global Exception Middleware

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.

TemplateInstaller - VSIX Project

This project will create a .VSIX installer for the Microservice Template.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

dapr-microservice-template's People

Contributors

dependabot[bot] avatar jayminmodi88 avatar malotho avatar ridzignition avatar simmy30 avatar simranjeet30691 avatar stather avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dapr-microservice-template's Issues

Following Markdown Readme instructions results in 404 when calling the endpoint.

Following the readme markdown file, I am able to get the app deployed. It however does not respond on the specified port to the specified get request. I've tried replacing the part of the uri in quotes ("daprid") with everything that I can think of. I've used the specified app id, I've used my project and namespace name, I've used the specified project name. I always receive a 404.

Please help. I've tried deploying dapr services in several ways over the last week and eventually get stuck. I ran across your extension last night and thought it would be easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.