Giter VIP home page Giter VIP logo

dotnetes's Introduction

Native .NET Hosting with Kubernetes

This repo is a prototype of tools for native .NET Hosting in Kubernetes.

Pushing an app

Pre-requisites:

  • Azure Container Registry
    • Must be logged in to docker with it
  • Azure Kubernetes Service
    • Must be the current context in kubectl
  • Local docker daemon configured
  • Built the src/d6s project and have it somewhere (or use the helper d6s.ps1 script in this repo that does dotnet run)
  1. dotnet new web somewhere
  2. cd to the new app
  3. Run d6s push --acr [YOUR ACR INSTANCE NAME] --local-build

The command will:

  • Locally publish the app as a framework-dependent app
  • Generate a docker image for your app with a random unique tag
  • Generate Kubernetes YAML descriptions:
    • A Deployment that creates 3 replicas of a pod containing only your app container
    • A Service referencing those pods
    • An Ingress making that service available at /[k8s-safe project name]

Small TODOS

  • Allow customizing ingress path
  • Allow customizing app name, it must be "DNS safe" (alphanumeric, - and .)
  • Allow remote build on ACR (right now the --local-build switch is required)
  • Config management. Right now it's mostly hardcoded in DotnetesContext but the idea is that type is loaded from some project/user/environment-level config.

Big TODOS

  • Build a service that can handle the whole thing? I.e. just publish the code and the rest happens in the โ˜ Cloud โ˜!
  • Add support for more k8s customization (customizing the podspec, adding other resources, etc.)

dotnetes's People

Contributors

analogrelay avatar

Watchers

 avatar James Cloos avatar  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.