NotDeadYetContributors / NotDeadYet

.NET application health checking made easy
72 stars 15 forks source link

Dot Net Core Support, NotDeadYet.AspNetCore package and Appveyor build #20

Closed Jamleck closed 3 years ago

Jamleck commented 6 years ago

This PR:

  1. Adds support for .Net Core based on @flytzen's work in PR https://github.com/uglybugger/NotDeadYet/pull/13
    1. Adds a new NotDeadYet.AspNetCore package to simplify adding a /healthcheck endpoint to AspNetCore projects.
    2. Has a working AppVeyor build that handles versioning and publishing NuGet packages to a MyGet feed. It also runs the few unit tests in this project.

All the packages use the new .csproj format and the contents of the .nuspec file have been moved into the .csproj file to simplify NuGet packaging via dotnet pack.

There is a new NotDeadYet.AspNetCore package and accompanying sample. The new package:

  1. Provides a simple way of configuring a /healthcheck endpoint using AspNetCore middleware.
  2. Provides a helper method for adding an IHealthChecker instance into the DI container i.e. IServiceCollection.

The process for setting up NotDeadYet for an AspNetCore project would be:

  1. Install the NotDeadYet.AspNetCore package

  2. In the ConfigureServices method of Startup.cs, register the IHeathChecker instance with the DI Container

    services.AddMvc();
    
    services.AddHealthCheck();
  3. In the Configure method of Startup.cs, insert middleware to handle calls to the /healthcheck endpoint.

    app.UseHealthCheck();

You would need to adjust the Appveyor build to use your own Appveyor account and publish to an official MyGet and\or Nuget feed. Have a look at the appveyor.yml and build.ps file to see how it works. You'll also need to adjust the versioning to suit.

Jamleck commented 6 years ago

Hi @uglybugger, When do you think you'll get a chance to look at this pull request? Is there any detail you need from me?

Jaxelr commented 6 years ago

Would love to know what the plan is for this lib going forward. I currently have a few nancy services that im interested in migrating to net standard 2.0 and i use this library for health checking.

darkfadr commented 5 years ago

@uglybugger @becdetat Looks like this PR is good to go, is there anything keeping this from getting merged? As dotnet core usage gains more and more traction, I can see this PR being more critical.

steveegee commented 5 years ago

It seems this PR has been open for a while - is there any plan to merge it soon? We're migrating some projects to .net core 2 so would be keen to see the support for .netstandard 2.0.

Jaxelr commented 5 years ago

Perhaps @Jamleck is interested in forking this lib? I have a few PRs i could help out with.

uglybugger commented 5 years ago

Hey all.. I’m drowning in other commitments at the moment. Many apologies.

If anyone would like to put their hand up to own the existing GitHub org I’d be happy to add owners.

On Sat, 2 Mar 2019 at 00:02, Jaxel Rojas notifications@github.com wrote:

Perhaps @Jamleck https://github.com/Jamleck is interested in forking this lib? I have a few PRs i could help out with.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NotDeadYetContributors/NotDeadYet/pull/20#issuecomment-468674402, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW6JN-73wFic3OP7DE4Mqedf71TzGOgks5vSTLtgaJpZM4SJroN .

-- [image: Andrew Harcourt] https://www.uglybugger.org/