I set up a new deployment project in Octopus and tried it out. We already have about 8 working deployment projects that we imported from the old Deployment Manager but this is the first one we tried to set up from scratch.
When I run the deployment it fails with this error:
Copying package contents to 'C:\FOLDERX\DEFAULT\APPNAME’
Info
Copied 109 files
Info
Creating Web Application APPNAME …
Error
Site “APPNAME” does not exist.
Error
At `\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:183 char:3
Error
throw "Site "$SiteName" does not exist."
Error
Error
CategoryInfo : OperationStopped: (Site “APPNAME” does not exist.:String) [], RuntimeException
Error
FullyQualifiedErrorId : Site “APPNAME” does not exist.
Error
Error
Script ‘C:\FOLDERX\DEFAULT\APPNAME\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ returned non-zero exit code: 1
Error
Running rollback conventions…
Error
Script ‘C:\FOLDERX\DEFAULT\APPNAME\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ returned non-zero exit code: 1
Fatal
The remote script failed with exit code 1
Fatal
deploy the Insight Manager on SERVER01
I don’t understand why it’s saying the site doesn’t exist. when I first tried it and saw this error I created the site manually in IIS on the server, but still get this error so clearly I have something fundamentally wrong in the settings. This is an ASP.Net application.
Thanks for reaching out. Could you please follow the below steps and send us a full deployment log so we can check this out in detail?
1) Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables
2) Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.
3) Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task
I will do as you said above. Do you know why it’s trying to create the site though? I don’t want it to do anything beyond dropping the files in the right place, which it already does. I would like to understand what setting is causing it to do this:
‘Creating Web Application InsightManager …’
Thanks for sending over those logs! I’m not quite sure I understand what you want to create in IIS. Is it a Web Site, a Web Application or a Virtual Directory? (see screenshot 1).
It does seem like all you want to do is deploy to an existing IIS Web site, but for some reason you picked the “Web Application” feature instead of “Web Site” (See screenshot 2).
Let me know which one you’re trying to create, and also please send me a screenshot of how it looks on IIS (same as my first screenshot here).
I’m trying to deploy an ASP.Net Web App. Here’s how it is in IIS locally and the same on the server in attachment. IIS Web Application is selected in the ‘IIS Deployment Type’ section so this all looks correct.
Like I said above, I only want it to drop the files. What have I got wrong?
Ah right! - thanks for that. The Site name on the servers is not Default Web Site - it varies according to the client name etc, so I wonder if it’s possible to put this into a variable and refer to it in the Process section?