Deploy to AWS Elastic Beanstalk msdeploy fails using Octopus SaaS

I am using Octopus Deploy cloud SaaS platform to deploy a .Net application to AWS Elastic Beanstalk.

I want to use custom step provided here
https://library.octopus.com/step-templates/11060b54-15bc-4b12-a912-197c6c18b7b7/actiontemplate-aws-elastic-beanstalk-.net-webapp-deploy

This template step is using msdeploy.exe and awsdeploy tool to do the deployment and when run I am getting following error.

ObjectNotFound: The term ‘msdeploy.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
June 30th 2021 16:59:38Error
At C:\Octopus\Tentacle\Work\20210630065631-1454-10\Script.ps1:32 char:1
June 30th 2021 16:59:38Error

  • msdeploy.exe -verb:sync `

Question: How can I choose msdeploy.exe and awsdeploy.exe to be available/deployed on tentacle, since I am using Octopus SaaS platform? I do not want to maintain a separate deployment server inhouse. Is there a custom image on cloud I can use where I can deploy msdeploy.exe and awsdeploy.exe?

Also is there a better approach to deploy to Elastic Beanstalk?

Hi @vaibhavn,

Thanks for getting in touch!

The default dynamic workers used for these types of deployments on our Cloud platform won’t have those tools available.
The way to work around that would be to either make use of Execution Containers and an image that has the required tools available.
Or create a static Worker in a separate worker pool with the required tools installed and configure this step to make use of that worker pool.

Regards,
Paul

1 Like

Thanks Paul. I have tried using Execution Container with a custom built docker image as worker and followed the steps here.

But I keep getting Worker failed with error ‘The remote script failed with exit code 101’.

It looks like the error is resulting from a variable naming issue:

10:32:27   Verbose  |       Octostache.Templates.RecursiveDefinitionException: An attempt to parse the variable symbol "ProfileName" appears to have resulted in a self referencing loop (ProfileName -> ProfileName). Ensure that recursive loops do not exist in the variable values.

Do you have a variable with that name? If so, it may be worth checking that it is resolving correctly and not looping on itself.

1 Like

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