25. 03. 2025 Francesco Belacca Azure, Microsoft

Azure Container App Jobs: Why I think they’re Great

At SharpCoding 2025 in Rome—hosted at Microsoft’s headquarters—I had the pleasure of sharing our approach to simplifying deployments using Azure Container App Jobs.

In my session, “Guided Deployments: Power Platform under Control with Azure DevOps,” I discussed how we tackled the challenge of reliably extracting, versioning and deploying power platform custom solutions between multiple environments for companies of the Wuerth’s group.

In this article we will go deeper into one of the challenges we had to solve, and that was the fact that smaller companies of the group that use the CRM did not want to have dedicated agents for deployments, but still had to adhere to the group’s strict security policies and use our generic pipelines to also adhere to the group’s high quality standards before deploying any code to privileged environments.

So we asked ourselves if they really needed to pay the additional expense of Microsoft-hosted agents (one for each client, because they do not share resources, being separate entities with different needs).

This is the current cost each company would incur:

almost 40€ per month.

Microsoft hosts these agents for you and you don’t really need to worry about anything, but:

  • You have a hard limit to 6 hours max for each Azure Devops Job
  • You also have no real power on what’s inside the image that microsoft spins up for you: if you have any additional dependency that is not included(as we did, because we used the PAC CLI for example), you will always need to instruct the agent on what you expect it to install before executing anything that relies on that step, each time you get a new agent.

We found a faster and cost-efficient solution that we are now using to manage more than 90 Power Platform environments.

Context

We use many services and own a lot of VMs inside the Wuerth’s group, but as you can imagine we also need to manage those services/VMs and pay for each one.

When I need to dynamically use something that needs to “just work”, I try to think about cloud offerings. I’ve been working with Azure and using it for several years, so it’s easy for me to choose it even if we are free to also evaluate different offerings, when searching for something managed.

Another important point is that Wuerth’s strategy for cloud and specifically for Azure is “one tenant”, so we knew that if we could choose a reliable service that used Azure, this would simplify things for us, because every CRM environment is already linked to our Production Entra ID tenant.

Why Azure Container App Jobs?

You may have heard about Azure Container Apps already, but Azure Container Apps Jobs are a little different because they are as their name implies, background jobs.

We used Jobs because they really fitted our use-case: if you think about Azure Pipelines, when they are triggered, they have the concept of Stages, Jobs, and tasks:

If you just had something that you could:

  • customize, using a standard docker image
  • spin up fast and scale-out automagically (more about this later)
  • scale to 0 whenever not needed, so you don’t pay for it
  • debug easily on your PC, with the same exact setup thanks to docker

And that’s exactly how Azure Container App Jobs work!

One of the standout benefits of Azure Container App Jobs is their generous free tier and cost efficiency – Azure Container Apps – Pricing | Microsoft Azure.

The first 180,000 vCPU-seconds, 360,000 GiB-seconds, and 2 million requests each month are free. Beyond that, you pay for what you use on a per second basis based on the number of vCPU-s and GiB-s your applications are allocated.

Simplifying the Environment with WSL and Dev Containers

To guarantee that our setup was easily reproducible – even on our personal Windows machines – we used WSL (Windows Subsystem for Linux) and Dev Containers.

This approach allowed us to maintain a consistent, reliable deployment agent across various development machines without the friction of differing local environments.

Operational Benefits

By using Azure Container App Jobs, our team has enjoyed several advantages:

  • Reliability: Deployments run smoothly without unexpected downtime.
  • Cost Efficiency: Only paying for what is actively used drastically reduces overhead and we have been paying less than 10€ per month – and this is not for each client, this is the grand total.
  • Ease of Management: With no additional dependency installation required, the agent is ready to go immediately, streamlining the deployment process.

How did we do it?

This is the architecture of our solution, that also visually explains how things work:

So to sum it up, the KEDA Az Pipeline scaler does all the scaling for us

Whenever a Job is scheduled for an organization, as soon as the background KEDA job that polls that organization notices it, it fires up a container using our custom image that as soon as it starts up, receives the job details and starts executing its steps until it finishes.

When it’s not needed anymore, the container is destroyed and even if we are using Kubernetes here, we don’t really notice.

I strongly recommend checking out the official docs if you want to use these same services and technologies:

But I will also share a few simple snippets that you can grab at the end of this blog post if you don’t want to go through the official tutorial, or if you want to know more about our specific setup.

Call to Action

I encourage you to try Azure Container App Jobs in your next deployment project. Whether you’re new to the concept or already experimenting with self-hosted agents, I’d love to hear about your experiences. Please leave a comment if you’re already using them or if you have any questions about how they can benefit your workflows.

Conclusion

So to recap, why should you go and use Azure Container App Jobs?

  • Pay Only for What You Use: With Container App Jobs, you only pay for the time the job is actively running, which means no extra costs when the agent is idle.
  • Instant Readiness: The agent is ready as soon as the container image spins up—there’s no need to install dependencies or wait for long provisioning times.
  • Auto-Scaling with KEDA: you can leverage KEDA (Kubernetes-based Event-Driven Autoscaling) to automatically spin agents up when needed and scale down to zero when idle. This ensures that resources are only used when required.

Azure Container App Jobs offer a flexible and cost-effective solution for on-demand deployments. By reducing overhead and ensuring scalability only when needed, they empower teams to focus on developing great products without worrying about infrastructure complexities.

I look forward to your feedback and to hearing how you’re leveraging this technology in your projects!

Bonus Snippets

If you really want to try this out as soon as possible and do not want to go read all of the docs, I will share here the most important files that you can use to quickly create your own POC if you know what you are doing: Azure Container App Jobs: Why I think they’re Great

If you have any questions, leave a comment or contact me on LinkedIn

Francesco Belacca

Francesco Belacca

Author

Francesco Belacca

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive