Is it possible to deploy only updated Azure Function Projects when I push a repo of the entire Solution? - azure-devops

I need to refactor a .Net Web API, I'm considering moving to serverless and I'm trying to understand the best option to migrate the code to Azure Functions.
As far as I understand the correct approach to reduce costs and cold start time is to split the API: it is much better to have many small web api than a single one with all methods. Small api consume less memory and cold start quicker.
Having more Functions in the same Project does not resolve the problem as they would be all deployed in the same Function App so one dll, high memory, slow cold start.
So I should create several Azure Function Projects and deploy each of them in a different Function App.
If all the above is correct we finally got to the problem:
I would structure the code and the repo so that I have one Solution containing several Azure Function Projects. How can I have a CI/CD (Azure DevOps) so that when I push the repo ONLY the Azure Function Projects updated/modified/new are deployed? I need to deploy only the modified Azure Function Projects so not to have all the Function Apps (also the ones whose code is unchanged) goes cold.
This is less important but I'd also need to have one URL for all APIs, so https://myapi.azurewebsites.net/api/Function1, https://myapi.azurewebsites.net/api/Function2, etc and not https://myapi1.azurewebsites.net/api/Function1, https://myapi2.azurewebsites.net/api/Function1, etc. Is this possible using the above structure?

You need to have multiple CI/CD pipelines with trigger limited only to specific folder:
trigger:
paths:
include:
- function-a/*
exclude:
- '*'
for this you will get pipeline triggered only if changes are done in function-a folder. To limit a work needed to develop pipelines you should consider using templates. You can find more info about this here:
Template types & usage
Build templates on Azure DevOps - this is my ow blog
In this way you will avoid repeating yourself.
EDIT
To unify your API you can use Azure Functions Proxies
With this feature, you can specify endpoints on your function app that
are implemented by another resource. You can use these proxies to
break a large API into multiple function apps (as in a microservice
architecture), while still presenting a single API surface for
clients.

Related

Deploy single API of Function App in azure portal

I want to know if it is possible or not to deploy single or selected changes deployment in azure, like github provides for other projects in case of azure function app. I have made few changes and made example API. Which is also deployed. That I don't want but wants to it to keep it in my machine. And don't want to select it on deployment. I read the documentation and it says it overwrites function app. Okay. If it does. But I want for particular code only that I can select commit and publish.

How to compare Dev and Prod Azure Data Factory implementation?

I might have modified Data Factory pipeline implemented by another developer in accident.
But don't know now that what was modified since there were so many modification.
Is there any tool to compare what is difference between development and prod environment to see how they differ from each others?
You can extract the code from the pipeline from 2 versions and compare them using comparison tools available online for free.
You can also go through this document to use the PowerShell cmdlets to get the information of the pipelines in the Azure data factory.

Azure DevOps CI/CD pipeline for application code and SQL database objects deployments together in sync

I wonder how the organizations are dealing with this problem. Do we have tools to deploy the SQL artifacts with code? I have a big project which has three components to deploy together. Angular for UI, .Net core for API and SQL objects (tables and stored procedure etc.). When a developer completes the development of a new functionality then he commits Angular code, API code and SQL tables and stored procedures. Now the challenge is to deploy all these three parts together ( in sequence of course ) through Ci/CD. I do not see any way to do this. I have tried out to do it but did not find the solution. For code , CI/CD pipelines is there but it is not in sync with the SQL objects. Do we have any way to do this?
if this is possible then please guide or provide link of tutorial or video or any course on Udemy or any other platform where I can get the step-by-step know how.
Thanks a lot.

How to audit azure DevOps services and monitor releases?

I have an Azure DevOps instance where I am trying to control and monitor who is doing releases. So, who pressed the button to do the release and what releases have happened.
I tried in Audit options, but it is not satisfying my requirement.
What is the best way to get what I am looking for?
Thanks in advance…
It's a little unclear what you mean by CONTROL
If you are needing to tighten control of which users are allowed to initiate releases outside of a CI/CD pipeline, this is something you would use the built in object permissions for release pipelines.
I've organized our release pipelines into folders
Each of these folders is treated as an object upon which permissions can be set.
For MONITORING the release pipelines
Again, I tend to just use the All Pipelines folder which gives a list of the releases that happened ordered by date. That view lists the pipeline and gives the users Avatar, which is enough to know who created the release.
Also
There are some out-of-the-box widgets that you can put on your dashboard, but I've found them to be unhelpful on the whole. Not to mention that if you have 100's of pipelines you will want to have something reading from your list of pipelines via REST api and pushing those widgets onto the dashboard via the REST api so that you don't need to manage them all "by hand" through the UI. Then if you're going to get into using the REST api, you might as well write your own tool to report the information you need (and possibly turn it into a widget others can consume from the marketplace). I haven't found anything very effective on reporting/summarizing the collection of release pipelines from the marketplace, but there may be something squirreled away in there somewhere.

Azure Data Factory development with multiple users without using Source Control

While working on a single Azure Data Factory solution with no Source Control. Is it possible to work parallelly for a team of 3 or more developers, without corrupting the main JSON?
Scenario:
All developers are accessing the same ADF and working on different pipelines at the same time. One of the developer publishes his/her updates, does it somehow overwrites or ignores the changes other developers are publishing?
I tested and found that:
Multiple users can access the same Data factory and working with
different pipelines in same time.
Publish only affect the current user and the current pipeline which
user is developing and editing. It won't overwrites other pipelines.
For you question:
Is it possible to work parallelly for a team of 3 or more developers, without corrupting the main JSON?
Yes, it's possible.
One of the developer publishes his/her updates, does it somehow overwrites or ignores the changes other developers are publishing?
No, it doesn't. For example, user A only develop with pipeline A, then publish again. The Publish only affect the current pipeline, won't overwrite or affection other pipelines.
You could test and prove it.
Update:
Thanks #V_Singh for share us the Microsoft suggestion:
Microsoft suggested to use CI/CD only, otherwise there will be some disparity in code.
Reply from Microsoft:
"In Live Mode can hit unexpected errors if you try to publish because you may have not the latest version ( For Example user A publish, user B is using old version and depends on an old resource and try to publish) not possible. Suggested to please use Git, since it is intended for collaborative scenarios."
Hope this helps.