Git Product home page Git Product logo

generator-dapr's Introduction

generator-dapr

A Yeoman generator for scaffolding a dapr project. This generator creates and configures microservices in several languages, along with component manifests for state stores, pubsub mechanisms and bindings to several services. It also includes assets and instructions for running the microservices in self-hosted mode (on your machine/device) and in Kubernetes.

Requirements

  • Node.js and npm (included in modern Node versions)
  • dapr CLI

Installation

Run the following commands in your preferred shell:

  • npm install -g yo
  • npm install -g generator-dapr

Usage

Run yo dapr, then follow the prompts. This generator will scaffold a dapr application composed of microservices and dapr components. To run the application, consult the READMEs in each generated microservice, which will walk you through package installation, running in self-hosted mode, or building and running in Kubernetes.

dapr generator gif

Getting Started with Dapr

See dapr docs and docr samples to get started.

Building the Generator

If you're planning on forking or contributing, note that the generator is developed in TypeScript. Correspondingly, only the source code is included in this repo (in src). The code that makes up the generator itself lives in src/index.ts. The code for each microservice and component template lives in src/templates.

To build the code, run npm run build, which will compile the .ts files and copy all templates into an app directory, where Yeoman looks for them.

Who should use this?

The target audience for this generator is developers familiar with distributed systems concepts (e.g. microservices, state, pubsub) who want to quickly scaffold a dapr project. The target audience does not need to be familiar with any specific programming language, and should instead be able to use whatever mainstream language they choose, along with concepts idiomatic to that language. This audience can be bisected into two sub-audiences:

  1. Developers with cloud-native experience: For developers with experience using containers and Kubernetes, this generator aims to make it easier to minimize the time spent searching for manifests (e.g. Redis, Kafka), building docker images, and exercising dapr features.

  2. Developers without cloud-native experience: For developers without experience using containers and Kubernetes, this generator aims to make it easy to build a self-hosted dapr application. The generator also offers tooling and docs (e.g. makefiles, Dockerfiles, readmes) to hand-hold the developer through containerizing their microservices and deploying them to Kubernetes if they so choose.

Who should not use this?

Power users of dapr, along with app architects, who seek substantial customization of their application infrastructure should probably not use this generator, as it offers a generic application that won't satisfy highly-specific needs.

generator-dapr's People

Contributors

aaroncrawfis avatar dependabot[bot] avatar greenie-msft avatar mchmarny avatar ryanvolum avatar

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.