::   DT Imago   ::   DT Application Lifecycle Management   ::   Amplify   ::  
dunstan thomas dtalm header

Upgrading TFS 2008 to 2010 and run in parallel run on single SQL Server

September 15th, 2011

Introduction

The Team Foundation Server 2010 upgrade wizard and its documentation are sufficient for many differing upgrade scenarios and configurations. The standard upgrade paths are applicable in almost all cases where there is no limit on hardware resource and the aim is upgrade/replace rather than parallel running. During a recent in house upgrade where hardware resource was tight and the user requirements for the upgrade included minimal downtime and a parallel running phase the standard paths were a bad fit. This newsletter documents the way these limitations were tackled and brings together several elements that were required to complete this type of upgrade. It includes details of the procedure to move Team Foundation Server databases from one server to another and reconnect the application-tier and specifics on running both 2008 and 2010 using shared SQL database and SharePoint servers.

This information found here is not meant to be a detailed overview of Team Foundation Server upgrade process as a whole and some knowledge of the technical architecture of both Team Foundation Server 2008 and 2010 is assumed. The main focus of this article is to cover the specific scenario encountered during the subject upgrade and collect together the information required for anyone that may attempt this type of upgrade in the future.

Upgrading TFS 2008 to 2010 and run in parallel run on single SQL Server

We recently needed to upgrade our 2008 implementation of Team Foundation Server to 2010. Normally this would follow one of two standard patterns covered by the Microsoft upgrade documentation, either an in place upgrade or a migration upgrade.  But due to lack of hardware resource the eventual solution would be a mix of both options with a few undocumented steps thrown in.

In-Place upgrade

An in place upgrade involves upgrade Team Foundation Server on the same hardware that was running the earlier version.  This path requires the un-installation of old version, followed by the install of 2010. The upgrade wizard is then run. Post upgrade (if all goes well) you have a shiny new Team Foundation Server 2010 installation with new upgraded databases and your old Team Foundation Server 2008 implementation is no longer accessible.

Migration upgrade

You can also perform a migration upgrade by copying your data to different hardware running SQL server.  Then installing Team Foundation Server 2010 and running the upgrade wizard. By using separate hardware in this way you have the opportunity to parallel run both versions for a while to allow confirmation that the upgrade was successful before turning off the 2008 server.

Upgrade Requirements

The main requirements for live operations during the proposed upgrade were as follows;

  1. The new 2010 must have the same architecture as the existing system.  Separate data tier and an application tier servers.
  2. The live Team Foundation Server 2008 server must remain available throughout the upgrade.
  3. A period of at least two weeks parallel running is required to allow for any post upgrade migration from 2008 to 2010.
  4. Both 2008 and 2010 must run from a single SQL Server instance.
  5. The switch from 2008 to 2010 must be as seamless as possible.

Initially this looks like a migration upgrade as these requirements immediately rule out the first option of an ‘In-Place upgrade’. Mainly because 2008 must remain available throughout the process and post upgrade for a parallel run period. That leaves the ‘Migration upgrade’ option but the main requirement for that path, is separate hardware for the new servers. As this resource was not available a third solution was required to allow the upgrade to continue. The main problem posed by the requirements was the need to use the existing SQL server for 2010 as well as the already running 2008. The interesting part then was not going to be the actual upgrade but attempting to get both 2008 and 2010 running on the same database server in parallel. This configuration is not covered in any installation or upgrade documentation I have come across and extensive Googling came up with no real help or guidance. Before describing the solution that was used an understanding of both the existing and target production environments is required.

Existing Team Foundation Server Environment

A description of the Team Foundation Server 2008 implementation that existed prior to the upgrade taking place. The Team Foundation Server application tier is hosted by the (WAGNER). The data-tier and databases for Report Server and SharePoint are hosted by (BACH). The TFS 2008 build service is hosted by (BIZET). All Team Foundation Server SharePoint project portals are hosted on (TOCH) under MOSS 2007.

Microsoft TFS Upgrade

 

Proposed upgrade environment

In order to keep 2008 up and running and unaffected, the upgrade would have to take place in isolation so the following solution was proposed. Create three virtual machines one for the data-tier one for the application tier and another for the build server. The data-tier would only be temporary and used to host the 2008 databases for the upgrade only and then thrown away. The application-tier and build VM’s would eventually become production servers hosting the 2010 services. The virtual upgrade environment is shown below. Eventually the upgraded databases will be moved from the temporary server (DYSON) to the existing live data-tier (BACH) and the new application tier (TIPPET) will be re-pointed to the live data-tier server (BACH).

Proposed TFS Upgrade Environment

