Deploying to Azure

Chris Belfield's Avatar

Chris Belfield

08 Apr, 2019 02:08 PM

Hi there,

This script seems to be out of date:

https://github.com/appveyor/ci/blob/master/scripts/enterprise/copy-master-image-azure.ps1

I don't seem to be able to deploy from the unleased VHD from my master VM? Is there a better tutorial?

Chris

  1. Support Staff 1 Posted by Ilya Finkelshte... on 08 Apr, 2019 05:02 PM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    I checked internal traces related to your project. Azure VMs is being created OK, but AppVeyor never "hear back" from it. This maybe connected to the fact that AppVeyor build agent was not started automatically. Please check that you completed all 4 steps from this part of documentation:

    • agent installed
    • set to Azure mode
    • auto-logon enabled
    • build agent is set to the autostart

    When you started your master VM it should auto-logon and agent should be started interactively. When you double-checked that, re-create VHD from the master VM.

    Let us know how it goes.

    Ilya.

  2. 2 Posted by Chris Belfield on 08 Apr, 2019 06:38 PM

    Chris Belfield's Avatar

    Hi Ilya,

    The current script for creating snapshots from vhd doesn't work, is there
    an updated version?

  3. Support Staff 3 Posted by Ilya Finkelshte... on 08 Apr, 2019 08:01 PM

    Ilya Finkelshteyn's Avatar

    According to the screenshots you sent in the initial post, I checked internal logs and pointed you to the probable root cause why build is not starting,

    If you believe that there is some problem with copy-master-image-azure.ps1, please provide more information: how you execute it, what error are you getting and so on.

  4. 4 Posted by Chris Belfield on 08 Apr, 2019 08:21 PM

    Chris Belfield's Avatar

    The azure functions being called in the script are not up to date with the
    latest version of powershell. Can you confirm this?

  5. Support Staff 5 Posted by Ilya Finkelshte... on 08 Apr, 2019 08:37 PM

    Ilya Finkelshteyn's Avatar

    Was not aware of that. Will do repro on clean machine with the latest Azure PowerShell and see. What specific cmdlet or command you see as outdated on your machine? What error do you see?

  6. 6 Posted by Chris Belfield on 09 Apr, 2019 08:22 AM

    Chris Belfield's Avatar

    I'm using the latest powershell build on ubuntu provided by Microsoft and
    the cmdlets don't exist.

  7. Support Staff 7 Posted by Ilya Finkelshte... on 09 Apr, 2019 08:58 AM

    Ilya Finkelshteyn's Avatar

    Did you install Azure Powershell module?

  8. 8 Posted by Chris Belfield on 09 Apr, 2019 09:11 AM

    Chris Belfield's Avatar
  9. 9 Posted by Chris Belfield on 09 Apr, 2019 09:27 AM

    Chris Belfield's Avatar

    [image: Screenshot from 2019-04-09 10-25-43.png]

  10. 10 Posted by Chris Belfield on 09 Apr, 2019 11:36 AM

    Chris Belfield's Avatar
  11. 11 Posted by Chris Belfield on 09 Apr, 2019 05:08 PM

    Chris Belfield's Avatar

    Hey Ilya,

    So it turns out that AzureRM is only supported on Windows desktop!

    Finally got somewhere and started deploying.

    I'm noticing my jobs queue up when there is no other jobs running? Is there
    a timeout I can adjust?
    [image: Screenshot from 2019-04-09 18-06-28.png]

  12. 12 Posted by Chris Belfield on 09 Apr, 2019 05:09 PM

    Chris Belfield's Avatar
  13. Support Staff 13 Posted by Ilya Finkelshte... on 09 Apr, 2019 05:44 PM

    Ilya Finkelshteyn's Avatar

    Starting is not Queued. Starting means you have enough parallel jobs in your plan and jobs are being started, which in this case means Azure VM based on your VHD is being created. It usually takes about 3-4 minutes to provision VM on Azure and being this time in Started state is expected.

  14. 14 Posted by Chris Belfield on 09 Apr, 2019 07:07 PM

    Chris Belfield's Avatar

    Yea I'm not seeing the VMs though 

  15. Support Staff 15 Posted by Ilya Finkelshte... on 09 Apr, 2019 07:09 PM

    Ilya Finkelshteyn's Avatar

    You mean you do not VMs in Azure Portal? Did build jobs started after Starting stage?

  16. 16 Posted by Chris Belfield on 10 Apr, 2019 11:57 AM

    Chris Belfield's Avatar

    Yea Ilya, basically when I start the job it seems to queue up, but does not
    deploy to Azure portal. It seems to be waiting for something and I'm
    getting no errors from Azure.

    I have the timeout set to 300 and for some reason it's timing out? But then
    some jobs start?

    [image: Screen Shot 2019-04-10 at 12.57.14 pm.png]

  17. Support Staff 17 Posted by Ilya Finkelshte... on 10 Apr, 2019 11:50 PM

    Ilya Finkelshteyn's Avatar

    Here is an error I see in internal traces:

    Error creating virtual machine: Operation results in exceeding quota limits of Core. Maximum allowed: 10, Current in use: 8, Additional requested: 8. Please read more about quota increase at https://aka.ms/ProdportalCRP/?#create/Microsoft.Support/Parameters/{"subId":"9e6b6d0c-2aab-420b-b113-cf391299db6e","pesId":"15621","supportTopicId":"32447243"}
    

    You might have too much builds already started, or a lot of them are in Starting state. Also what can happen is that builds just recently ended and AppVeyor immediately started deleting respective VMs, but they are still not deleted from Azure point of view.

    I would recommend that Azure VMs limit to be at least 50% greater than AppVeyor parallel jobs limit to avoid those edge cases.

  18. Support Staff 18 Posted by Ilya Finkelshte... on 10 Apr, 2019 11:53 PM

    Ilya Finkelshteyn's Avatar

    Sorry, updated: Azure VMs limit to be at least 50% greater than AppVeyor parallel jobs limit.

    You can check your account AppVeyor parallel jobs limit in your plan on the Billing page. Also you can set Max Jobs at project level (supported in both YAML and UI).

  19. Ilya Finkelshteyn closed this discussion on 11 Jun, 2019 09:01 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