I have a solution which have three applications
a. One web application
b. Two web services
I want to host
applicaton on One website A
and services on Another website B
When I am trying to host build using automatic build deployment in TFS, I am getting only one web service. Can anybody tell me how to host these 3 applications.
Following is the build arguments which I am using in build definition
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=WMSVC /p:Configuration=Dev /p:MSDeployServiceUrl="https://X.X.X.X:8172/MsDeploy.axd" /p:DeployIisAppPath="Default Web Site/SampleApplicaion" /p:UserName="username" /p:Password="password" /p:AllowUntrustedCertificate=True
Thanks,
Ashwani
In your arguments you are specifying that all deploys should go to "Default Web Site/SampleApplicaion". The command arguments will override any values you have set in your project configuration and so all apps will be deployed to this IIS website.
Instead you need to set the IIS site in the configuration settings of your project. Then you can specify Website A and B and that setting will be used when running your build.
Related
I am having 3 “Deploy a Release” steps in a Octopus project. I need to deploy each steps in a different Azure WebApp. How can achieve the this.
For example I have an octopus project named ‘Fruit’, and I have 3 steps in the project, each one to “Deploy a Release”
Step 1: Apple - To be deployed on an Azure Web-app ‘Alpha’ in Dev Environment.
Step 2: Orange - To be deployed on an Azure Web-app ‘Bravo’ in Dev Environment.
Step 3: Mango - To be deployed on an Azure Web-app ‘Charlie’ in Dev Environment.
All the azure web apps are under the same account. Kindly help.
Assuming that you will be having separate package feeds (alpha package,...) for each steps, you should be able to achieve deployment to each web app in same environment by using variables scoped to each specific step.
variable scoping
I am trying to do a PoC on how to achieve continuous integration and deployment using VSTS.
I have been successful in the build process i.e. from VSTS it will pull the code (asp.net based application) and build. The build process is also getting successful.
Now after the build is done I want to deploy the application and run my maven based selenium test cases written in java on the application. This is the part where I am struck. As in the deployment step it is not able to put the artifacts to the remote path that I am mentioning.
Can anyone please provide me some pointers on how to achieve the deployment on a remote machine and then run the java based test cases on this application?
Any pointers would be greatly appreciated.
Ok..here is the complete scenario...
1. I have the asp.net code on cloud in my vsts
2. I have been able to add a build step and create the artifacts successfully
3. Now I have a IIS server where i want to deploy these artifacts, and the server is not accessible from the public network and is behind a firewall.
Hence I am looking for any task that would help me achieve this. I am not sure of the complications that might arise due to the firewall and hence am trying out different methods to understand the complete big picture.
I received a reply here to use the Win RM tasks. I used that but it is giving a 53 error and not able to connect to the server that I am trying to deploy the code on.
To deploy asp.net based application, you can use IIS Web App Deployment step/task to deploy to your server or deploy to azure web site by using Azure App Service Deploy step/task.
To do Java test, there is a Maven step/task.
I'm currently running a web solution , that a deployed to multiple azure cloud web roles , the only difference for each web role is web.config , though I'm trying to automatize the process. I'm using now azure powershell + console application to write web.config before each deploy for a specific webrole. Is there any better way to do this ? Does teamcity or any other tools can achieve this ?
Looks like it is possible for every CI server, not only TeamCity.
Fastest (but not cleanest) way would be to create as many build configurations, as you have web roles, implement web.config transform for it, and let MSBuild do it's magic further by deploying your application, running different build configurations.
I am using webdeploy to automatically deploy a application on a testserver via teamcity. Now once all test scripts are run I want to deploy it on Live servers. I have installed a web farm on server1(controller) and I have 2 other servers server2(primary) and server3(secondary) as web farm agents setup. Now how can I copy the publish done on testserver to my live sites on server2 and server3 and it do the load balancing. can any one please explain how I can Accomplish this task automatically using teamcity. or I am going the wrong way.
Please guide.
I would make a different job, that deploys to the production, that way you control when it deploys, but that depends on what it is, and how much.
If you are building a package with /t:package you can make it available through artifacts, and use msdeploy -verb:sync -source:package="Path to package" -dest:auto.
In my "deploy to production" job I have this step, as a command line step:
"c:\Program Files\IIS\Microsoft Web Deploy V2\msdeploy.exe" -verb:sync -source:package="%env.deployPackagePath%" -dest:auto,includeAcls=False,wmsvc="%env.msdeploy.serviceurl%?site=%env.msdeploy.Sitename%",userName="%env.msdeploy.username%",password="%env.msdeploy.password%",authType=basic -allowUntrusted -setParam:name="IIS Web Application Name",value="%env.msdeploy.Sitename%"
I'd recommend looking into the Web Farm Framework, which supports deploying to multiple servers and even removing them from (supported) load balancers.
I have a solution that contains multiple integration test projects and one web application project. each integration project connects to the web application when running the tests. I would like for each test project to access the website with its own database connection. I have been trying to use the web deploy functionality built into visual studio. However I have been unable to figure out what I need to add to either the deployment package that is created and/or the post build event for the test projects to declare the binding port for the website when deployed. For example, I want integration project A to create and access the website located at http://localhost:83 and integration project B to create and access the website located at http://localhost:82. Could someone please explain:
Is there anything I need to do the deployment package ?
What do I need to add to my post-build events for my integration projects when deploying the package, so that the website is created at the correct port when building the project?
Update:
I'm wanting to deploy the same site to two different locations on my machine so that I can run both sets of integration tests at the same time.
Update 2:
I have researched the web deploy tool and it allows you to specify parameters that modify what is deployed when you call it from the command line. However I have found the documentation very confusing. http://technet.microsoft.com/en-us/library/dd568968(WS.10).aspx
Update 3:
I expect these to be two different websites, each pointing to there own database. If possible I would like a single package that can be deployed using msdeploy. Which will then be called in a post build event from each of the integration test projects. I would like to specify the connection string and deployment location from the post build script of the integration project.
you can try with webdev.server included in visual studio. VisualStudio use this for start a webserver when you debug. With this you can start a webserver in the desire port (if the port is not used currently).
I made a bat file for change some options.
check it.
::Begin of bat file
cd C:\Program Files\Common Files\microsoft shared\DevServer\10.0\
WebDev.WebServer40.exe /port:80 /path:"C:\PATHTOYOURWEBPROJECT" /vpath:"/NAMEOFYOURWEBPROJECT"
::End of bat file
You can acces in: http://localhost:80
I use the webserver40, but if you don't have net.4 or vs2010 you can try to find webserver[ xx version].exe
I hope that this will be helpful, and sorry for my broken english.
First off, you're approaching this the wrong way.
> I would like for each test project to access the website with its
own database connection.
Who is creating the DB connection? Your web site or the test project? For rest of your question to make sense, I presume its the web site (otherwise, Project A and Project B cannot share a connection out of the box).
If your website is making the connection, unless you're caching or having a static connection, there will be a new connection made as each request runs your your site on a new thread. Another simpler alternative is to take a query param and initiate a new connection based on that. If you seed it off the caller, you can also use it for more detailed logging.
Web Deployment projects are meant for deploying to integration servers, so that means you cannot access them by http://localhost... but the full FQDN of the server.
Most importantly, http://localhost:82/myApp and http://localhost:83/myApp are two different sites (unless you redirect from one of them to another one which in itself can cause additional issues) running the same codebase.
Having said that, you would then need to deploy your website twice and then all you need is to change the config/settings entry in Project A and B to point to these to different sites.
Hope this makes sense.
You can define virtual host configuration.
Refer this guide for more information.
http://docs.jboss.org/jbossas/guides/webguide/r2/en/html/ch07.html