Target Team Foundation Server Environment

The diagram below shows the production environment hosting both Team Foundation Server 2008 (blue circle) and Team Foundation Server 2010 (green circle). Both TOCH the SharePoint server and BACH the database server are shared between 2008 and 2010. Note the addition to the existing live environment of the two virtual machines TIPPET and BINGEN.  

Team Foundation Server Environment

The Upgrade

The actual upgrade run in the VM environment went without any problems. The databases were exported from BACH overnight and imported onto the temporary server DYSON. Team Foundation Server 2010 was installed on TIPPET along with SQL Server reporting services. The Team Foundation Server 2010 upgrade wizard was run against the databases on DYSON which resulted in a fresh set of 2010 databases. At this point we now have two sets of databases, the 2008 versions of the databases in use on the live server and the new 2010 databases ready for export/import.

The structure of the database in Team Foundation Server 2010 has been completely reworked due to the introduction of the Team Project Collection database type. Effectively, the Team Project Collection database now encompasses all of the data held in the 2008 databases with the exception of ‘TfsWarehouse’. This allows this multiple Team Project Collection’s to be hosted on the same server. The two sets of databases can be seen below side by side, these lists do not include databases used by SQL Report Server or SharePoint.

TFS 2008 Databases (BACH) TFS 2010 Databases (DYSON)
TfsActivityLogging Tfs_Configuration
TfsBuild Tfs_DefaultCollection
TfsIntegration Tfs_Warehouse
TfsVersionControl  
TfsWarehouse  
TfsWorkItemTracking  
TfsWorkItemTrackingAttachments  
   
TFS 2008 Analysis Database TFS 2010 Analysis Database
TfsAnalysis Tfs_Analysis

 Note the addition of the underscore character in the 2010 databases, this is important as the database names must not clash when hosted on the same server. Check there are no clashes with your database names at this point.

Moving the upgraded databases

Now comes the tricky part! Once the TFS 2010 upgrade is complete the upgraded databases need to be moved from the temporary database server DYSON to the production server BACH. This needed to be done with care as BACH also hosts the TFS 2008 databases and these must be available throughout the upgrade process and post upgrade for a period of parallel running.

An existing MSDN article covers the processes of moving the databases. However, the described move is to a new server instance and not an existing instance that already hosts another version of TFS. The steps below include a summary of the information on MSDN and extra or modified steps to allow the co-existence of the databases for both 2008 and 2010 on the same instance.  

(1) Stop TFS 2010 Services

These commands need to be run on the 2010 application tier.

  1. Start a command prompt on app tier
  2. cd “%programfiles%\Microsoft Team Foundation Server 2010\Tools”
  3. TFSServiceControl quiesce

 (2) Backup databases on DYSON

Backup the following databases on DYSON and move/copy the backups to your live database server i.e. BACH.

Database Engine

  • Tfs_Configuration
  • Tfs_DefaultCollection
  • Tfs_Warehouse

 Analysis Services

  • Tfs_Analysis

 (3) Restore Databases to BACH

The restoration of the databases differs for the Database Engine and Analysis services.

Database Engine

  • Tfs_Configuration
  • Tfs_DefaultCollection
  • Tfs_Warehouse

 Analysis Services

  • Tfs_Analysis
  1. Copy the TFS_Analysis.abf to (E:\SQL_Analysis_Data\MSAS10_50.MSSQLSERVER\OLAP\Backup\).
  2. Open up a connection to the Analysis Services in SQL Mgmt Studio.
  3. Run the following XMLA query

<Restore xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine”>

  <DatabaseName>Tfs_Analysis</DatabaseName>

  <File>E:\SQL_Analysis_Data\MSAS10_50.MSSQLSERVER\OLAP\Backup\Tfs_Analysis.abf</File>

</Restore>

(4) Prepare BACH for TFS 2010

Some preparation must be carried out on BACH to allow the TFS 2010 application tier to access the moved databases.

The following  commands need to be run on the 2010 application tier.

 Open a command prompt and run the following commands;

cd “%programfiles%\Microsoft Team Foundation Server 2010\Tools”

TFSConfig PrepSQL /SQLInstance:BACH

TFSConfig Accounts /ResetOwner /SQLInstance:BACH /DatabaseName:Tfs_Configuration

TFSConfig RemapDBs /DatabaseName:BACH;TfS_Configuration /SQLInstances:BACH /AnalysisInstance:BACH

TfsConfig registerDB /SQLInstance:BACH /DatabaseName:Tfs_Configuration

(5) Restart TFS 2010 services

These commands need to be run on the 2010 application tier.

Start a command prompt on app tier

