Thursday, November 18, 2021

Public Preview: Azure Container Apps

In this post let's have a look at one of the newest additions to Azure especially to its Container Options and that is Azure Container Apps.  Azure Container Apps is a fully managed serverless environment for running Containers, especially focused on Microservices. It was announced earlier this month at Microsoft Ignite, and as of today, it's in its Public Preview. 

Azure Container Apps is backed by Kubernetes behind the scene and lets us, the developers focus more on the business logic, rather than managing the infrastructure. It's completely serverless and can dynamically scale based on HTTP traffic, event-driven processing (message broker), CPU or memory load, or any KEDA Scalers.

First, let's create a Container App and see how it looks like. From Azure, search for Container App.
Container App
Click on Create.
Create Container App
We need to give the Container App a name and associate with a Container App Environment. Container App Environment is being used to maintain a boundary around groups of container apps. Container Apps in the same environment are deployed in the same virtual network and write logs to the same Log Analytics workspace.
Create Container App Envrionement
We need to select a Region, currently only available regions are Canada Central and North Europe.
Create Container App Envrionement
Then we need to associate a Log Analytics workspace.

Once that is done, we can proceed with configuring the Container.
Container App Settings
I am just proceeding with the default Quickstart image, if you unchecked that, you can select your own container and change the resource specs.

And that's it. You can proceed with the creation and once created, you should be able to get its URL and have your first look at Container Apps.
First Container App
If you want more control over things, you can install the Azure CLI containerapp extension.
az extension add `
  --source https://workerappscliextension.blob.core.windows.net/azure-cli-extension/containerapp-0.2.0-py2.py3-none-any.whl `
  --yes 
I wanted to test with a custom docker image, and I can easily do something like below.
az containerapp update `
    --name capp-web-blazor-demo `
    --resource-group rg-container-apps-demo `
    --image <something>.azurecr.io/containers-apps-demo/web/blazor:latest `
    --registry-login-server <something>.azurecr.io `
    --registry-username  <username> `     --registry-password <password> `     --debug
Custome Container
Hope this helps to get yourself started on exploring Azure Container Apps.

More read,

Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment