Classic asp - How to automate deployment - in continuous integration environment
Asked Answered
D

3

8

I've been doing some reading http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html and https://michaelbaylon.wordpress.com/2011/04/13/managing-sql-scripts-and-continuous-integration/ ... etc on automated deployment and continuous integration etc but non of it seems to talk about automated deployment in a classic asp environment and you can't really do proper CI unless you get into automated deployment.

Can MSDeploy deploy a classic asp website? If not ... is it best to just write a build script that copies all the files over to the correct folder and then start up IIS? I've done this using msbuild and the robocopy msbuild extension task. But then how do you handle the different environments (QA, dev, staging, production) there's no web config to put the different connection strings etc ... supposedly msbuild is configuration aware ... but how does that work when there is no web config?

So with all these questions I'm struggling to really move forward with creating a deployment script / module / exe for our classic asp website. Does anyone have any answers / resources / further questions that they can point me in the direction of?

Duong answered 5/1, 2012 at 17:27 Comment(1)
The key part here that I can't seem to work through ... but I know people do it ... and I'm struggling to find documentation for is ... with an asp website how do I using a ms build script package it up for deployment to 1 of 3 environments on a button click or depending on provided parameter. The second thing is once I've got a build script going for an application and upon deploy I have some database tables or alters that need to occur ... these will only happen for this deployment ... not the next one ... because that is a different ticket ... how do I handle that?Duong
F
0

MSDEPLOY can deploy anything that can live in IIS. You can create a package from the existing web site, and examine it to see what got packaged. You should be able to use that to determine how to package up your site from sources.

You should even be able to create a Visual Studio project from your sources so that you can use the Web Publishing Pipeline directly. The fact that there is nothing there to compile shouldn't stop you from specifying that your .ASP files are content files.

Faustena answered 6/1, 2012 at 0:55 Comment(4)
As mentioned above I tried packaging up the existing website and none of the asp stuff was included. I don't know why though? Are you alos saying create an empty project in visual studio and add all the files to that project ... and then write a build script around that project? If so ... once again how do I create it so that it works with the different environments ... connection strings etc. And I don't understand how I would include a one time database change? What happens the next time we deploy ... is that still in the script? Do I need to change it every time for each ticket?Duong
You haven't said how you tried packaging the existing site. I'm saying that one way to do it would be to create the empty project. You won't need a build script. The normal Web Publishing Pipeline should "just work". I have not addressed database changes. I use Database Projects for that.Faustena
Sorry I haven't yet tried that yet, I will try creating a project when I get back to work on Monday. With the regular pipeline ... how do the web config transforms work with the deploy pipeline. I will need a build script because we will need to run automated tests etc before deployment. I guess i'm just not quite sure what I'm looking for or where to start with regarding to how to set up these parameters so that I choose where to deploy automatically ...Duong
The way I created the package to see if deploy would include asp items was I exported the web application from IIS.Duong
B
1

Web Deploy (http://www.iis.net/download/WebDeploy) is the way to go. You just have to customize the deployment script for different environments.

You might find this links helpful:
- http://msdn.microsoft.com/en-us/library/ms241740.aspx
- "Build" Classic ASP with TFS 2010

Burrussburry answered 6/1, 2012 at 2:36 Comment(1)
Thanks avakharia ... I read the links you provided but I didn't how I could find them helpful. I tried attaching my browser and inetinfo to my debug ... but I couldn't figure out how that really helped me work with the asp scripts inside visual studio? All I ever got was dissasembly of ntdll.dll. You and others including that video on download link indicate that msdeploy can deploy an asp website. I did what was suggested and tried to export the application to see what would've been packaged ... but none of the asp files were packaged ... so either I did something wrong or it's not supported?Duong
C
0

Checkout using cruisecontrol.net, we use that for our automated deploys along with msbuild and it works great. We are a .Net shop but it's basically the same thing. Cruise Control can run scripts and does handle the web.config / global.asa transformations pretty good. As long as you can script it cruise control could handle it.

Depending on your development environment you might be able to hook it into cruisecontrol. We use TFS and it integrates nicely so when we check items into our different branches (Dev, Main, Stage) it auto deploys the site to the appropriate location.

Deploying to our production environment we use MSbuild to move the code. Since it's in another network location we needed something that could go outside and do any server updates necessary.

http://cruisecontrol.sourceforge.net/

Cheapen answered 6/1, 2012 at 0:42 Comment(2)
Robert, our development team is currently using team city ... but once again even if we switched ... how would cruise control help with the different environments and one time database changes?Duong
cruise control is just the piece of software we use to kick off our build scripts. The nice thing with cruise control is you can write an type of script and it can run it with parameters and integrate it into your dev environment to see when an item is checked in it will run the deploy process against the branch. So we have 3 environments setup and when you check in to any one of them cruise control kicks off the deploy and sends an email with the completely status. You could setup a script to do your database deploys, we don't but have considered doing it.Cheapen
F
0

MSDEPLOY can deploy anything that can live in IIS. You can create a package from the existing web site, and examine it to see what got packaged. You should be able to use that to determine how to package up your site from sources.

You should even be able to create a Visual Studio project from your sources so that you can use the Web Publishing Pipeline directly. The fact that there is nothing there to compile shouldn't stop you from specifying that your .ASP files are content files.

Faustena answered 6/1, 2012 at 0:55 Comment(4)
As mentioned above I tried packaging up the existing website and none of the asp stuff was included. I don't know why though? Are you alos saying create an empty project in visual studio and add all the files to that project ... and then write a build script around that project? If so ... once again how do I create it so that it works with the different environments ... connection strings etc. And I don't understand how I would include a one time database change? What happens the next time we deploy ... is that still in the script? Do I need to change it every time for each ticket?Duong
You haven't said how you tried packaging the existing site. I'm saying that one way to do it would be to create the empty project. You won't need a build script. The normal Web Publishing Pipeline should "just work". I have not addressed database changes. I use Database Projects for that.Faustena
Sorry I haven't yet tried that yet, I will try creating a project when I get back to work on Monday. With the regular pipeline ... how do the web config transforms work with the deploy pipeline. I will need a build script because we will need to run automated tests etc before deployment. I guess i'm just not quite sure what I'm looking for or where to start with regarding to how to set up these parameters so that I choose where to deploy automatically ...Duong
The way I created the package to see if deploy would include asp items was I exported the web application from IIS.Duong

© 2022 - 2024 — McMap. All rights reserved.