cd “%programfiles%\Microsoft Team Foundation Server 2010\Tools”

TFSServiceControl unquiesce

SQL Reporting Services and SharePoint

Luckily both reports and SharePoint portals were not in use under 2008, so these needed be recreated manually post upgrade. Reporting services was installed on TIPPET and new databases were created on BACH for use with Team Foundation Server 2010. These were named differently than those currently in use by 2008. The SharePoint server TOCH (MOSS 7) did host a site for 2008 web portals but was not currently used, a new SharePoint site was created for 2010. Post upgrade both project reports and web portals would need to be recreated using command line tools available in Team Foundation Server 2010 Power Tools. See the tools and documentation for more information if required

Deploy New Reports

The upgraded database schema no longer works with reports created in previous versions. A new set of Agile 5.0 based reports can be deployed with TFS 2010 power tools using the following command line;

tfpt.exe addprojectreports /collection:http://tippet:8080/tfs/DefaultCollection /teamproject:”ProjectName”
/processtemplate:”MSF for Agile Software Development v5.0″ /force
 

Possible error message and fix see; Cannot create project (TF30225: xp_sqlagent_notify)

Deploy new SharePoint Portal

To take advantage of the new dashboard features project portals need to be recreated. To achieve this;

  1. Archive document libraries from the original portals
  2. Create new portals using TFS power tools (see command line below)
  3. Import document libraries to new portals

tfpt.exe addprojectportal /collection:http://tippet:8080/tfs/DefaultCollection /teamproject:” ProjectName” /processtemplate:”MSF for Agile Software Development v5.0″

Parallel Running and Switchover

The final step of the upgrade was to start the Team Foundation Server 2010 services in parallel with the already running 2008 services. A period of verification testing followed and the version control and work item tracking of both the original and upgraded databases could be compared. Once all was ready clients where switched to the upgraded application tier and normal was resumed. At this point the temporary SQL Server (DYSON) could be decommissioned leaving the live server (BACH) to host both 2008 and 2010 databases.   

During the entire upgrade process the original 2008 version remained available for operational work and can now continue to run alongside the 2010 upgraded clone of itself. The Build services on both BIZET(2008) and BINGEN(2010) are running on separate servers accessing separate application tiers that use the same SQL server database instance and share the same SharePoint server.

Summary

In this newsletter we have discussed the two standard upgrade paths documented by Microsoft for Team Foundation Server. A third undocumented path has been outlined that involves temporary upgrade environments and moving databases between servers. We have also shown that both Team Foundation Server 2008 and a cloned set of databases upgraded to 2010 can be run on the same server allowing parallel running of both versions with the same data.

Dunstan Thomas Newsletter; Issue 14

May 12th, 2011

Introduction

Users of Enterprise Architect may be aware of the use of “Gang of Four” Design Patterns (Gamma et al) in the use of software designs and the support that Enterprise Architect provides for using these “Gang of Four” patterns.

Enterprise Architect also provides facilities for modellers to create and share their own design patterns. Users of Enterprise Architect may be under the impression that creating and sharing your own patterns is restricted to UML class diagrams however this is not the case.

This newsletter presents an illustration of creating, using and distributing a Business Process Workflow pattern using BPMN 1.1

Business Workflow Patterns

The research work of Professor van der Aalst has resulted in the identification of 21 basic workflow patterns that describe the behaviour of business processes.

These patterns are divided into the following categories:

  1. Basic Control Flow Patterns
  2. Advanced Branching and Synchronization Patterns
  3. Structural Patterns
  4. Multiple Instance Patterns
  5. State-based Patterns
  6. Cancellation Patterns

However you are free to create your own modelling patterns.

For the purpose of this newsletter, I will describe the following pattern, which I will refer to as “Parallel Process Error Propagation”. This pattern is illustrated below:

This workflow patterns ensures that if an exception occurs, then this is handled by a common activity.

Creating the Pattern

To create your own pattern, you must first model the pattern using a diagram from your chosen notation (in this case a BPMN 1.1 Business Process Model Diagram). I would recommend that ALL elements are named so identification within the pattern is made much easier. So the pattern can be maintained I recommend that a separate Enterprise Architect project is used to model your patterns.

