1

I have a Microsoft ASP.NET app that I am deploying successfully via Elastic Beanstalk to a server.

However, I am trying to run a few config files under the .ebextensions in order to set up certain packages that are used by my application.

For example, I have an installation of NewRelic script as follows:

files:
  "c:\\temp\\redistribution\\newrelic\\NewRelicDotNetAgent_x64.msi":
    source: http://download.newrelic.com/dot_net_agent/release/NewRelicDotNetAgent_x64.msi

commands:
  instNewRelic:
    command:   msiexec.exe /i c:\\temp\\redistribution\\newrelic\\NewRelicDotNetAgent_x64.msi /qb NR_LICENSE_KEY=<mylicense here> INSTALLLEVEL=1
  iisRestart:
    command:   c:\\windows\\system32\\iisreset.exe /RESTART

This command should download the installer (which is accessible via the server) and run the package.

The problem is that I don't see any indication that the files were downloaded, or that the scripts were even attempted to be run by the elastic beanstalk process.

I have checked the following:

  • The config files under the .ebextensions are included in the solution and I have checked that they are deployed to the server.
  • The server can access any of the files that I am trying to download.
  • The application runs OK, is just that this initialization script is not working.
  • I have tried deploying to both Windows 2008 IIS 7.5 and Windows 2012 IIS 8.5, and it doesn't work on either.

Any help figuring out this will be appreciated.

Thanks,

  • This command will make the copy of msi, how we can fix this? prntscr.com/b69bs6 – Max May 20 '16 at 10:00
0

I solved this problem by making sure that in VS you include All files in the project.

I thought that by marking the scripts as Content / Copy Always they would be included in the target, which they are but under the bin folder. The issue is that the .ebextensions need to be at the root of the site, and you can only achieve that by selecting under Package/Publish Web the option Include All Files. This will copy the .ebextensions at the root of the site which it will then be picked up by the Elastic Beanstalk workers.

Package/Publish Web project options

0

i was able to get the ebextensions to run after setting the files build action to "Content".

Right click file > properties > Build action. Set to "Content"

Its also helpful to verify that the contents of the file are valid with an online parser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.