Deploy Web Project

Hi,

I have a problem to deploy a web project.

Situation:

  • Have a MVC 5 project
  • Packed the project wit octopack
  • Package has all files needed (checked with NuGet Packages Explorer)
  • Pushing packges to a Nuget server.
  • Creating a new release with specified nuget package.
  • Release step is almost configuerd like in video tutorial.
  • Start deploying. (Everything fine no errors).

Now problem starts.

  • Looking into directory where the nuget package is extraced, but there are only few files. All Folders and subfolders are missing.
  • Looked in the cached nuget packaged folder where deploy process copies the files. (path was looked up from raw log). Checked with NuGet Package Explorer, package explorer shows alle files with folders and subfolders.

So how can i check what command is used to extract the nuget package or why it is not extracting the folders/subfolder in the package (extracting only files in root folder)?

Regards
Saqib

I’m using the latest octopus release: 2.3.3.1369, the tentacle is also on same version.

Hi Saqib,

Thanks for getting in touch. Can you send me a full deployment log?

You can upload it here or email it to me at paul at octopusdeploy.com

Paul

Hi Paul,

I send you an email with the raw log and included the NuGet-Package, so maybe you can reproduce it better.
Deployment is only extracting 5 files from root folder. (favicon.ico, Global.asax, Web.config, Web.Debug.config, Web.Release.config)

Saqib

Hi Saqib,

Thanks for sending your package file and log. I’ve taken a look, and I even set up a project with a Tentacle, and deployed your .nupkg file to it. I used the ‘Custom Installation Directory’ setting to have it copied to a folder called C:\Test01. After the deployment, I can see that all the files have been extracted (see attached).

However, there is one difference. When my Tentacle gets the package and hashes it, I see:

82d68eb1209c922b9c1b79789802c6009bce0261

However in your log, the hash is:

db0a6b0f46556f8af2a69900b4a1f8917d2978f9

This means that the package file that you emailed me is not exactly the same as the one your NuGet server is giving to your Octopus/Tentacle.

Is it possible that you already created a package with that version number and uploaded it to the server, and overwrote it later?

What NuGet server are you using?

Can you try scheduling another deployment, but check the “Re-download packages from the NuGet server” checkbox and see if that makes a difference?

Paul

Hi, Paul,

yes i modified the package, i removed sensible data from it :wink: with package explorer. So only config files are modified nothing else.
I already tried the redownload option and I also tried different deployment options, also without ‘Custom Installation Directory’.

I recently updated the deployment server from 2.1 to 2.3.3 and had diffuculties to update, is it possible if something went wrong?!

Can I make a clean fresh installation of octopus server and use my backup made by current octopus server.

Regards
Saqib

Hi Saqib,

Thanks for the follow up. In that case the package seems fine and I can’t reproduce the problem.

If you open this folder on the Tentacle, are all the files extracted?

X:\Apps\Test\Nekeja.Web.Escrow.Website\1.0.327.4_1

Paul

Hi Paul,

no there only the root folder files (favicon.ico, Global.asax, Web.config, Web.Debug.config, Web.Release.config).

Saqib

Hi Saqib,

Can you upgrade to this version and see if the problem is fixed? I suspect that we may be encountering a bug when the package file is extracted, but this error isn’t logged. We fixed this behavior in 2.3.4

Paul

Hi Paul,

i updated to the new version both server and tentacle, but same result :frowning:

Hi,

Can you create a new version of the package, deploy it, and send me the deployment log again?

Paul

Hi,

Deployed new package and created new release. Still same result.

As I mentioned before, I double checked if there is some problem with nugget package or nuget server (I user proget server), but the downloaded packages conatins full content. Thre must be somting going wrong durning extracting the package.

Saqib

ServerTasks-16678.log.txt (10 KB)

Hi Saqib,

Thanks.

Can you try creating a new project, and adding the step to your deployment process for this package, but with none of the built-in features enabled - no package copy, no XML variable replacement, etc. Then create and deploy the release, and see what files get extracted?

Paul

Hi Paul,

did what you segguested, but same result :frowning:

Saqib

ServerTasks-16680.log.txt (3 KB)

Hi Saqib,

Is there any way you can deploy the same package to a different Tentacle, e.g. one in a completely different environment with a different conifiguration? There’s always a chance something is GAC’ed on the target machine, which can cause problems.

Hope this helps,
Nick

Hi Saqib,

Can you add a PreDeploy.ps1 file to the package that does:

dir * -r

To print the contents as soon as the files are extracted?

Also, could you try adding a folder to your application called tools,
with a text file inside, to see if it gets extracted when deployed?

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

Hi Paul,

I tried what you suggested and it worked and I was also curious so I reverted it again and tested again and it still worked so I was confused why it still works.
Then I made some additional researches and tried to reinvestigate all hints you gave. And finally I found the problem, it was a miss configuration.
I used with OctoPack the parameter “OctoPackNuGetExePath” and the resulting “exe” was 2 release behind the actual NuGet release. So I updated it and voila everything worked as expected :slight_smile:

So thank you very much to took so much time to help me :slight_smile:

I developed a small GUI to OctoPack visual studio projects so this app do not require that a user installs OctoPack package in his/her project. The app is extending the build configuration and adding the build steps that are required to OctoPack a project. And for Database projects with EF it also includes scripts to update to latest migration. So the aim of this small project was that the user projects still remain unaware of deployment files and packages.

If you are interested to take a look on it let me know. Maybe you consider to include in OctoPack :slight_smile:

Mit freundlichen Grüßen
Saqib Javed

Mobil: +49 176 24104536
Telefon: +49 6183 90999300
Telefax: +49 6183 90999309
http://www.blue-it-systems.com/

Geschäftsführender Gesellschafter: Saqib Javed
Registergericht: Amtsgericht Hanau
Handelsregister: HRB 93530

Hi Saqib,

I’m very, very pleased we found the solution to this - I thought I was going crazy trying to reproduce it :slight_smile:

I’d love to see the app you’re building. Do you plan to make it open source?

Paul