Deploy an Azure Resource Manager Template Error referencing Arm Template and Parameters file

I am attempting to use the “Deploy an Azure Resource Manager Template” task.
Please note that the examples just show to enter the JSON file names (example: “servers.json” and “servers.param.json”).
This approach does not work…

No matter the path to my ARM templates I get one of two errors.

  1. Calamari.exe : Could not find ‘OctopusPackage/drop/PartsUnlimited-aspnet45/env/PartsUnlimitedEnv/Templates/FullEnvironm
    June 3rd 2019 12:00:46Error
    entSetupMerged.json’ in the package drop 20190603.5
    June 3rd 2019 12:00:46Error
    At C:\Octopus\Work\20190603190045-266-29\Bootstrap.ps1:38 char:1
  2. Calamari.exe : Error submitting deployment
    June 3rd 2019 12:09:25Error
    At C:\Octopus\Work\20190603190923-268-31\Bootstrap.ps1:38 char:1
    June 3rd 2019 12:09:25Error
  • & "C:\Octopus\OctopusServer\Tools\Calamari.Cloud\4.17.3\Calamari.exe …
    June 3rd 2019 12:09:25Error

June 3rd 2019 12:09:25Error
+ CategoryInfo : NotSpecified: (Error submitting deployment:String) [], RemoteException
June 3rd 2019 12:09:25Error
+ FullyQualifiedErrorId : NativeCommandError
June 3rd 2019 12:09:25Error

June 3rd 2019 12:09:25Error
The remote script failed with exit code 1
PLEASE NOTE: I can see the “drop” package going to the server: “Pushing package: D:\a\1\a\OctopusPackage\drop.20190603.5.zip…”

Hi,

Thanks for reaching out, Sorry to hear you have hit this issue with Octopus.
Can you show me the layout of your package? The files need to be relative to the package paths.
Also, do you mind attaching your raw logs?

Regards
John

Thanks for the quick response.
To be open I am really an Octopus newbie.
I was looking simple way export artifacts to review the structure.
The project is the MS Phoenix Project:


Templates are in /env/Templates/ *.JSON
Build artifacts are in /src/PartsUnlimitedWebsite
I am defining two packages “AZAsp.netcore” (Build artifacts for web site) and “drop” (JSON ARM Templates).
Both push to “D:\a\1\a\OctopusPackage”
How do I get the raw logs?
I am developer on 45 day trial, Octopus installation is in my Azure tenant.
Thanks again

Hi John,

To get the raw logs see https://octopus.com/docs/support/get-the-raw-output-from-a-task

Regards
John

Hi John,

Regarding:

Templates are in /env/Templates/ *.JSON
Build artifacts are in /src/PartsUnlimitedWebsite
I am defining two packages “AZAsp.netcore” (Build artifacts for web site) and “drop” (JSON ARM Templates).
Both push to “D:\a\1\a\OctopusPackage”

What do you mean by “Both push to …”?
What package are you referencing in:

Also, I just had a look at some of the templates, eg PartsUnlimited/env/Templates/DemoEnvironmentSetup.json at master · microsoft/PartsUnlimited · GitHub, they seem to take quite a few parameters, do you include a parameters file in your package?

Maybe it is easier if you send me your process json file?

Regards
John

Push to Octopus means I have Octopus build steps that

  1. Package (as .zip)
  2. Push to Octopus server (OOTB Octopus Build steps)
    ##[section]Starting: Push Packages to Octopus
    ==============================================================================
    Task : Push Package(s) to Octopus
    Description : Push your NuGet or Zip package to your Octopus Deploy Server
    Version : 3.0.222
    Author : Octopus Deploy
    Help : Version: 3.0.222. More Information
    ==============================================================================
    9eaf55b1-4ab7-46a9-9328-c53a8f45f184 exists true
    [command]C:\windows\system32\cmd.exe /D /S /C “C:\hostedtoolcache\windows\Octo\6.7.0\x64\Octo.cmd push “–server=http://octopak.westus2.cloudapp.azure.com/” “–apiKey=***” “–package=D:/a/1/a/OctopusPackage/AZAsp.netcore.20190601.16.zip” --replace-existing”

D:\a\1\s>dotnet “C:\hostedtoolcache\windows\Octo\6.7.0\x64/Octo.dll” push “–server=http://octopak.westus2.cloudapp.azure.com/” “–apiKey=***” “–package=D:/a/1/a/OctopusPackage/AZAsp.netcore.20190601.16.zip” --replace-existing
Octopus Deploy Command Line Tool, version 6.7.0

