locked
Readying for Web Application CI Build And Deployment.... RRS feed

  • Question

  • Hi all,

    It's time for me to get back to CI and build a Build Server to build and stage/deploy a web application.  I'm starting to research it a bit and found...

    http://www.asp.net/web-forms/overview/deployment/configuring-team-foundation-server-for-web-deployment/creating-a-build-definition-that-supports-deployment

    I also found a site that made is seem as easy as...

    "edit the build definition (you must be a TFS build Administrator) and navigate to the “Process” tab. There in the build process parameters section, find out the key named “MSBuild Arguments”. Enter the following configuration settings there in a single line separated by a single space:

    /p:DeployOnBuild=True

    /p:DeployTarget=MsDeployPublish

    /p:MSDeployPublishMethod=RemoteAgent

    /p:CreatePackageOnPublish=True

    /p:DeployIisAppPath="Default Web Site/MyBlog" 

    /p:MsDeployServiceUrl=kunal-chowdhury.com

    /p:username=kunal-chowdhury.com\Webmaster

    /p:password=MyPassword@1234"

    So, it seems there are various ways to do it.  This may digress to various topics, but the main thrust of things would be to build, deploy, and run a Selenium UI test suite.

    First, with deployment, how do I direct the deployment to a particular site on our QA Test Server?  Secondly, how do I fire off the Selenium test .dll to run after the site has been deployed/set up?  I now this is a bit off topic and will enter a second post if some feel that there is some Selenium knowledge that can be gained in this forum.

    As far as Selenium, I'm wondering if everything should be done on the Build Server - build, stage or deploy to the same machine, and run the Selenium tests.  Before this gets too broad I'll end it here.

    Hopefully someone can guide!

    As always, appreciated!!


    Thursday, August 20, 2015 11:53 PM

Answers

  • Hi,
    >First, with deployment, how do I direct the deployment to a particular site on our QA Test Server?  Secondly, how do I fire off the Selenium test .dll to run after the site has been deployed/set up?

    Thanks for posting here.

    Based on your description, I think Microsoft Release Management will help you do all these requirements. You can edit the deployment sequence and using the Configuration Variables to help you deploy a particular site on your QA test server.

    A good sample help you configure the release to deploy the web application better.  You can tokenize your deployment. You can define some tokens in some files of the project (e.g in web.config) that will be overwritten by the values defined in the release template. For example, we will change the server IP and the database connection for different environments.

    http://vgaltes.com/index.php/2013/12/23/microsoft-release-management-part-3-configuring-the-release/


    And you can run Selenium test from Release Management, the article in link below can help you step by step to do with Selenium.

    Executing Selenium UI Tests from Release Management
    http://incyclesoftware.com/2014/02/executing-selenium-ui-tests-release-management/


    Hope this is helpful for you.
    Best Regards,

    May


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Sunday, August 23, 2015 9:21 AM
    Moderator
  • Hi

    I have a soup-to-nuts blog post series here that explains the whole process of implementing a continuous delivery pipeline with TFS and Release Management. I even show how to write web tests using Selenium and run them from Release Management in conjunction with Tcm.exe and a Microsoft Test Manager test plan:).

    Cheers - Graham


    Blog: http://pleasereleaseme.net   LinkedIn:

    Thursday, August 27, 2015 6:06 PM

