Giter VIP home page Giter VIP logo

containerapps-dapralbums's Introduction

Azure Container Apps: Dapr Albums Sample

This repository was created to help users quickly deploy Dapr-enabled microservices to Azure Container Apps.

Solution Overview

The solution is composed of two microservices: the album API and the album viewer.

architecture

Album API (album-api)

The album-api is an .NET 6 minimal Web API that retrieves a list of Albums from Azure Storage using the Dapr State Store API. Upon running the application for the first time the database will be seeded. For subsequent calls, the list of albums will be retrieved from the backing state store.

Album Viewer (python-app)

The album-viewer is a node application through which the albums retrieved by the API are surfaced. In order to display the repository of albums, the album viewer microservice uses the Dapr Service invocation API to contact the backend album API.

Deploy via GitHub Actions

The entire solution is configured with GitHub Actions and Bicep for CI/CD

  1. Fork the sample repo

  2. Create the following required encrypted secrets for the sample

    Name Value
    AZURE_CREDENTIALS The JSON credentials for an Azure subscription. Replace the placeholder values and run the following command to generate the Azure authentication information for this GitHub secret az ad sp create-for-rbac --name INSERT_SP_NAME --role contributor --scopes /subscriptions/INSERT_SUBSCRIPTION_ID --sdk-auth. For guidance on adding a secret, see here
    RG_DEV The name of the resource group to create for a Development environment
    RG_PROD (optional) The name of the resource group to create for a Production environment
    GH_PAT Generate a GitHub personal access token with write:packages permission and store as a pipeline secret. This PAT will be used to push images to your private GitHub Package Registry.
  3. Go to the Build and Deploy (DEV) action and run the workflow. The workflow will build the necessary container images, push them to your private Github Package Registry and deploy the necessary Azure services along with two Container Apps for the respective services.

  4. Once the GitHub Actions have completed successfully, navigate to the Azure Portal and select the resource group you created. Open the album-viewer container app and browse to the FQDN displayed on the overview blade. You should see the sample application up and running.

Build and Run

Click here for instructions on building and running the application locally

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.