Attempt to deploy to Azure Web App: "Could not find platform linux-x64 for Calamari.AzureWebApp"

Hello everyone,

i’m having trouble with getting a deployment to Azure Web Apps to work. It’s being done with an on-prem installation with a docker image on linux.

I can create and auto-detect the Azure Web App just fine as a Deployment Target, the healthcheck is successful. But when trying to actually deploy a docker container to it, i receive the below stacktrace in the Azure Web App step. It’s being run in the built-in worker.

Octopus Server version: 2022.2.7857 
Environment Information:
  IsRunningInContainer: True
  OperatingSystem: Linux 4.15.0-167-generic #175-Ubuntu SMP Wed Jan 5 01:56:07 UTC 2022
  OsBitVersion: x64
  Is64BitProcess: True
  CurrentUser: root
  MachineName: f940978d279f
  ProcessorCount: 8
  CurrentDirectory: /Octopus
  TempDirectory: /tmp/
  HostProcessName: Octopus.Server
  PID: 1 
Executing Deploy an Azure Web App (Web Deploy) using container worker (type Deploy an Azure Web App (Web Deploy)) on Octopus Server  
Running this script in the Octopus Server security context (root) 
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162 
Executable directory is /bin 
Executable name or full path: /bin/bash 
No user context provided. Running as current user. 
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-78' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process 
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-78 exited with code 0 
Using Calamari.AzureWebApp.linux-x64 13.2.0 
Running this script in the Octopus Server security context (root) 
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162 
Executable directory is /bin 
Executable name or full path: /bin/bash 
No user context provided. Running as current user. 
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-79' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process 
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-79 exited with code 1 
Using Calamari.AzureWebApp.linux-x64 13.2.0 
The version 13.2.0 of the Calamari.AzureWebApp.linux-x64 tool has not been extracted, it will be extracted automatically. 
Running this script in the Octopus Server security context (root) 
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162 
Executable directory is /bin 
Executable name or full path: /bin/bash 
No user context provided. Running as current user. 
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-80' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process 
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-80 exited with code 0 
Could not find platform linux-x64 for Calamari.AzureWebApp
System.Exception
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.PopulateArchive(CalamariPackage calamariPackage, Action`3 write) in ConsolidatedPackageBundledPackageSource.cs:line 140
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.CreateArchive(CalamariPackage calamariPackage, Stream stream, CompressionType compressionType) in ConsolidatedPackageBundledPackageSource.cs:line 113
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.<>c__DisplayClass10_0.<OpenPackageStream>b__0(Stream s) in ConsolidatedPackageBundledPackageSource.cs:line 101
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStoreCache.GetOrCreate(String packageId, String version, CompressionType compressionType, Action`1 createPackage, ITaskLog taskLog) in BundledPackageStoreCache.cs:line 54
    at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.OpenPackageStream(CalamariPackage calamariPackage, CompressionType compressionType, ITaskLog taskLog) in ConsolidatedPackageBundledPackageSource.cs:line 97
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStore.OpenCalamariPackageStream(String packageId, CalamariPackageVersion version, CompressionType compressionType, ITaskLog taskLog) in BundledPackageStore.cs:line 147
   at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStore.OpenPackageStream(IDeploymentPackageVersion deploymentPackageVersion, ITaskLog taskLog, CompressionType compressionType) in BundledPackageStore.cs:line 102
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.InstallDeploymentPackage(IDeploymentPackageVersion packageVersion, IBootstrapperScriptGenerator bootstrapperScriptGenerator, ITaskLog taskLog) in ImmediateExecutor.cs:line 372
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.ResolveRequiredToolsMessages(List`1 serviceMessages, String toolsPlatform, IBootstrapperScriptGenerator bootstrapperScriptGenerator, CalamariFlavour calamariFlavour, IReadOnlyList`1 deploymentTools, ExecutionTargetDetails executionTargetDetails, CalamariPlatformConstraint calamariPlatformConstraint, ITaskLog taskLog) in ImmediateExecutor.cs:line 335
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.RunOnTarget(ScriptCollection finalBootstrapperScripts, String platform, IBootstrapperScriptGenerator bootstrapperScriptGenerator, IReadOnlyList`1 bootstrapperArguments, IReadOnlyList`1 allFiles, Nullable`1 isolation, Nullable`1 isolationMutexTimeout, String isolationMutexName, CalamariFlavour flavour, IReadOnlyList`1 deploymentTools, ExecutionTargetDetails executionTargetDetails, CalamariPlatformConstraint calamariPlatformConstraint, ITaskLog taskLog) in ImmediateExecutor.cs:line 267
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.ExecuteCalamari(CalamariFlavour calamariFlavour, String calamariCommand, IReadOnlyList`1 calamariArguments, IReadOnlyList`1 files, IReadOnlyList`1 deploymentTools, VariableCollection extraVariables, TargetManifest targetManifest, CalamariPlatformConstraint calamariPlatformConstraint, Nullable`1 isolationMutexTimeout, String isolationMutexName, ITaskLog taskLog) in ImmediateExecutor.cs:line 196
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.CommandBuilders.CalamariCommandBuilder.Execute(ITaskLog taskLog) in CalamariCommandBuilder.cs:line 172
   at Sashimi.AzureWebApp.AzureWebAppActionHandler.Execute(IActionHandlerContext context, ITaskLog taskLog)
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.<>c__DisplayClass17_0.<Execute in NewActionDispatcher.cs:line 288
   at Octopus.Server.Infrastructure.EitherAsyncOrSync.Execute(CancellationToken cancellationToken) in EitherAsyncOrSync.cs:line 38
   at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.ExecuteWithoutGuidance(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, CancellationToken cancellationToken) in Guidance.cs:line 148
   at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.Execute(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, Maybe`1 callbackOnExclude, CancellationToken cancellationToken) in Guidance.cs:line 78
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.Execute(ActionCommand command, Maybe`1 inContextOf, IExecutor executor, TargetManifest targetManifest, Maybe`1 stagedPackagePath, IEnumerable`1 packageAcquisitionInformation, IActionAndTargetScopedVariables variablesSnapshot, ITaskLog taskLog, IActionHandler handler, Maybe`1 guidanceExcludeCallback, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 282
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.ExecuteOnWorker(ActionCommand command, Maybe`1 inContextOf, ITaskLog taskLog, IActionHandler handler, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 190
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.Dispatch(ActionCommand command, DeploymentTarget deploymentTarget, ITaskLog taskLogForTarget, ITaskLog taskLogRoot, IActionHandlerResolver actionHandlerResolver, Maybe`1 guidanceExcludeCallback, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 107
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_2.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 249
   at Octopus.Server.Infrastructure.EitherAsyncOrSync.Execute(CancellationToken cancellationToken) in EitherAsyncOrSync.cs:line 38
   at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.ExecuteWithoutGuidance(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, CancellationToken cancellationToken) in Guidance.cs:line 148
   at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.Execute(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, Maybe`1 callbackOnExclude, CancellationToken cancellationToken) in Guidance.cs:line 78
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_1.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 244
   at Octopus.Server.Orchestration.ServerTasks.Deploy.TransientErrorDetectionExecutor.Execute(Func`2 action, ExecutionPlan plan, ITaskLog taskLog, CancellationToken cancellationToken, DeploymentTarget deploymentTarget) in TransientErrorDetectionExecutor.cs:line 49
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_0.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 239
   at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.<>c__DisplayClass6_0`4.<Execute in UnitOfWorkExecutor.cs:line 146
   at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.Do(IUnitOfWork unitOfWork, Func`1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75
   at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.Do(IUnitOfWork unitOfWork, Func`1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75
   at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.Execute[T1,T2,T3,T4](Func`6 action, CancellationToken cancellationToken, String name) in UnitOfWorkExecutor.cs:line 139
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.ExecuteActionAndInitLoggingContext(ExecutionPlan plan, ExecutionPlanner planner, PlannedStep step, DeploymentTarget targetContext, PlannedAction action, ITaskLog taskLogForTarget, ITaskLog taskLogRoot, CancellationToken cancellationToken) in ProcessStepController.cs:line 236 
August 30th 2022 09:02:04Fatal
The action Deploy an Azure Web App (Web Deploy) using container worker on tst-octopus-deploy-poc failed

Good afternoon @jenswurm,

Welcome to the Octopus forums and sorry to hear one of our steps is not working in Octopus.

For Linux based deployments you want to use the ‘Deploy an Azure App Service’ step, the Azure Web App step does not work with Linux based deployments. We have some documentation on this step here and how to set it up here.

Let me know if switching to the Azure App Service step works and allows you to deploy.

Kind Regards,

Clare

1 Like

Hello Clare,
thank you very much, that did work!

Just a little follow up question: Azure App Service does support docker compose. Is there a way to use Docker Compose with the built-in step, or would i have to use a custom az cli step for that?

Kind Regards,
Jens

Hey @jenswurm,

Fantastic news changing the step now allows your project to deploy.

With regards to your query on docker compose, the only way docker can be used in the Azure App Service step is if you choose to run the deployment on a worker inside a container, in which case it’s a single docker container running on a worker, which is using the tooling inside the docker container to contact Azure.

Are you able to elaborate on what you want the end outcome of the project to be? If we can understand more about what you are trying to achieve we can look into the best way for you to be able to do it.

I look forward to hearing from you,

Kind Regards,

Clare

1 Like

Hi Clare, thanks so much for your support!

What i want to do is akin to this: Quickstart: Create a multi-container app - Azure App Service | Microsoft Docs

In my particular use-case i’m trying to build a PoC for an automated test environment. There is supposed to be the actual application container, and additional containers with a test database with content from a package, mock servers and whatever else it may require to do automated integration tests.

I know that docker compose support on Azure App Services is in preview, so it’s understandable that it may not be natively supported by Octopus yet.

Kind regards,
Jens

Good afternoon @jenswurm,

Thank you for explaining what you are hoping to achieve, it actually sounds very interesting and I have not come across a multi-container app before.

I have put this in front of our engineers to see if its something they are actively looking into, since it is in preview in Azure itself as you said I don’t think it would be on our radar but its certainly something we might be looking at.

In the meantime if you have a spare moment it would be worth popping something on our User Voice page to have this as a feature in the future. If it gets enough traction our engineers will implement it.

I will let you know if our engineers know of the new Azure feature, I am sorry we do not offer it at the moment but hopefully if the suggestion goes in User Voice our engineers will pick it up.

Kind Regards,

Clare

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.