All replies

  • Hi,
    >First, with deployment, how do I direct the deployment to a particular site on our QA Test Server?  Secondly, how do I fire off the Selenium test .dll to run after the site has been deployed/set up?

    Thanks for posting here.

    Based on your description, I think Microsoft Release Management will help you do all these requirements. You can edit the deployment sequence and using the Configuration Variables to help you deploy a particular site on your QA test server.

    A good sample help you configure the release to deploy the web application better.  You can tokenize your deployment. You can define some tokens in some files of the project (e.g in web.config) that will be overwritten by the values defined in the release template. For example, we will change the server IP and the database connection for different environments.

    http://vgaltes.com/index.php/2013/12/23/microsoft-release-management-part-3-configuring-the-release/


    And you can run Selenium test from Release Management, the article in link below can help you step by step to do with Selenium.

    Executing Selenium UI Tests from Release Management
    http://incyclesoftware.com/2014/02/executing-selenium-ui-tests-release-management/


    Hope this is helpful for you.
    Best Regards,

    May


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Sunday, August 23, 2015 9:21 AM
    Moderator
  • So what is Release Management as it relates to TFS and using the Build Service/Build Server/Build Agent/Build definition?  Is it a different application.  Is it something for which its use requires modification of the build template?

    The way it sounds is I should get my Build Server up and running to get the Web Application built.  Then, Release management will take over to push the web apps to the target test server and possibly run the UI tests. ??  Is that about right?

    The other issue I see creeping in is that our web applications will be constructed as follows...

    OurSite

    WebApp1

    WebApp2.

    What I've seen from the deployment flags in TFS build is something like Default Web Site/WebApp.  I'm wondering if I can configure our two web apps in one build definition.  Or are you saying this too could be handled through Release Management?

    Thanks for the response and hope to hear more soon :D !

    Monday, August 24, 2015 1:30 AM
  • Hi,

    Thanks for your feedback.

    Release Management provides a continuous deployment solution that makes release cycles repeatable, visible, and more efficient by automating deployments through every environment from test to production. It can integrate with Team Foundation Server, Visual Studio Online, or Chef. Use a rich catalog of out-of-the-box tasks, or plug in your custom PowerShell scripts.

    More feature about Release Management, you can refer to here.

    >The way it sounds is I should get my Build Server up and running to get the Web Application built.  Then, Release management will take over to push the web apps to the target test server and possibly run the UI tests. ??  Is that about right?

    Yes, generally it is like that. Automate release is just its one feature.

    >What I've seen from the deployment flags in TFS build is something like Default Web Site/WebApp.  I'm wondering if I can configure our two web apps in one build definition.  Or are you saying this too could be handled through Release Management?

    If the two web apps are in one solution, I think you can configure them in one build definition. And combine TFS with Release Management, you can create and configure the component to deploy.

    May


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 24, 2015 9:08 AM
    Moderator
  • Is there another forum that specifically deals with Microsoft Release Management?  I don't want to bog down in this here if it is not the proper place.  I've done a very quick, high level scan of this technology and have some questions surrounding the RM Server, can it be on the same machine as the TFS Build Server.  Should it be separate, etc.?
    Tuesday, August 25, 2015 1:24 PM
  • Hi,

    I help you move the thread to TFS Build and Release Management forum which aims to discuss and ask questions about Team Foundation Build and release management tools.

    >I've done a very quick, high level scan of this technology and have some questions surrounding the RM Server, can it be on the same machine as the TFS Build Server.  Should it be separate, etc.?

    You can install RM server on the same machine as TFS server. However, if you plan to load balance your TFS servers or if your TFS server gets enough load, then you may want to choose a separate server.

    When you start to use RM, you can follow three steps to start a release.

     

    1. Set up the release management server, client, and deployment agents.

    2. Set up users and groups and control access to Release Management.

    3. Create your release path and start a release.

    If you have other questions about this issue, please feel free to let me know.

    May


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, August 26, 2015 3:11 AM
    Moderator
  • Hi

    I have a soup-to-nuts blog post series here that explains the whole process of implementing a continuous delivery pipeline with TFS and Release Management. I even show how to write web tests using Selenium and run them from Release Management in conjunction with Tcm.exe and a Microsoft Test Manager test plan:).

    Cheers - Graham


    Blog: http://pleasereleaseme.net   LinkedIn:

    Thursday, August 27, 2015 6:06 PM
  • Thanks Graham!  This looks like it might be just what I was looking for.  I'm at the point of creating the Build Definition to test at least that part of the process. 

    Currently, my infrastructure consists of our company TFS Server (application tier), a separate Build Server, and an additional QA Server where I hope to run the automated Selenium UI tests.  I hope this is good enough for a small scale environment.  I think you make mention of a third QA machine for 'hands-on' testing.  I was hoping to use just the QA server I have currently, but now that I think about it, I should probably have that additional testing machine.  The current QA machine (for automated tests) will probably have to be the target of a deployment, run tests, then restore the testing database for the next CI build sequence.

    When I looked into CI in the past, I remember being able to change the dump or output folder, etc.  From above, I'm also wondering about the IIS path deployment parameter mentioned above.  Hopefully you cover that in your series and I've yet to see it, but should I be deploying this from the Build Definition or will Release Management take over after the successful build?

    I look forward to reading the rest of your series and thanks for sharing it!!

    Oh, and I'm currently in a holding pattern with my Build Server as I created it by installing the 2015 Build Service, but our TFS app tier is 2013.  I think you can run Build Servers that are a lesser version from the app tier, but not the other way around, correct?

    • Edited by NitLions Friday, August 28, 2015 1:54 AM
    Friday, August 28, 2015 1:52 AM
  • Hi

    Very quickly, you build to a drop folder that you share as a UNC with the correct permissions for the RM accounts you are using. Crucially, the build has all of its environment configuration tokenised. RM then takes over, and stage by stage in sequence copies the build to the next stage (replacing tokenised config with actual values for that stage) and deploys all the bits, runs tests etc - whatever you need. My blog post series deploys a web app so you should be able to find all the details. Post back if you need any clarifications!

    You'll need to use XAML builds which are available with TFS 2015 - my blog post here has some details that might be useful. Not sure though if you can use TFS 2015 builds with TFS 2013 - let us know!

    Cheers - Graham


    Blog: http://pleasereleaseme.net   LinkedIn:

    Friday, August 28, 2015 6:37 AM
  • So I started looking closer at TFS 2015 since its become available and it seems they've created a new, "simpler" build system in that version.  Before researching I installed the Build Servers on what I hope to be my Build Server.  When I start the TFS Admin Console, the only Build item I see for collection is XAML Build Configuration.  I have the following apparently configured...

    Controller

    Build Agents (4 - the install default).

    Is this the old build type setup or can this machine as configured still be used within the confines of the 'new' build system offered in TFS.  While looking into the new build I've seen topics such as Agent Pools, etc.  I'm thinking I can create the Agent Pool and just point to the current Agent as configured.

    My first aim is just to get the solution built and the files deployed properly.  I'll deal with firing tests later.

    Sunday, September 13, 2015 9:06 PM
  • Hi

    If you previously had old-style build agents set up for TFS 2013 then on upgrading these will be ready for configuring as XAML build agents in TFS 2015. Then, any XAML build definitions will continue to run as before. The new build system is configured separately.

    HTH

    Cheers - Graham


    Blog: http://pleasereleaseme.net   LinkedIn:

    Monday, September 14, 2015 4:37 AM