Code Monkey home page Code Monkey logo

azuretodo's Introduction

AzureToDo - Aspire Proof of Concept

This repo provides a working example of the Aspire Stack. While this technology is still in Preview status, it offers a quick path to getting developer workstations setup for launching and debugging cloud native applications. It can even get your application deployed into Azure, allowing us to quickly stand up proof of concept applications in Azure that we can share with stakeholders.

Application Overview

The following components make up this application:

  • ApiService - .NET8 ASP.NET API
  • DBMigrations - Postgres Database migrations, powered by FluentMigrator
  • Web - ASP.NET Blazor app (server rendered)
  • Redis container
  • PostgreSQL container
  • Aspire Related:
    • AppHost - orchestrator/start-up project that makes all these apps work togther
    • ServiceDefaults - extension methods used by the Aspire infra for things like OpenTelemetry, HealthChecks, etc.
  • Build - Nuke.Build build target definitions
  • note: first run of the day on dev workstation will fire up Docker Desktop and will sometimes cause the DBMigrations app to fail as the PostgreSQL container hasn't fully started. A restart or two should clear that error

Developer Machine Setup

  • Follow the Aspire setup and tooling installation directions here
    • Docker Desktop
    • Visual Studio 2022 Preview
    • .NET Aspire Workload

Building the App

  • install Nuke.Build via dotnet tool install Nuke.GlobalTool --global
  • install the xunit runner for Nuke.Build via nuke :add-package xunit.runner.console --version 2.6.5
  • run the build process from repo root: nuke
    • This triggers the following steps:
      • Clean
      • Restore
      • Compile
      • UnitTest
        • filters tests for category attribute="unitTest"

Running the App

  • Ensure AzureToDo.AppHost is set as the startup project
  • hit F5 in Visual Studio 2022

Deploying to Azure

  • Authenticate with your Azure account: azd auth login
  • From Terminal at repo root:
    • azd infra synth
    • azd up
    • do your testing/verification
    • azd down
    • note: if you get weird errors about the resource group not existing or the up command isn't doing why you expected, azd down should sort you out, if it still doesn't work, you may need to manually create a resource group named rg-dev via Azure Portal

azuretodo's People

Contributors

mocella avatar

Stargazers

Nikolas "Blackout" Lucansky avatar

Watchers

 avatar Nikolas "Blackout" Lucansky 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.