Git Product home page Git Product logo

azureapi-github-actions's Introduction

To run the Flask API inside of a container, the Docker image must exist inside of Azure Container Registry

To build the Docker image

docker build -t name_of_docker_image_tag .

To create the Azuure Container Registry

az acr create --name name_of_acr --resource-group name_of_rg --sku Standard

To log into the ACR from the terminal

az acr login --name name_of_acr

To tag and push the Docker image and prepare it for a push to ACR

docker tag name_of_docker_image_tag name_of_acr.azurecr.io/azureapi/flask docker push name_of_acr.azurecr.io/azureapi/flask


AzureAPI pipeline (azure.yml) make use of AzurCLI step. It should set first / beforehand . Can be found in GitHub marketplace . There is example of code to add into pipeline

AzureAPI pipeline runs within virtualenv that uses to run the flow, in our case ubuntu : builds: runs-on: ubuntu-latest

AzureAPI pipeline uses credentials to login into azure.

have to create RBAC role first :

#Create AAD App and Service Principal and assign RBAC Role

_az ad sp create-for-rbac -n "azureapiflask" --role contributor --scopes /subscriptions/22-284d2-6a19-4781-87f8-5c564ec4fec9 --json-auth

"scopes" - is Azure subscription ID. The command returns JSON doc . Copy it to GitHub

https://learn.microsoft.com/en-us/azure/container-instances/container-instances-github-action?tabs=userlevel#configure-github-workflow

azureapi-github-actions's People

Contributors

adminturneddevops avatar vbronfman 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.