none
Deploying code with Azure Resource Manager RRS feed

  • General discussion

  • In the Azure SDK 2.6, the Azure Resource Manager Tools in Visual Studio separate the steps of provisioning resources and deploying application code by default.  Azure Resource Manager supports doing both at the same time and you can manually configure an Azure Resource Manager project (deployproj) to deploy or publish your code during provisioning, it's just not the default path.

    The question I have for discussion is:  “Do you deploy/publish your application code during provisioning?  Why or why not?”  And then how would better tooling help here…  Realizing there are different needs in different parts of the lifecycle, how do you do it?

    Thanks,

    Brian

    Wednesday, April 29, 2015 9:18 PM

All replies

  • Brian,

    I see us provisioning the environment and deploying the application together initially during dev/test and prod.  Dev/test will likely have the environment blown away and rebuilt with the application several times as the environment configuration is adjusted.  That could but likely will not happen as much for production.  In production, the application will be much more likely to be updated by itself.

    Monday, May 11, 2015 9:23 PM
  • Thanks Steve... quick question, in your case, is this part of an automated build process?
    Tuesday, May 12, 2015 5:04 PM
  • I don't expect it will be part of a fully automated build process (as continuous integration) for what I am working on now.  I don't think the scale justifies it at this point at the environment level.

    I could think of a case where a build would act like a composite PowerShell DSC resource and provision the environment and the application if environment has changed and the application only if only the application has changed.  I may see a justification to do this in a future project--not worried about it today.

    Tuesday, May 12, 2015 5:24 PM
  • Hi Brian,

    I'd like to have more integration between ARM and DSC.

    There should be a way to build DSC resources in the same ARM project, and deploy both to Azure in a consistent experience.

    Thanks

    Saturday, May 16, 2015 3:31 PM
  • Just so I'm clear - do you mean something like:

    1) I have the raw DSC ps1 file in the ARM project

    2) during build/deployment, that PS1 file is compiled to MOF and deployed along with the json template?

    Is that what you're thinking?

    Thanks,

    Brian

    Monday, May 18, 2015 3:12 PM
  • Yes. All for that!
    Friday, August 21, 2015 2:26 PM
  • Jason, thanks for the feedback... we have a release coming soon that will make it easy to do steps 1 & 2 for a single vm dsc deployment.  If you don't see something in a week or so, lmk and I'll direct you.  I'd love to have your feedback on it.

    Friday, August 21, 2015 4:08 PM
  • In Visual Studio 2015 the Deploy to Resource Group dialog has a link at the bottom 'How do I deploy project artifacts with an Azure deployment template?' to this page.

    I found that this page provided no help at all in the question.

    For anyone looking for information on publishing a web application from a resource group deployment check this blog post I out that I found 

    http://blogs.technet.com/b/georgewallace/archive/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups.aspx

    Friday, September 11, 2015 3:36 AM
  • Same comment, the link from Visual Studio help shouldn't bring us here.

    williamg

    Tuesday, December 15, 2015 7:03 PM
  • What's your scenario?  What would you like to see?
    Tuesday, December 15, 2015 7:05 PM
  • Hi Brian,

    I'm a CSA at MS, I'm going to show a customer how he can get Umbraco on Azure PaaS. I'm creating a Git repo for him so that he can just pull the code in and play. They have limited Azure experience - let alone on ARM - so I added a resources project that sets up the web app + DB from the baked in template.

    I would love for him to pull in the sources - right click 'deploy' on the resources project - let him log in to his azure account - create new RG and boom: provision his web app + db server + db + alerting rules + firewall rules for db and all the goodness.

    After that - he just needs to configure publish for the webapp and he's off and maybe some connection strings ( but that's all familiar / done through wizards ).
    Now I'm going to have to write some powershell for him - right? It's 3 lines probably, but it would be nice not having to leave Visual Studio.


    Friday, February 26, 2016 2:50 PM
  • Jochen, thanks for the feedback... just to make sure I understand, is the scenario along the line of this:

    https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-resource-groups-deployment-projects-create-deploy/

    Or did you envision a different workflow?

    Friday, February 26, 2016 9:25 PM
  • Hi guys,

    I see you all managed to solve the issues using Web App resource in DSC.

    We need to create a Windows Virtual Machine where we can deploy a web app. Why we need to do this in a VM, because we need Windows Authentication.

    We tried different scenarious on how to do all this usind DSC and VMs but could manage to pull it off. 

    Can you please help us??

    Would be much appreciated!

    Monday, February 29, 2016 4:10 PM
  • Ovidiu - do you want to use a DSC script to:

    1) Install IIS with Windows Authentication

    2) install WebDeploy

    3) Deploy a webdeploy package?

    All of those in one script?

    That Azure Resource Group project in VS has a DSC script that will do #1 and #2.  #3 is possible but I think you need a script resource for that, I haven't found a WebDeploy resource in DSC.

    Let me know...

    Monday, February 29, 2016 6:16 PM
  • Hi Brian,

    First of all, thank you for your quick response!

    Just to summarize what we did so far:

    We first started with the classic portal, created Cloud Services into a Virtual Network with a Site-to-Site connection to an on-premise Network. Each VM from cloud service(VM) had a startup script that changed the machine domain and enabled Windows Authentication.

    In the new portal, beacause of the Resource Groups (which we would like to use), we can't use cloud services anymore.

    We investigated and found out that the best solution for what we need is redoing everything we did in the classic portal in the new one with ARM templates (JSON) and PowerShell DSC Extensions.

    Now when we deploy a VM, we would like to have all of the above addded and also a web application(our own) hosted in the VM.

    If you could guide us with this, you would be of tremendous help!

    Also, if we didn't chose the right path in the new portal, please let me know, we're kinda stuck here.

    Tuesday, March 1, 2016 9:13 AM
  • Hi Brian,

    We managed to create the infrastructure we need in the AzureResourceGroup project in the JSON, SQL Server with Databases, VMs with NICs and Public IPs, everything is working fine.

    The only thing we need is to host the desired web apps in the VMs and to restore backups in the Databases.

    Can this be done in the JSON file as well (host web apps in the VMs and restore backups in the Databases)?

    Wednesday, March 2, 2016 2:21 PM
  • re: VMs in lieu of Cloud Services, there's nothing wrong with that approach, using VM ScaleSets may give you more of the Cloud Service behavior (e.g. autoscale), so that may be something to look into.

    re: webapps on the VM, you can do this via the in-guest customization - via DSC or custom scripts. Using a either approach you can use PowerShell to do any necessary configuration on the VM (install IIS, copy files, etc)

    re: SQL - if you're using SQL Azure, there is an import extension on the database resource that will allow you to import a bacpac during deployment.  If you're running SQL on the VM, you would use the DSC/Custom Script approach.

    That help?

    Wednesday, March 2, 2016 8:55 PM
  • I was able to import in SQL Azure a bacpac during deployment. That worked.

    One issue would be is that i create the container where I store the bacpacs manually.

    Is there a way in the ARM template, when you create the storage account to create a container also?

    I found this and was wondering if this is possible now: https://feedback.azure.com/forums/281804-azure-resource-manager/suggestions/9306108-let-me-define-preconfigured-blob-containers-table

    Ovidiu

    Thursday, March 3, 2016 4:18 PM
  • Unfortunately no, you still can't create containers via a template deployment.
    Thursday, March 3, 2016 8:23 PM
  • Ovidiu - can you start a new thread and post the link back here - I will loop some more folks to have a look.
    Tuesday, March 15, 2016 2:37 PM
  • Yes, you are right.

    We're getting further from the main subject.

    I would add the link to the new discussion but my account isn't verified.. it's called:

    "Azure ARM SQL Database Import - user with the same password in master or target server issue"

    I will delete my last post here.

    Thursday, March 17, 2016 8:20 AM
  • We are currently building for a customer an environment which will do the infrastructure deployment by means of release manager. This way the infrastructure will be part of the deployment of the solution. We are currently looking in splitting the ARM templates in in chunks which would than reflect/control our component design (components would be storage, vms, networks, nsg's, vmroles/dsc-settings, etc). For this we also would like to have more integration with ARM and DSC.

    Regards

    Friday, March 18, 2016 3:23 PM
  • Marco - I'm interested in hearing more about how you're leveraging DSC in ARM, if you're up for it I'd love to talk to you offline.  email me if interested (bmoore at microsoft.com)

    Monday, March 21, 2016 5:22 PM