Deployment Manager doesn't copy files to target server

MohammedMohammed Posts: 19
edited July 22, 2014 5:01PM in Deployment Manager
I am evaluating Redgate Deployment Manager Tool.
Have download Deployment Manger on Build Server and Agent Tool on Different Web server.
Created an Environment for the Web Server and created package using RGPublish.exe
RgPublish.exe /source="C:\BuildsFromCSD" /target="\\Test1\WebOrder" /version=20140709.1 /packageid=WebOrder /target=feed:http://xxxxxxxxx.risk.regn.net:81/nuget/ /verbose

Created a Project /Step and created release and deployed release
Release was deployed successfully.
But none of the folder and files was copied to Target location.
Can you please let me know if I am missing any step in deployment Manager?

Thank you,

Comments

  • Hi Mohammed,

    By default, deployment manager puts the files from a deployment into a new folder (for your package, I would expect that to be C:\ProgramData\Red Gate\DeploymentAgent\Applications\<your environment name>\WebOrder\20140709.1), then, if the package contains a web.config file, atomically updates IIS to point to that location. If you want Deployment Manager to copy the files to the current location that IIS is set up for, then you need to set the RedGatePackageDirectoryPath variable. If you want Deployment Manager not to change any IIS settings, then you can set the RedGateNotAWebsite variable to True.

    For more information see our documentation

    Hope this helps

    Robin
    Robin Hellen
    Test Engineer
    DLM Automation
  • Setup RedGatePackageDirectorPath variable to \\xxxxxxxxxxx\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder and RedGateNotAWebsite variable to True.
    Release was deployed successfully.
    Execute step WebOrder Deployment Script (Deploy WebOrder1.20140709.1) against machine xxxxxxxx002
    2014-07-11 09:09:42 -05:00 INFO Evaluating deployment variables
    2014-07-11 09:09:42 -05:00 INFO Begin deployment
    2014-07-11 09:09:42 -05:00 DEBUG Deploying package WebOrder1 20140709.1 to agent http://xxxxxxx002.na.choicepoint.net:10301/
    2014-07-11 09:10:23 -05:00 INFO Deployment successful.
    2014-07-11 09:10:23 -05:00 INFO Agent output follows:
    2014-07-11 10:09:43 -04:00 DEBUG Begin deployment of package: WebOrder1.20140709.1
    2014-07-11 10:09:43 -04:00 DEBUG Deployment Agent information is below:
    2014-07-11 10:09:43 -04:00 DEBUG - Machine name: ALAWQCPM002
    2014-07-11 10:09:43 -04:00 DEBUG - Is 64-bit OS: False
    2014-07-11 10:09:43 -04:00 DEBUG - Is 64-bit process: False
    2014-07-11 10:09:43 -04:00 DEBUG - Service user name: SYSTEM
    2014-07-11 10:09:43 -04:00 DEBUG - CLR version: 4.0.30319.1022
    2014-07-11 10:09:43 -04:00 DEBUG - Current directory: C:\WINDOWS\system32
    2014-07-11 10:09:43 -04:00 DEBUG - OS version: Microsoft Windows NT 5.2.3790 Service Pack 2
    2014-07-11 10:09:43 -04:00 DEBUG - Agent version: 2.4.12.1
    2014-07-11 10:09:43 -04:00 DEBUG Installing package WebOrder1.20140709.1 from uploaded package cache into C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\WebOrder1\20140709.1
    2014-07-11 10:09:50 -04:00 INFO Installing 'WebOrder1 20140709.1'.
    2014-07-11 10:10:02 -04:00 INFO Successfully installed 'WebOrder1 20140709.1'.
    2014-07-11 10:10:06 -04:00 DEBUG The following variables are available:
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGatePackageName] = 'WebOrder1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGatePackageVersion] = '20140709.1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGatePackageNameAndVersion] = 'WebOrder1.20140709.1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateEnvironmentName] = 'DLTest2'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateReleaseNumber] = '20140709.1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateReleaseNotes] = 'DLTest2 Release'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateDeploymentComments] = 'Testing'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateProjectName] = 'DirectLink Website'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateProjectDescription] = 'DirectLink Website Project'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateTaskId] = 'deployments-129'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateDeploymentServerVersion] = '2.4.12.1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateReleasedBy] = 'administrator'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateDeployedBy] = 'administrator'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateMachineName] = 'alawqcpm002'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGatePackageDirectoryPath] = '\\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateNotAWebSite] = 'True'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateDeploymentAgentVersion] = '2.4.12.1'
    2014-07-11 10:10:06 -04:00 DEBUG - [RedGateDeploymentAgentMode] = 'installed-agent'
    2014-07-11 10:10:06 -04:00 INFO Conventions will be run in the following order:
    2014-07-11 10:10:06 -04:00 INFO - Run PreDeploy.ps1
    2014-07-11 10:10:06 -04:00 INFO - Apply .config transforms
    2014-07-11 10:10:06 -04:00 INFO - Update appSettings/connectionStrings in .config(s)
    2014-07-11 10:10:06 -04:00 INFO - Copy package
    2014-07-11 10:10:06 -04:00 DEBUG x Database package deployment plugin (not applicable to this package)
    2014-07-11 10:10:06 -04:00 INFO - Run Deploy.ps1
    2014-07-11 10:10:06 -04:00 INFO - Configure IIS
    2014-07-11 10:10:06 -04:00 INFO - Delete package file
    2014-07-11 10:10:06 -04:00 INFO - Run PostDeploy.ps1
    2014-07-11 10:10:06 -04:00 DEBUG Looking for PowerShell scripts named PreDeploy.ps1
    2014-07-11 10:10:06 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-11 10:10:06 -04:00 INFO Looking for any configuration transformation files
    2014-07-11 10:10:06 -04:00 INFO Looking for appSettings and connectionStrings in any .config files
    2014-07-11 10:10:06 -04:00 DEBUG Scanning configuration file: C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\WebOrder1\20140709.1\DLWeb\Web.config
    2014-07-11 10:10:06 -04:00 DEBUG Scanning configuration file: C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\WebOrder1\20140709.1\DLWeb\Web.Template.config
    2014-07-11 10:10:06 -04:00 INFO Extracting package contents to '\\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder'
    2014-07-11 10:10:21 -04:00 DEBUG Looking for PowerShell scripts named Deploy.ps1
    2014-07-11 10:10:21 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-11 10:10:21 -04:00 DEBUG The RedGateNotAWebSite variable has been specified; skipping IIS configuration.
    2014-07-11 10:10:21 -04:00 INFO Deleting package: \\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder\WebOrder1.20140709.1.nupkg
    2014-07-11 10:10:21 -04:00 DEBUG Looking for PowerShell scripts named PostDeploy.ps1
    2014-07-11 10:10:21 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-11 10:10:22 -04:00 INFO \\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder\: updating cached size to 115 MB
    2014-07-11 10:10:22 -04:00 INFO C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\WebOrder1\20140709.1\: updating cached size to 50.7 MB

    But the folder and files were copied to C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\WebOrder1\20140709.1 on Target computer, instead of \\xxxxxxxxxxx\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder.

    Note: Target \\xxxxxxxxxxx\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder has existing files.
    1) Does Deployment manager overwrite those files and what should I do copy folders and files to existing website/virtual directory folders and files?
    2) Another Question when I executed below code from CMD, Ignoring unrecognised argument '/overwrite' message is displayed. Is /overwrite unrecognized argument?

    C:\>RgPublish.exe /source="C:\BuildsFromCSD" /target="\\alawqcpm002\S$\InetPub\w
    wwrootTest2\DLTest2Website\WebOrder" /overwrite /version=20140709.1 /packageid=W
    ebOrder1 /target=feed:http://peowdcsd005.risk.regn.net:81/nuget/ /verbose
    Red Gate Package Publishing Tool version 2.4.12.1

    Ignoring unrecognised argument '/overwrite' message is displayed.
    Validating package...
    Validated successfully. Writing package...
    Writing package...
    Publishing package to feed at http://peowdcsd005.risk.regn.net:81/nuget/...
    Published successfully.

    Robin, Thank you for your help
    Mohammed
  • Deployment Location
    The deployment log indicates that the files were copied to correct location:
    2014-07-11 10:10:06 -04:00 INFO Extracting package contents to '\\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder'
    The agent will always extract the package to a directory under %ALLUSERSPROFILE%\Red Gate\Deployment Agent\Applications\. If RedGatePackageDirectoryPath is set, it will then copy the extracted package to the path you set in RedGatePackageDirectoryPath. It will not delete the existing contents of RedGatePackageDirectoryPath unless you set RedGatePurgePackageDirectoryBeforeCopy to true (see http://documentation.red-gate.com/display/DM2/Variables)

    Use of RgPublish
    I'm not sure why you're specifying two /target arguments to RgPublish.
    RgPublish.exe /source="C:\BuildsFromCSD" /target="\\alawqcpm002\S$\InetPub\wwwrootTest2\DLTest2Website\WebOrder" /overwrite /version=20140709.1 /packageid=WebOrder1 /target=feed:http://peowdcsd005.risk.regn.net:81/nuget/ /verbose
    The first target argument looks like you're trying to set the deployment destination, which you don't need to do at this point. RgPublish is only used for creating packages and publishing them to a NuGet feed - it does not deploy the packages anywhere.
    The second target argument is specifying a target NuGet feed to publish to. It is this target which takes effect, and this is the reason that the overwrite option is not supported - overwrite is only supported when publishing to a .nupkg file on the local file system. The overwrite behaviour when publishing to a NuGet feed is defined by the NuGet server.
    Development Lead
    Redgate Software
  • Mike,
    Thank you for your response.

    Yes, after changing the file path on the package, the files are getting copied to the correct location.

    Mohammed
  • Mike,
    I have notice after Deployment manager has successfully deployed the build.
    Some CSS file, Images and folder were not copied from source folder to the target folder on remote computer.
    I am not sure why this files are not getting copied, Can you please tell me if I need to setup some variable to make sure all the files and folder are copied from source to target folder.
    Thank you
    Mohammed
  • Are the files in the package? You can check by renaming the .nupkg file to .zip and then using Windows Explorer to look in the package.

    If they're not in the package, are they in the source directory that you're packaging up? If you're packaging a .csproj using RgPublish, are the files marked as Content in Visual Studio?
    Development Lead
    Redgate Software
  • Yes, there are in the Package feed under C:\ProgramData\Red Gate\DeploymentManager\Data\feed\Styles7140.20140709.1.zip
    Yes, the files are in source directory.
    No, I am not packaging a .csproj using RgPublish. I am packaging just folders
    Below is the code I am executing from CMD to create packages.
    RgPublish.exe /source="C:\XXX\DLTest2Styles" /version=20140709.1 /packageid=Styles7140 /target=feed:http://XXXXX/nuget/ /verbose

    RgPublish.exe /source="C:\XXX\DLTest2Images" /version=20140709.1 /packageid=Images7140 /target=feed:http://XXXXX/nuget/ /verbose

    Thank you
  • Could you post the logs from the deployment of those packages in DeploymentManager?
    Development Lead
    Redgate Software
  • After my research I found looks like any file starting with name Package% is not getting copied over from source to target.
  • Execute step Styles (Deploy Styles7140.20140709.1) against machine XXXXX
    2014-07-17 15:21:42 -05:00 INFO Evaluating deployment variables
    2014-07-17 15:21:42 -05:00 INFO Begin deployment
    2014-07-17 15:21:42 -05:00 DEBUG Deploying package Styles7140 20140709.1 to agent http://XXXXX/
    2014-07-17 15:21:48 -05:00 INFO Deployment successful.
    2014-07-17 15:21:48 -05:00 INFO Agent output follows:
    2014-07-17 16:21:43 -04:00 DEBUG Begin deployment of package: Styles7140.20140709.1
    2014-07-17 16:21:43 -04:00 DEBUG Deployment Agent information is below:
    2014-07-17 16:21:43 -04:00 DEBUG - Machine name: XXXXX
    2014-07-17 16:21:43 -04:00 DEBUG - Is 64-bit OS: False
    2014-07-17 16:21:43 -04:00 DEBUG - Is 64-bit process: False
    2014-07-17 16:21:43 -04:00 DEBUG - Service user name: SYSTEM
    2014-07-17 16:21:43 -04:00 DEBUG - CLR version: 4.0.30319.1022
    2014-07-17 16:21:43 -04:00 DEBUG - Current directory: C:\WINDOWS\system32
    2014-07-17 16:21:43 -04:00 DEBUG - OS version: Microsoft Windows NT 5.2.3790 Service Pack 2
    2014-07-17 16:21:43 -04:00 DEBUG - Agent version: 2.4.12.1
    2014-07-17 16:21:43 -04:00 DEBUG Installing package Styles7140.20140709.1 from uploaded package cache into C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\Styles7140\20140709.1_2
    2014-07-17 16:21:44 -04:00 INFO Installing 'Styles7140 20140709.1'.
    2014-07-17 16:21:46 -04:00 INFO Successfully installed 'Styles7140 20140709.1'.
    2014-07-17 16:21:47 -04:00 DEBUG The following variables are available:
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGatePackageName] = 'Styles7140'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGatePackageVersion] = '20140709.1'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGatePackageNameAndVersion] = 'Styles7140.20140709.1'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateEnvironmentName] = 'DLTest2'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateReleaseNumber] = '20140709.1'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateReleaseNotes] = 'Testing All'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateDeploymentComments] = 'test'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateProjectName] = 'DirectLink Website'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateProjectDescription] = 'DirectLink Website Project'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateTaskId] = 'deployments-290'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateDeploymentServerVersion] = '2.4.12.1'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateReleasedBy] = 'administrator'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateDeployedBy] = 'administrator'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateMachineName] = 'alawqcpm001'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGatePackageDirectoryPath] = 'D:\DLTest2Styles'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateDeploymentAgentVersion] = '2.4.12.1'
    2014-07-17 16:21:47 -04:00 DEBUG - [RedGateDeploymentAgentMode] = 'installed-agent'
    2014-07-17 16:21:47 -04:00 INFO Conventions will be run in the following order:
    2014-07-17 16:21:47 -04:00 INFO - Run PreDeploy.ps1
    2014-07-17 16:21:47 -04:00 INFO - Apply .config transforms
    2014-07-17 16:21:47 -04:00 INFO - Update appSettings/connectionStrings in .config(s)
    2014-07-17 16:21:47 -04:00 INFO - Copy package
    2014-07-17 16:21:47 -04:00 DEBUG x Database package deployment plugin (not applicable to this package)
    2014-07-17 16:21:47 -04:00 INFO - Run Deploy.ps1
    2014-07-17 16:21:47 -04:00 INFO - Configure IIS
    2014-07-17 16:21:47 -04:00 INFO - Delete package file
    2014-07-17 16:21:47 -04:00 INFO - Run PostDeploy.ps1
    2014-07-17 16:21:47 -04:00 DEBUG Looking for PowerShell scripts named PreDeploy.ps1
    2014-07-17 16:21:47 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-17 16:21:47 -04:00 INFO Looking for any configuration transformation files
    2014-07-17 16:21:47 -04:00 INFO Looking for appSettings and connectionStrings in any .config files
    2014-07-17 16:21:47 -04:00 INFO Extracting package contents to 'D:\DLTest2Styles'
    2014-07-17 16:21:48 -04:00 DEBUG Looking for PowerShell scripts named Deploy.ps1
    2014-07-17 16:21:48 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-17 16:21:48 -04:00 DEBUG A web.config file was not found, so no IIS configuration will be performed. You can use the RedGateNotAWebSite project variable if you want Deployment Manager to skip IIS configuration.
    2014-07-17 16:21:48 -04:00 INFO Deleting package: D:\DLTest2Styles\Styles7140.20140709.1.nupkg
    2014-07-17 16:21:48 -04:00 DEBUG Looking for PowerShell scripts named PostDeploy.ps1
    2014-07-17 16:21:48 -04:00 DEBUG No scripts with a .ps1 extension were found.
    2014-07-17 16:21:48 -04:00 INFO C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\Styles7140\20140709.1_2\: updating cached size to 3.46 MB
    2014-07-17 16:21:48 -04:00 INFO D:\DLTest2Styles\: updating cached size to 3.07 MB
  • That's very strange - it's definitely not something we've heard of before.

    Would you be able to check the contents of the following on the remote agent to see where the files are going missing?
    • C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\Styles7140\20140709.1_2
    • D:\DLTest2Styles
    • C:\ProgramData\Red Gate\DeploymentAgent\Applications\.Agent\Packages\Styles7140.20140709.1.nupkg (examine the contents of the package by renaming to .zip and then opening with Windows Explorer)
    Development Lead
    Redgate Software
  • Under C:\ProgramData\Red Gate\DeploymentAgent\Applications, none of 6 CSS files exist with name PackageDetait.css, PackageDetail.XXX.css, PackageDetailNoFlow.css, PackagePreview.css etc.
    Under D:\DLTest2Styles
    All the 6 CSS files exist from old version

    There is no folder with C:\ProgramData\Red Gate\DeploymentAgent\Applications\.Agent\Packages\Styles7140.20140709.1.nupkg (examine the contents of the package by renaming to .zip and then opening with Windows Explorer) on Target Server.

    There is C:\Program Files\Red Gate\Deployment Agent\Agent, but doesn't contain Package folder
  • Apologies, I got the path wrong - hadn't noticed that you were using Server 2003 for the Agent.

    It should have been
    C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\.Agent\Packages\Styles7140.20140709.1.nupkg
    
    Development Lead
    Redgate Software
  • Verified, Under C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\.Agent\Packages\Styles7140.20140709.1.zip all CSS files exist with name PackageDetait.css, PackagePreview.css etc.
  • And CSS files with name PackageDetait.css, PackagePreview.css etc. doesn’t exist under C:\Documents and Settings\All Users\Application Data\Red Gate\DeploymentAgent\Applications\DLTest2\Styles7140\20140709.1_2
  • Can you please let me know, why the files are not getting copied to target server. As I said earlier we are evaluating this tool, and I have to give a demo of this tool to my development team soon.
    Thank you,
    Mohammed
  • I'm afraid we don't know exactly what's going on here. I suspect there might be a bug in the NuGet libraries around handling of filenames starting with 'Package', because NuGet uses a 'Package' folder to store package metadata.

    I don't know how easy it would be for you to change the structure of your content, but one workaround would be to put all the files in a sub-folder inside the package, rather than at the root. Alternatively, renaming the files might work.

    I'm sorry I don't have anything better to suggest, but I will attempt to reproduce the problem here and get it added to our bug list. If you wouldn't mind e-mailing your package file to us, that might also help us with reproduction. If you are able to do that, please send the e-mail to support@red-gate.com and mark it for the attention of Michael Upton.
    Development Lead
    Redgate Software
  • ok, thank you
  • Mike,
    Received Server Error in Application "DEPLOYMENT MANAGER PORTAL"
    on deployment Manger web page.

    Detailed Error Information
    Module CustomErrorModule
    Notification SendResponse
    Handler System.Web.Mvc.MvcHandler
    Error Code 0x80070021
    Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
    Config File \\?\C:\Program Files (x86)\Red Gate\Deployment Manager\Portal\web.config
    Requested URL http://XXXXX.risk.regn.net:81/
    Physical Path C:\Program Files (x86)\Red Gate\Deployment Manager\Portal
    Logon Method Anonymous
    Logon User Anonymous

    Config Source
    53: <system.webServer>
    54: <httpErrors existingResponse="PassThrough" errorMode="Custom">
    55: <remove statusCode="404" />

    Do you know what is causing the issue and how to fix it ?

    Thank you
    Mohammed
Sign In or Register to comment.