The diagram created must now be saved as a UML Pattern using the following steps:

  1. Select Diagram | Save UML Pattern… from the main menu. The following dialog displays
  2. Complete the dialog as follows:
    1. In the Pattern Name: field enter a name to identify your pattern
    2. In the Filename field, enter a directory path and filename in which to save the pattern
    3. In the Category field, enter a name under which your pattern will appear in the UML Patterns section in the Resources view
    4. In the Version field enter any desired version number and in the Notes field enter a description of your pattern
    5. Complete a selection for the actions that are available when the pattern is used
      1. Create: creates the pattern directly adding new elements to your model
      2. Merge: Uses existing elements in your model and assembles them into your pattern (refer to Limitations later in this newsletter)
      3. Instance and Role are only where Object, Ports or Parts are used within your pattern
    6. You can also enter a comment for each element in your pattern to give some guidance as to its purpose within the pattern

      The illustration below shows a typical completion of the UML Pattern dialog

    7.  

  3. After completing the dialog click OK to save your pattern

Importing the Pattern

In order to use your pattern, it must be imported into you modelling project:

  1. Select the Resources window (if this is not visible, then use the View menu to select the Resources view)
  2. Right-click on the UML Patterns node, and select Import UML Pattern
  3. Navigate to the file created when you saved your Pattern
  4. Click Open to complete the import process

If all has gone well, you should see you pattern in the Resources view as shown below:

Using the Pattern

To use your newly imported pattern, perform the following steps:

  1. Create a new diagram that matches the type used when the pattern was first created (for this newsletter, this would be a BPMN 1.1 Business Process Model
  2. Using the Resources view, locate the pattern and Drag and drop the pattern onto your diagram, the following dialog displays:

  3.  

  4. Assuming that you wish to Create a new pattern, then for each element in the pattern click the … button and enter a new name (which can be blank) for your element. A typical example is shown below:

  5.  

  6. Click OK and your pattern should appear on your diagram using the names you entered in the dialog. This is shown below:

  7.  

(Note as the labels for the error intermediate event were hidden in the pattern, they are also hidden in the above diagram)

Limitations

When creating patterns based upon PURE UML diagrams then
all features work without fault. However it is important to note that basing a pattern on a
UML Profile (which BPMN is) then the Merge option does not work, therefore for BPMN patterns it is not possible (currently) to use existing BPMN elements
and assemble them into a pattern. This limitation is being addressed in the next release of Enterprise Architect version 9.0 (currently in Beta 3.0).

Summary

In this newsletter we have described how create and use a pattern based upon a modelling notation other than UML.

DT ALM Newsletter; Issue 13: Diagram Filters

January 19th, 2011

Diagram Filters

When working on large diagrams modellers often need to identify certain elements that are of particular interest to them.

Some examples of element selection are:

  • Elements which have no value for a particular property (for example the Description)
  • Elements who share the same value for a particular property (for example Status or Phase)
  • Elements that were written by a particular person
  • Elements that have (or have not) been modified since a certain date

Diagram Filters is new functionality added for Enterprise Architect version 8.0 that provides this facility. Currently the Diagram Filters function only operates on Elements that are visible on a diagram (but the same Diagram Filters can be applied to diagrams of different types). They work by using a slimmed down version of the Search Filters already built-into Enterprise Architect, but instead of returning a list as a result of the search, the appearance of the Elements on the diagram can be changed.

There are four effects that can be applied when Diagram Filters are in use on a diagram, these are:

  • Fade – display all elements that do not match the filter criteria in a pale version of the diagram background
  • Gray Scale – display all elements that do not match the filter criteria in pale grey
  • Hide – conceal all elements that do not match the filter
  • Select – select all those elements that do match the filter criteria

Initially the above seems confusing, but when you see the Diagram Filters in action, the effects described above will become more intuitive. It must be noted that any one of the four effects can be applied with any Diagram Filter, that is to say, the effect is not part of the Diagram Filter but rather it controls how the filter is applied to the diagram.

Worked Example

A simple example should clarify matters. It is common modelling practice that all Elements on a diagram be elaborated with a textual description, captured in the Notes property of an Element within Enterprise Architect.

Some modellers add these notes as they create elements whereas others do not, so if we imagine a project team working collaboratively, how can each member of the team identify which elements have notes and which do not? Although there are many possible solutions to this problem, this example will illustrate a simple solution using Diagram Filters.

  1. Open a diagram and then select View | Diagram Filters from the main menu to open up the Diagram Filters view (as shown below)
  2. Enterprise Architect Diagram Filters

  3. Create a new Diagram Filter, by clicking on the toolbar icon Enterprise Architect Toolbar Icon
  4. Give the Diagram Filter a suitable name, for this example I have used Needs Description
  5. Create a Diagram Filter by completing the following dialog
  6. Enterprise Architect Diagram Filter

  7. In this example we need a simple filter that tests the value of the Notes property to be Equal to nothing. The condition is selected from a drop down list
  8. After setting these options our filter now looks like
  9. Enterprise Architect Diagram Filter

  10. Click OK
  11. The Diagram Filter is now added to the list of available filters (it is perfectly feasible to have many Diagram Filters defined and apply them in many different combinations)
  12. Enterprise Architect Diagram Filter

  13. To apply the filter to the current diagram, use the Drop Down list (Fade, Gray Scale, Hide, Select…) to set the effect and click the check box next to the Diagram Filter name.

The following images illustrate the application of the Diagram Filter for each of the four effects.

Fade

Fade out those elements that do have a description leaving those elements that need a description

Enterprise Architect Diagram Filter - Fade

Gray Scale

Colour grey out those elements that do have a description leaving those elements that need a description

Enterprise Architect Diagram Filter - Grey Scale

Hide

Hide those elements that do have a description leaving those elements that need a description

Enterprise Architect Diagram Filter - Hide

Select…

Select these elements that do need a description leaving those elements that have a description unselected.

Enterprise Architect Diagram Filter - Select

The modeller is able to identify quickly and easily those elements that require a description to be added.

For some diagrams with many different element types, a filter setting for a particular Object Type could be added to the filter testing for the empty Notes property. Currently, Diagram Filters cannot use a search term, so a separate Diagram Filter would have to be created for each element type.

Notes

  • If a Diagram Filter has been applied to a diagram (or diagrams) and documentation is produced, then the effect of the filter will be replicated
    in the documentation output.
  • Also the application of a diagram filter does not mark the diagram as unsaved, hence if a Diagram Filter is applied, then diagram closed,
    when the diagram is re-opened the Diagram Filter is not applied despite the fact that it may still be checked in the Diagram Filters view.

Summary

In this newsletter we have described how use Diagram Filters to “fine tune” the appearance of diagrams. Diagram Filters are a potentially valuable aid to modellers, particularly those who work in a collaborative modelling environment.

DT ALM Newsletter #12; AMUSE

September 10th, 2010

Introduction

In this newsletter we provided an overview of a new Add-In called AMUSE for Enterprise Architect version 8.862.

An Overview of AMUSE

AMUSE (Advanced Modeling in UML with Simulation and Execution) is an Add-In for  EA 8.0 Build 862 or EA 7.5 Build 850 or higher is required (EA Systems Engineering or Ultimate Edition) and extends the functionality of Enterprise Architect to provide the ability to execute workflows that have been modelled using UML State Machine Diagrams. This Add-In has been developed by LieberLieber (www.lieberlieber.com ) and is marketed as:

Read the rest of this entry »

DT Newsletter: Issue 11; SoaML

April 15th, 2010

In this newsletter we continue the theme of introducing some of the modelling
extensions provided with Enterprise Architect. The subject of this newsletter
is Service Oriented Modelling Language, or SoaML.

Read the rest of this entry »

DT Newsletter; Issue 10

March 12th, 2010

Welcome to the first newsletter of 2010.As promised in the last newsletter which introduced the MDG extensions in Enterprise Architect), this newsletter concentrates on the TOGAF MDG extension. In this newsletter, we will describe how to obtain the TOGAF MDG extension and how to get started using it.

