Copying a TFS 2010 instance using Team Project Collection Cloning? - visual-studio-2010

We are looking to create a test TFS 2010 server based on our live instance.
One method which has been suggested is to clone the Team Project Collection (TPC) onto to another server - as detailed in this existing answer but I think there are a few additional steps?
In order to get the cloned TPC's GUID reset, I take it we would have to first reattach the cloned TPC in the admin console on the original server then detach, move and reattach on to test Server/TFS instance.
We are not running Sharepoint/WSS but would there be additional config work required on the test server with SSRS - in order for new projects to be created against the cloned TPC?
Are there additional using diffrent AD accounts for services or can all of that be resolved within the admin console on the new server?
Both servers will running on VMWare and on the same domain but different AD accounts would be used on the two servers to help prevent any unwanted interactions between the TFS instances.

I will recommended convert your TFS to virtual environment P2V using SCVMM, see this article,
http://mohamedradwan.wordpress.com/2011/06/23/converting-my-physical-domain-controller-to-a-virtual-machine-p2v/

Related

Azure continuous deployment from different VSTS account

I'm trying to setup continuous deployment via the Aure Portal.
When doing this via the VSTS account (let's call it "VSTS Account A") which is owned by the same account owner as Azure, everything works fine.
In this case I'm trying to configure continuous deploymenet from source code held in another VSTS account (let's go with Account B).
The Azure account owner is not the Account B owner but is an admin (member of Organization Administrators) for Account B. The owner is also listed explicitly as a member of at least one project within Account B.
The problem is that when it commes to configuring "Deployment source" within the app service section, Account B is not listed as an option to choose from.
I've followed various links (e.g. part 4 of this page) about linking the VSTS account with an Azure account but still no joy. There are a couple of problems here:
The Azure classic portal has a New button within the Visual Studio Team Services section but when I choose Link To Existing, I get the following message:
Make sure you’re the account owner. If you are, maybe your account is
linked to another Azure subscription or connected to another Azure
Active Directory
Account B is not linked to another Azure Subscription or Azure AD.
The new portal doesn't even have an option to attempt to link a different account, plus the menu link says "Team Services Account Preview" so whether the Preview status has something to do with it, I don't know.
I'd have thought this would be a relatively common use case, has anyone had any joy setting up something similar?
I was finally able to choose the relevant account by making the VSTS principal a co-admin in the Azure account which contains the web app, signing in as that user and changing the directory to use from the the user dropdown menu (top-right). Note, the user account in question is already an administrator for a different Azure account, just to complicate matters further. I only had the option to change the directory once the user was a member of multiple directories.
So I finally got it configured and committing code to the specified branch was triggering a deploy. However, it transpires that setting up continuous deployment from within Azure gives you limited scope and I got constant errors which were not straightforward to fix.
I ended up getting it working properly by following these instructions:
Build: https://www.visualstudio.com/en-us/docs/build/apps/aspnet/ci/build-aspnet-4
Deploy: https://www.visualstudio.com/en-us/docs/build/apps/cd/deploy-webdeploy-webapps
Configuring it all from within VSO gives you a lot more clarity about what's actually happening.
When doing the initial setup, I had to go through an authentication step with the Azure account I was trying to deploy to and that process launches a pop-up window which was getting blocked so I missed it at first.
The initial build and deploy were fine but I was getting a build error when being triggered from a code commmit. This is because the Build Definition --> Variables --> BuildConfiguration value was set back to Release even though I set it to the correct value for my project when doing the initial configuration. Once I updated that, the next commit triggered the build which in turn created the artifact which in turn triggered the deploy which went through fine.
Googler from the future here, I had the same problem and came across a really good article called "DevOps: Connecting VSTS to Azure by Ken Muse" enter link description here
This worked like a charm for me from the first try!

TFS Build failed - error TF214007

