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 custom power platform solutions between multiple environments for companies of the Würth Group.

In this article we’ll go deeper into one of the challenges we had to solve, which was that smaller companies in the group that use CRM did not want to have dedicated agents for deployments, yet 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 for 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 except:

  • You have a hard limit of 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 dependencies that aren’t 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, every time you get a new agent

We found a faster and more 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 Würth 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’re also free to evaluate multiple offerings when searching for something managed.

Another important point is that Würth’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’ve heard about Azure Container Apps already, but Azure Container Apps Jobs are a little different because as their name implies, they are background jobs.

We used Jobs because they really fit our use case: if you think about Azure Pipelines, when they’re 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 it’s not needed, so you don’t pay for it
  • easily debug 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 determined by 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 that’s not for each client, that’s 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, which also visually explains how things work:

So to sum 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. As soon as it starts up, it receives the job details and starts executing its steps until it finishes.

When it’s not needed any more, 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 also want to 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 don’t want to go read all of the docs, I’ll share the most important files here which you can use to quickly create your own POC if you know what you’re doing: Azure Container App Jobs: Why I think they’re Great

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

These Solutions are Engineered by Humans

Did you find this article interesting? Are you an “under the hood” kind of person? We’re really big on automation and we’re always looking for people in a similar vein to fill roles like this one as well as other roles here at Würth Phoenix.

Francesco Belacca

Francesco Belacca

Author

Francesco Belacca

Leave a Reply

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

Archive