GithubHelp home page GithubHelp logo

maythamfahmi / net-aspire-playground Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 966 KB

.net 8 aspire playground

C# 79.57% HTML 13.55% CSS 2.98% JavaScript 0.55% PowerShell 3.35%
dotnet-8 dotnet-aspire

net-aspire-playground's Introduction

Step-by-step action

Prerequisite:

  • Install azd command line
  • Visual Studio 2022 preview 17.9. and newer
  • Visual Studio Code Optional
  • Docker Desktop for local development

Local development

When you clone the code, open it with Visual Studio 2022 preview 17.9 and newer and set the startup project to WeatherApp.AppHost and fire up.

image

With the current code, it will start a dashboard.

image

Azure Cloud Development

Follow the steps below:

Login to azure

azd auth login

Switch to Aspire project

cd WeatherApp.AppHost

generate manifest.json

dotnet run --publisher manifest --output-path manifest.json

Required only first time

azd init

What to answer:

-> Use code in the current directory

-> Confirm and continue initializing my app

[X] frontend
[ ] weatherapi

Enter a new environment name: staging-environment

When done successfully

azd up

-> subscription selection -> location wait for provision resources in Azure

to delete the resource

azd down

to update existing resources

azd config set alpha.infraSynth on
azd infra synth
azd up

to update your code deployment only

azd deploy

to recreate everything and start over again

Just delete .azure folder, infra folder, azure.yml, and manifest.json

Enable a feature that generates bicep

azd config set alpha.infraSynth on

Generate infra folder with bicep

azd infra synth

I have put all commands in line order to start and stop the solution

Before running the following start.ps1, you need to edit it with your azure subscription id.

From PowerShell:

.\start.ps1

if you need to update the existing resources

.\update.ps1

When finished testing and playing, then clean up:

.\stop.ps1

Snapshot of start.ps1 and stop.ps1 process

image

Learn more about Aspire

https://learn.microsoft.com/en-us/dotnet/aspire/

Contribution

The repo will be kept updated with new changes from .net Aspire continuous releases and will be as updated as possible.

If you make a nice finding or something that I am not aware of in Aspire, please make a PR to this repo ๐Ÿ˜Š

Note: The background of .net aspire comes from Microsoft Tye 2020, which was a very useful tool, that was turned over time into Aspire

StackOverflow

issues

net-aspire-playground's People

Contributors

maythamfahmi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

274188a

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.