Detected automation environment: “AzureDevOps”
Space name unspecified, process will run in the default space context
Handshaking with Octopus Server: http://octopak.westus2.cloudapp.azure.com/
Handshake successful. Octopus version: 2019.5.3; API version: 3.0.0
Authenticated as: admin
Pushing package: D:\a\1\a\OctopusPackage\AZAsp.netcore.20190601.16.zip…
Requesting signature for delta compression from the server for upload of a package with id ‘AZAsp.netcore’ and version ‘20190601.16’
Calculating delta
The delta file (1,240,522 bytes) is 6.04 % the size of the orginal file (20,546,475 bytes), uploading…
Delta transfer completed
Push successful
##[section]Finishing: Push Packages to Octopus
##[section]Starting: Push drop Package to Octopus

Task : Push Package(s) to Octopus
Description : Push your NuGet or Zip package to your Octopus Deploy Server
Version : 3.0.222
Author : Octopus Deploy
Help : Version: 3.0.222. More Information

9eaf55b1-4ab7-46a9-9328-c53a8f45f184 exists true
[command]C:\windows\system32\cmd.exe /D /S /C “C:\hostedtoolcache\windows\Octo\6.7.0\x64\Octo.cmd push “–server=http://octopak.westus2.cloudapp.azure.com/” “–apiKey=***” “–package=D:/a/1/a/OctopusPackage/drop.20190603.8.zip” --replace-existing”

D:\a\1\s>dotnet “C:\hostedtoolcache\windows\Octo\6.7.0\x64/Octo.dll” push “–server=http://octopak.westus2.cloudapp.azure.com/” “–apiKey=***” “–package=D:/a/1/a/OctopusPackage/drop.20190603.8.zip” --replace-existing
Octopus Deploy Command Line Tool, version 6.7.0

Detected automation environment: “AzureDevOps”
Space name unspecified, process will run in the default space context
Handshaking with Octopus Server: http://octopak.westus2.cloudapp.azure.com/
Handshake successful. Octopus version: 2019.5.3; API version: 3.0.0
Authenticated as: admin
Pushing package: D:\a\1\a\OctopusPackage\drop.20190603.8.zip…
Requesting signature for delta compression from the server for upload of a package with id ‘drop’ and version ‘20190603.8’
Calculating delta
The delta file (12,640 bytes) is more than 95% the size of the orginal file (12,589 bytes)
Falling back to pushing the complete package to the server
Package transfer completed
Push successful
##[section]Finishing: Push drop Package to Octopusazureoctowebapp-process.json (13.9 KB)
See PROCESS JSON Attached

Hi John,

In your process json I see you are using a package with id “drop”, does this package include FullEnvironmentSetupMerged.param.json and FullEnvironmentSetupMerged.json at the root level?

Regards
John

I know drop contains the two files.
I have been attempting to determine the structure of the files inside of drop and do not know how to do that.

Hi John,

Isn’t it just a zip file?

Regards
John

Yes but how do I get it out of the server to view it?
Remember I am a Newbie.
I have mentioned a couple of times I do not know how to export artifacts out of the server.
If I could log into the server I could just look at the file right?
BTW, I am a contractor and am recommending Octopus to a large corp client.
I am under a deadline to get this working. All guidance is appreciated. :slight_smile:

So, I am familiar with Azure DevOps.
The client does not want to use Azure DevOps.
Here is the path from the task that works (for the same “drop” zip) in Azure DevOps:
Please note neither these paths or any other path I have attempted in Ocotpus works
$(System.DefaultWorkingDirectory)/PartsUnlimitedE2E/drop/PartsUnlimited-aspnet45/env/PartsUnlimitedEnv/Templates/FullEnvironmentSetupMerged.json
$(System.DefaultWorkingDirectory)/PartsUnlimitedE2E/drop/PartsUnlimited-aspnet45/env/PartsUnlimitedEnv/Templates/FullEnvironmentSetupMerged.param.json
Except for the ARM Provisioning I have the whole CI/CD working in Octopus.
The demo is today so I am just going to disable the “Deploy an Azure Resource Manager Template” task and not mention ARM provisioning today.
Thanks

ServerTasks-378.log.txt (6.4 KB)
See raw log as requested.
I am currently blindly attempting various paths hoping to get this working before my DEMO…

Reading and clicking around I just downloadeddrop.20190605.6.zip (12.3 KB)
the .zip file.

I got it figured out in time for DEMO.
Issue closed.
Thanks!!!
The best thing about support is to get the newbie thinking… LOL

Hi John,

I am glad you figured it out, so is everything you wanted working now?

Regards
John

Yes thanks!!!