Monday, 5 August 2019

azure cli and devops


if you want to use azure cli in your devops pipeline,

you need to setup azure service connection, this will allow you to "login" to your subscription (just like you did when you are doing locally with az login, but you don't actually do login here, because you will setup principle which will allow your az cli to auto login to a specific subscription)




Note:  i found i can only use "service principle" for now, not the managed identity.

what is service principle what is managed identity? have a look here:
https://blogs.endjin.com/2019/01/managing-applications-using-azure-ad-service-principals-and-managed-identities/

https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview

https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/howto-assign-access-portal






az group create --name myResourceGroup --location westeurope



az storage account create --name javafnapp4storage  --location westeurope --resource-group myResourceGroup --sku Standard_LRS


az functionapp create --resource-group myResourceGroup --consumption-plan-location westeurope --name javafnapp4 --storage-account  javafnapp4storage --runtime java


cli to create azure function

https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli

cli devops
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-cli?view=azure-devops




1 comment:

  1. Amazing write-up!

    what a fantastic post, this is so useful information cant wait to utilize, thank you for sharing this post,
    looking more form your side.kindly write article about Best Development and Opreations Services

    ReplyDelete