Azure Container Apps - App with multiple containers - azure cli command - azure

I am using Azure Container Apps to host our Containers. I want one instance of an Azure Container App to host two different containers (these are services that share a similar lifecycle). This is possible to do manually via the Azure portal, but I cannot see a way to automate it via the Azure CLI.
I have been using the az containerapp up CLI command to create an App with a single container.
https://learn.microsoft.com/en-us/cli/azure/containerapp?view=azure-cli-latest#az-containerapp-up
But is there a way with the CLI to create an app that manages 2 containers?
Thanks

The az containerapp compose create command let you specify a Compose file.
https://learn.microsoft.com/en-us/cli/azure/containerapp/compose?view=azure-cli-latest

Related

What is the Azure equivalent of GCP's Cloud Run?

I'm looking for an equivalent to Cloud Run (GCP offering) in Azure
In particular:
It deploys a container
Can scale down to 0
Can serve a webapp
Does Azure have such a service?
I was looking at Azure App Service, but it seems to be missing the ability to scale down to 0.
Azure Container Apps is similar to CGP Cloud Run.
It deploys a container: yes
Can scale down to 0: yes
Can serve a webapp: yes
https://azure.microsoft.com/en-us/services/container-apps/
I think the equivalent of Cloud Run would be Azure Container Instances rather than Azure Container Apps.
I would say Azure Container Apps would be the equivalent of App Engine from Google Cloud which comes with more managed services around the served container like authentication, etc...

How to use custom image for Azure Linux Functions in Azure Portal?

May someone have steps to use custom image for Azure Linux Functions in Azure Portal?
To Deploy your Azure Function code in a custom Linux container requires Premium Plan or a Dedicated (App Service Plan) plan hosting.
You can also use default Azure App Service Container
Below are the steps on how to create custom image
Create a function app and Dockerfile using the Azure Functions Core Tools.
Build a custom image using Docker.
Publish a custom image to a container registry.
Create supporting resources in Azure for the function app
Deploy a function app from Docker Hub.
Add application settings to the function app.
Enable continuous deployment.
Enable SSH connections to the container.
Add a Queue storage output binding.
For further information check Azure Linux Function with Custom Image

Azure app service executes container continously

I am using the Azcopy tool to copy a storage account to another. But the requirement is that the customer wants the azcopy done via some other Azure service like Azure Runbook but not the Hybrid Runbook. I have used a Docker image with azcopy. I am using Azure App Service with the docker container option. The issue is that the command executes multiple times and also once every 5 mins. How to avoid this. Any suggestions?

Is there a way to reuse the same Azure Storage Plan and Azure App Service Plan to host multiple Azure Functions?

I have created 1 node.js and 1 java Azure Function, using VS Code
When I have deployed just these 2 functions to Azure using VS Code, I ended up with this many Azure resources (see the picture below).
Is there a way to re-use the same resource type (i.e. App Service, Storage Account, etc..) to host multiple Azure Functions?
Absolutely, we do this all the time. We usually create resources in the portal by hand the first time and later use deployment scripts (msdeploy or Powershell) to update the resources.
When you create a new Function App in the portal, you can tell Azure to put the new Function App in an existing App Service Plan and also set it to use existing storage:
You can also do this using Azure CLI if you are a CLI guy.

Restart an instance of Azure Cloud Service using Azure CLI

Is it possible to restart an instance of an Azure Cloud Service through the Azure CLI?
Azure CLI command reference here. I have seen options for restarting a vm, a vmss, a function app, a service fabric node and a web app.
Note: It is not possible to restart an instance of an Azure Cloud Services through Azure CLI.
As Walter said, you can use Azure CLI 1.0 to create and manage Azure Cloud Service, but you cannot restart an instance.
You may check the available options for Azure Cloud Service with Azure CLI 1.0:
Azure CLI Options for Cloud Services
You may use Azure PowerShell to restart an instance of an Cloud Services:
PS C:> ReSet-AzureRoleInstance -ServiceName "MySvc01" -Slot "Staging" -InstanceName "MyWebRole_IN_0" -Reboot
Is it possible to restart an instance of an Azure Cloud Service
through the Azure CLI?
Based on my knowledge, it is not possible.
Azure Cloud Service is a Classic mode service. However, Azure CLI 2.0 is optimized for managing and administering Azure resources from the command line, and for building automation scripts that work against the Azure Resource Manager. ASM/Classic mode is not supported in the Azure CLI 2.0. Please refer to this link.
Azure Cli 1.0 supports ASM mode and Cloud Service.

Resources