GithubHelp home page GithubHelp logo

netcoreoncloudservices's Introduction

.NET Core on Azure Cloud Services

This repository containes some examples of different approaches to run .NET Core apps as Worker Roles on Azure Cloud Services. This repository focuses on Worker Roles. For Web Roles please refer to this this article by Oren Novotny or to the PoC available here

Approach 1 - .NET Standard

This is the simplest approach as id does not require any hack with the project files. With this approach, you place your worker role logic in a .NET Standard library and you reference it from the classic .NET Framework based worker role project. SEE EXAMPLE HERE

Approach 2 - SCD with EXE Role Entrypoint

This approach is based on a Self Contained Deployment (SCD) of a .NET Core console application. The csdef file in the cloud service project points directly to the executable of the .NET Core app as role entrypoint. In order to get the .NET Core app deployed, we need to hack a dummy WorkerRole project so that it will trigger dotnet publish against the .NET Core project and include its output. The benefit of this approach is performance as the .NET Core will work on the native .NET Core runtime. Using SCD means you do not need to add a startup task to install the .NET Core runtime on the VMs. SEE EXAMPLE HERE

Approach 3 - FDD with EXE Role Entrypoint

This is similar to Approach 2 but using the default .NET Core deployment model (Framework Dependent Deployment or FDD). Since the .NET Core runtime is not installed by default on Cloud Services VMs, we need to add some hacks to download and install it at role startup.

Approach 4 - Classic Worker Role entry point running SCD .NET Core app

In this approach, the classic .NET Framework based worker role executes the .NET Core app executable via Process.Start(). As in approach 2, the .NET Core will work on the native .NET Core runtime. Using SCD means you do not need to add a startup task to install the .NET Core runtime on the VMs.

Approach 5 - Classic Worker Role entry point running FDD .NET Core app

Same as approach 4 but using FDD. Since the .NET Core runtime is not installed by default on Cloud Services VMs, we need to add some hacks to download and install it at role startup.

netcoreoncloudservices's People

Contributors

andreac-msft avatar

Watchers

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.