Can we run a _custom_ msdeploy script _before_ the normal deployment script kicks off?

Pure Krome's Avatar

Pure Krome

24 Feb, 2015 12:16 AM

Can we run our own custom msdeploy command before the normal WEB DEPLOY script is executed?

ie. in the Before Deployment Script section?

Context:
we want to STOP our destination website before the (AV provided) Web Deploy script executes.

This is the script:

msdeploy.exe 
    -verb:sync 
    -source=recycleApp="www.our-azure-website",recycleMode="StopAppPool"
    -dest:auto

REF 1: https://johanleino.wordpress.com/2012/12/19/understanding-the-basic...
REF 2: https://technet.microsoft.com/en-us/library/ee522997(v=ws.10).aspx

So is this possible? If so, how? Do we need to specify a particular path to msdeploy? does that exist on the vm?

  1. Support Staff 1 Posted by Feodor Fitsner on 24 Feb, 2015 12:42 AM

    Feodor Fitsner's Avatar

    Yes, msdeploy.exe is installed on build workers into C:\Program Files (x86)\IIS\Microsoft Web Deploy V3

  2. 2 Posted by Pure Krome on 24 Feb, 2015 12:43 AM

    Pure Krome's Avatar

    so it should be..

    CMD
    C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe -verb:sync -source=recycleApp="www.our-azure-website",recycleMode="StopAppPool"-dest:auto
    
  3. Support Staff 3 Posted by Feodor Fitsner on 24 Feb, 2015 12:46 AM

    Feodor Fitsner's Avatar

    + destination server and credentials I guess.

  4. 4 Posted by Pure Krome on 24 Feb, 2015 02:01 AM

    Pure Krome's Avatar

    @Feodor le-sniff. I'm trying to get it to work, but it's just not :(

    Can you try running this against one of your test azure sites and tell me if u get an UNAUTH ERROR thingy?

    "c:\program files (x86)\iis\microsoft web deploy v3\msdeploy.exe" -verb:sync -source=recycleApp -dest:recycleApp="<Website Name>",recycleMode="RecycleAppPool",computerName="https://<Server>",userName="<UserName including the $ at the start>",password="<supa secret password>",authType="Basic"

    <Server>, <WebSite Name> and <UserName> are from the Deployment tabs in the AV UI.

  5. Support Staff 5 Posted by Feodor Fitsner on 24 Feb, 2015 03:05 AM

    Feodor Fitsner's Avatar

    I've been able to connect, but looks like recycleApp provider is prohibited on WAWS. See attached screenshot.

  6. 6 Posted by Pure Krome on 24 Feb, 2015 03:13 AM

    Pure Krome's Avatar

    Perfect - i was getting exactly the same error. Bummer, dude.

    Ok, attempt #2 - what about using the Azure Powershell CLI thingy? That has (Stop-AzureWebsite)[https://msdn.microsoft.com/en-us/library/azure/dn495185.aspx] command.

    Any samples you have that can show how to use Azure powershell commands? including the (very hard) auth-1st-step :(

  7. Support Staff 7 Posted by Feodor Fitsner on 24 Feb, 2015 03:32 AM

    Feodor Fitsner's Avatar

    You can just use app_offline page, no?

    -Feodor

  8. 8 Posted by Pure Krome on 24 Feb, 2015 03:35 AM

    Pure Krome's Avatar

    which is this -> Take ASP.NET application offline during deployment ?

  9. Support Staff 9 Posted by Feodor Fitsner on 24 Feb, 2015 03:41 AM

    Feodor Fitsner's Avatar

    Right.

    -Feodor

  10. Pure Krome closed this discussion on 24 Feb, 2015 09:46 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Jul, 2019 04:51 AM
15 Jul, 2019 06:33 PM
15 Jul, 2019 06:09 PM
15 Jul, 2019 05:53 PM
15 Jul, 2019 05:46 PM