Read the rest of this entry »

DT ALM Newsletter; Issue 9

October 15th, 2009

This newsletter looks at the MDG Extensions for Enterprise Architect & provides a summary of their use. Future Newsletters will focus on each of these technologies in turn.

Read the rest of this entry »

Data Mapping in UML

August 19th, 2009

It’s often the case that we need to map various attributes on entities into other entities. For example you might need to migrate data from one system to another and structurally the same concepts are held slightly differently. Documenting these mappings is not obvious in the UML, so below I’ve provided a simple example of how a composite structure diagram could be used to provide the mappings. Some notes have been added where conversions need to be performed and these could be represented more formally using diagram references to behavioural diagrams such as sequence or activity diagrams. This is quite possibly not 100% UML compliant / intended usage; but it provides a tool for this type of mapping which otherwise seems to be lacking in the standard UML specification.

Read the rest of this entry »

DT ALM Newsletter; Issue 8

July 10th, 2009

This newsletter outlines a method based on Model Driven Generation (MDG) to allow the cloning of sections of an Enterprise Architect project.

The Top 10 Blunders in Integration and Testing

July 3rd, 2009

To help you assess the current state of your software development processes, Borland has compiled a list of the top ten integration and testing blunders. Compiled through consultation with industry experts and our own work with countless software organizations worldwide, the top ten list can help you identify areas of weakness that are holding your business back from accelerating the development of reliable software products.

Read the rest of this entry »


Copyright © 1986-2012 Dunstan Thomas Holdings Limited
Disclaimer, Terms and Conditions