Since we had moved TFS Application Tier to a different server the TFS builds have stopped working. Whenever I try to start a build it fails with the following error:
TF215097: An error occurred while initializing a build for build
definition \My\Build: TF214007: No build was found with the URI
vstfs:///Build/Build/8320. Either the URI does not exist, or NT
AUTHORITY\NETWORK SERVICE does not have permission to access it.
The set up is following:
Server TFSAT contains the TFS Application Tier and a build controller. Server TFSBUILD contains a build agent and a build service running under NT AUTHORITY\NetworkService account. The build agent uses build controller on server TFSAT.
I have already triple-checked that the network service account TFSBUILD$ belongs to the team project collection's group Project Collection Build Service Accounts.
Also I have already tried to open the URL vstfs:///Build/Build/8320 on the server TFSBUILD which results in starting a Visual Studio instance and giving the error: The provided argument vstfs:///Build/Build/8320 must contain a query parameter named url which contains the full qualified URL to the Team Project Collection.
I have also tried to create a fresh new build and run this one - the same issue.
Has anyone got a clue what might be set up wrongly? I could not find any additional permission that should be granted to the build service account (standard network service account in my case).
Please notice that I am quite a newbie when it comes to setting up TFS. Thank you in advance for any hints.
First, please make sure you have followed the correct operation in Move Team Foundation Server from one environment to another.
To narrow down the issue you can:
Try to restart the build service on the build controller and
agent and queue another build.
Use another build account not NT AUTHORITY\NETWORK SERVICE and try
again.
If you still get the error, try to use below workaround: delete the old build control and agent. Create a new one. Note: you may have to edit all build definitions to point to the new control and agent.

How I can update the new code to my site in windows azure cloud?

I am new windows azure user. I have gotten selected for 90 days trial account and I am able to upload my ASP.NET MVC3 application to my account. My site is also running now. After I did publish my site, I added more model, views and controller to my proramme. Now I can not find a way to update my application. I can again publish my application but update option is not there. I want to update my new code only but the package option is creating full application. How I can update the new code to my site in windows azure cloud?
[Changed spelling]
With Windows Azure you can publish/update an application following ways:
Log into you Windows Azure account. Select you hosted server name and at the top panel you will see "Upgrade" option, when you will use this option you will be given a chance to select your CSPKG and CSCFG file from local file system or from Windows Azure storage. Once you selected new or updated CSPKG, your current running service will bee upgraded.
You can also use Windows Azure PowerShell Cmdlets to upgrade your current running hosted service using "Update-Deployment" command:
2.1 http://wappowershell.codeplex.com/
You can other 3rd party applications created using Windows Azure Service Management API to upgrade/manage your current running hosted service.
3.1 http://wapmmc.codeplex.com/
3.2 http://www.cerebrata.com/Products/CloudStorageStudio/Default.aspx
Note: With Visual Studio if you again publish your application, it will delete the current running hosted service and then create the new on so for update it is not the good one.
Finally based on your question about partial update, that is not supported. Even when you make a single line change in your code the deployment will be considered a full deployment even when the action is "update/upgrade". There is no diff package deployment so evertime you update your Windows Azure application, you will use the newly created CSPKG file and upgrade your hosted application.
Regarding partial update: If you have multiple Roles, you may choose to upgrade a single role (so that would be a partial update of the deployment). For a given Role, all code is redeployed. If you're running more than one instance, the update will be rolled out across groups of instances, not all instances at once.
For updates such as static content: if you move these into blob storage (a great place for css, jquery, images, etc.), then you may update this content by simply uploading new items to blob storage individually. These updates don't require any code to be rebuilt or redeployed.
If you're in dev mode (e.g. non-production), you may enable Web Deploy, which then allows very fast updates of your app to the running instance. This only works in single-instance mode, and it's great when doing frequent code+test cycles.

how do I use web deploy to deploy multiple sites on localhost with different ports

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

WindowsAzure: Remote Desktop, what can I do?

I'm connected to one of my WebRole instances. But what can I do now? I startet the Server Manager and navigated to Roles -> WebServer -> RD00123..., but what I see seems not to be the active instance. When I click on "Browse WebSite" I don't see the deployed site even I can't see or edit for instance the configured rewrite rules (defined in the web.config).
It's also funny that the inetpub is on systemdrive D (d:\inetpub\wwwroot) but the deployed (editable) files are on E (e:\approot). I'm wondering how this comes togehter.
Ok the things I want to know are:
How can I launch the unique instance version of the web role (I can't find an IP or port)?
How can I assume temporary debug changes in the web.config?
How can I restore the deployed version of the instance?
1) I don't believe you can. This is managed by the Azure Fabric controller. The most you can do is force an individual instance (the one you've RDP'd into) to reboot/restart.
2) Yes. But they won't be reverted unless the VM is recycled, so be prepared to back them out yourself. This is a good use of RDP
3) Not directly. Again, this is controlled by the Azure Fabric controller. But you could put the original bits you had back into the VM manually.
I'm not sure I understand the questions regarding server manager, but I can answer the question about where things live. The "base" Windows Azure VM image is the root drive where you see INetPub at. The application is deployed to a seperate VHD (thus its presence on another drive). If you request local storage, that will come from yet another virtual drive. This is just how the Azure Fabric manages the application deployments. Properly constructed, the roles of course won't care where things live.

Resources