none
MTM + Azure DevFabric/DevStorage RRS feed

  • Question

  • Is anyone deploying azure applications to the devfabric/devstore in a lab environment and performing test runs through MTM against them?

     

    I'm looking for some docs describing the process... I've got it down to the point where I can get the app deployed in the environment and the test will begin to 'run' but the deployed application crashes on startup in the devfabric.

     

    - I've copied the build output to the VM (deploying from network locations seems to be a problem?)

    - I've marked the relevant deployment items as not readonly (I don't have a link, but I recall reading that it's a problem)

    - I've updated the physicalDirectory in the RoleModel.xml file(s) to the correct path on the VM

     

    So yes, if anyone knows of a set of docs or anything describing a successful scenario for configuring MTM/Lab Center/Local Azure Fabric/Storage I'd greatly appeciate it.

    Wednesday, July 13, 2011 5:54 PM

Answers

  • Thanks for the tip Anuj. I did end up getting it work late last night. What I did (for anyone else who sees this as well) was like this (refactored and extraneous details omitted for brevity):

     

    var csxFolder = Path.Combine(Environment.CurrentDirectory, "ProjectName.csx");
    var cscfgFile = Path.Combine(Environment.CurrentDirectory, "ServiceConfiguration.cscfg");
    
    DevStore storage = new DevStore();
    DevFabric fabric = new DevFabric();
    
    storage.EnsureRunning(0);
    fabric.EnsureDeveloperFabricRunning();
    
    Deployment deployment = fabric.CreateDeployment(csxFolder, cscfgFile, /*some timeout*/);
    deployment.WaitForState(RoleInstance.Created, /*some timeout*/);
    deployment.Start();
    deployment.WaitForState(RoleInstance.Started, /*some timeout*/);
    

    I call this in either TestInitialize, or ClassInitialize. Note: The timeouts in my case, because my VMs are a bit slow, need to be long (2 mins).

    • Marked as answer by snorfys Friday, July 15, 2011 6:54 PM
    Friday, July 15, 2011 6:54 PM

All replies

  • I remember doing this and the issue which I faced was the deployment script needed to be run as an administrator. The best way I found was to create a scheduled task which runs with highest priviledges and point it to the deployment script path. On every new build, replace the deployment script and then execute the scheduled task.

    Thanks,

    Anuj


    http://www.anujchaudhary.com/
    Thursday, July 14, 2011 6:06 AM
  • Thanks for the tip Anuj. I did end up getting it work late last night. What I did (for anyone else who sees this as well) was like this (refactored and extraneous details omitted for brevity):

     

    var csxFolder = Path.Combine(Environment.CurrentDirectory, "ProjectName.csx");
    var cscfgFile = Path.Combine(Environment.CurrentDirectory, "ServiceConfiguration.cscfg");
    
    DevStore storage = new DevStore();
    DevFabric fabric = new DevFabric();
    
    storage.EnsureRunning(0);
    fabric.EnsureDeveloperFabricRunning();
    
    Deployment deployment = fabric.CreateDeployment(csxFolder, cscfgFile, /*some timeout*/);
    deployment.WaitForState(RoleInstance.Created, /*some timeout*/);
    deployment.Start();
    deployment.WaitForState(RoleInstance.Started, /*some timeout*/);
    

    I call this in either TestInitialize, or ClassInitialize. Note: The timeouts in my case, because my VMs are a bit slow, need to be long (2 mins).

    • Marked as answer by snorfys Friday, July 15, 2011 6:54 PM
    Friday, July 15, 2011 6:54 PM