Giter Site home page Giter Site logo

ahmelsayed / dotnetonazurecontainerapps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bradygaster/aspnetcorewithyarponazurecontainerapps

0.0 1.0 0.0 1.02 MB

Dockerfile 14.97% C# 28.57% HTML 17.53% CSS 4.63% JavaScript 0.99% Bicep 25.41% PowerShell 7.89%

dotnetonazurecontainerapps's Introduction

.NET with YARP on Azure Container Apps

This repository contains a simple scenario built to demonstrate how ASP.NET Core 6.0 can be used to build a cloud-native application hosted in Azure Container Apps. The repository consists of the following projects and folders:

  • Catalog API - this is an ASP.NET minimal API project with one endpoint.
  • Orders API - this is an ASP.NET minimal API project with one endpoint.
  • UI - an ASP.NET Blazor Server app that calls out to both the Catalog and Orders API and renders their status.
  • Proxy - a YARP proxy project that proxies to the UI app.
  • deploy folder - this folder contains a series of Azure Bicep templates that can be used to create the application and deploy it.
  • setup.ps1 - this file is a one-stop way for you to deploy the app to your own Azure subscription so you can try the scenario.

Prerequisites

  • .NET 6.0
  • The Azure CLI
  • An Azure subscription
  • Docker
  • PowerShell (GitHub Actions will replace this prerequisite soon)

Setup

  1. Clone this repository.
  2. Sign in to your Azure subscription using the az login command.
  3. If you have more than 1 Azure subscription, make sure you're targeting the right Azure subscription by using the az account show and az account set -s <subscription-id> commands.
  4. From the root of this repository, run ./setup.ps1.

Topology diagram

The resultant application is an Azure Container Environment-hosted set of containers - the catalog API, the orders API, the ui Blazor Server front-end, and the yarp reverse proxy app.

Topology diagram

Internet traffic should not be able to directly access either of the back-end APIs, or the Blazor Server interface, as each of these containers is marked as "internal ingress only" during the deployment phase. Internet traffic hitting the yarp.<your app>.<your region>.azurecontainerapps.io URL should be proxied to the ui container, which in turn makes outbound calls to both the catalog and orders APIs within the Azure Container Apps Environment. The yarp Azure Container App should be the only app in the environment marked with "external ingress," as it should proxy to the UI and thus, shield the back-end from internet traffic.

Note: at this time there is a known issue associated with this scenario, and this repository is being used as a sample demonstrating the issue. If you clone the repository and run it as-is, things won't work as expected. An update to this readme will be made once an issue has been created we'll use to fix the issue.

dotnetonazurecontainerapps's People

Contributors

bradygaster avatar ahmelsayed avatar

Watchers

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