Managing Team Foundation Server
These two modules cover managing collections, backup and recovery, lab management, and security.
*******************************************************************************************
MODULE 3
*******************************************************************************************
Study Guide says...
Manage Team Project Collections.
- moving project collections
- managing team collections and projects
- creating and configuring Team Project Collections
- creating a team project using SharePoint and SQL Server Reporting Services (SSRS)
// creating in a full environment, not a basic install
- splitting and partitioning team project collections
// demo will do creating first
MSDN Resources:
moving project collections
managing team collections and projects
creating and configuring Team Project Collections
creating a team project using SharePoint and SQL Server Reporting Services (SSRS)
splitting and partitioning team project collections
Team Project Collection Architecture
Network load balancer directs traffic to seperate application tier servers.
They pull configureation information from a common server in the data tier,
then pull their collection database from the appropriate server.
// TFS is highly scalable. You would have one or two team project collections
// each TPC contains team projects
// tfs_configuration - default config database name
// tfs_collectiondatabase1 - TPC is tied to a specific SQL database
Creating a team project collection
- use the TFS Admin Console
- follow the wizard
// really simple, do need to make specification of Sharepiont sites
Creating a team project w/ Sharepoint and SSRS
- use the Visual Studio 2012 team explorer
- follow the wizard
// should create a new team project before taking exam
Move a Team Project Collection
1. Required Permissions
2. Save Reports
3. Delete Lab Management Resources
4. Unmap the Collection from Microsoft Project Server
5. Detach the Collection
6. Back Up the Collection Database
7. Rebuild the Data Warehouse and Analysis Services
8. Prepare to Move the Site Collection Database
9. Move the Site Collection Database
10. Restore the Collection Database
11. Attach the Collection
12. Move Reports
13. Reconnect Resources for the SharePoint Web Application
14. Configure the Moved Team Project Collection
15. Configure Lab Management Resources
16. Configure Project Server Integration
17. Configure Projects
// these are all the steps to move from one SQL Server to another
// many details
// Serveral key things -
// detach collection
// backup collection
// move to new server
// restore the collection database
// attach the collection
Split a Team project collection
// splitting a collection is almost the same as moving
1. Delete Lab Management Resources
2. Detach the Collection
3. Back Up the Collection Database
4. Restore the Collection Database With A Different Name
5. Attach the Original Collection Database
6. Attach the Renamed Collection Database
7. Delete Projects From the Split Collections
8. Reconnect SharePoint Web Application Resources
9. Split Reports
10. Start the Collections
11. Rebuild the Data Warehouse and Analysis Services
12. Reconfigure Team Project Portals
13. Configure Lab Management Resources
14. Configure Users and Groups for the Split Team Project Collections
15. Configure Users and Groups for Projects
16. Split the Original Site Collection to Support the Split Team Project Collections
17. Synchronize Integration with Microsoft Project Server
Split a Team project collection - Simple
- Detatch Original TPC
- Copy Original DB and restore with New DB name
- Attach Original TPC
- Attach New TPC
- Clean up Team Projects
// TfsConfig.exe collection command:
// C:\TfsConfig.exe collection /attach /collectionDB:<sqlInstance>;<databaseName>
// [/collectionName:<name>] [/clone]
//
// C:\TfsConfig.exe collection /detach /collectionName:<name>
//
// C:\TfsConfig.exe collection /delete /collectionName:<name>
// C:\tfsdeleteproject.exe does the same thing
//
// C:\TfsConfig.exe collection /? for help
//
// All of this can be done within the TFS Admin console
// In the admin console we can inspect TPC and look at their configuration
// In order to edit a collections settings, the collection must be stopped.
//
// Before we move a collection we must detach it. We can set a message that will
// display to anyone attempting to attach the collection.
// Backing up without detaching is very bad news.
//
// Use SQL Server Management studio to backup the database of the detached collection
// SQL Server can be finicky about path names for the backup
// When we restore the collection, we can give it a new name. This creates a new SQL
// database.
//
// When we reattach, we do attach the new team project collection first. This lets us
// clean up the sharepoint settings before we restore the original collection.
// TFS apparently won't let you attach a collection if there are duplicate team
// projects.
Configure for backup and recovery.
- backup and recovery of Team Foundation Server and related components
- recovering a failed application tier
- recovering a failed database tier
- implementing a disaster recovery plan
backup and recovery of Team Foundation Server and related components
recovering a failed application tier
recovering a failed database tier
implementing a disaster recovery plan
clearing work item and version control caches
Databases needed for backup and recovery
required - (all TFS databases)
Configuration database
Warehouse database // however this can be recreated
TPC databases
optional -
SharePoint Products databases (SharePoint)
Reporting databases (SQL Server Reporting Service)
Analysis databases (SQL Server Analysis Service)
Backing up TFS:
Manually backing up TFS
- HARD
// this is what matters for the exam, but nobody does this in real life
Using the Database Backup Tools (TFS 2012 Power Tools)
- EASY – Follow the wizard
- (But not on exam since it’s part of the power tools)
Using the Scheduled Backup feature (Update 2)
- EASY – Follow the wizard
- (But not on exam since it’s part of Update 2)
// when doing a manual backup, you have to seperately back up the SQL Server reporting
// service encryption key, unless you use the backup tools
// Steps required:
// - required permissions
// - identify Database
// - create tables in databases
// - create a stored proc for marking tables
// - create a stored proc for marking all tables at once
// - create a stored proc to automatically mark tables
// - create a scheduled job to run the table marking procedure
// - create a maintenance plan for full backups
// - create a maintenance plan for differential backups [optional]
// - create a maintenance plan for transaction backups [optional]
// - back up the reporting services encryption key
// - create a back up plan for sharepoint foundation 2010
// - back up additional lab management components
// backing up sharepoint is a huge process in itself
// if you want to use maintenance plans in SQL server, you may want to do it this way
// in most cases you will want to use the TFS Admin Console (Database Backup Tools or
// Scheduled Backups feature)
// possible to specify a user account to do a backup. (necessary for permissions)
// default is nightly full backup, can do differential and transactional every 15 minutes
// You can send email alerts to the admin if the backup fails
Recover an application tier
Simply install a new application tier
- Be sure to create the right security accounts on the new hardware
- All TFS Administrators must be added to the AT’s local Administrators group
// very simple to recover TFS
Run the Application-Tier Only wizard from the TFS 2012 install media
Run the TFS Administration Console
- Choose Application Tier -> Change URLs
- Enter the URL to the new Application Tier
Pro Tip: You can also use the Change URLs window to allow TFS to use a
fully qualified name such as tfs.nwcadence.com
Recover a data tier
// data tier is a lot more work
Restore the databases to a new SQL Server
Run the TFSConfig RemapDBs command
TFSConfig RemapDBs /DatabaseName:ServerName;DatabaseName
/SQLInstances:ServerName1,ServerName2 [/AnalysisInstance:ServerName]
[/AnalysisDatabaseName:DatabaseName]
[/preview] [/continue] [/usesqlalwayson]
Pro Tip: With Update 2, this is now much easier since you can use the Scheduled
Backup feature
Refreshing Data Caches on Client Computers
// this happens with the app tier crashes. Sometimes work item cahces go out of sync.
If Work Item caches are causing errors, invoke the StampWorkitemCache web method
- On the New Server, and only once for entire organization
- http:// {tfsName}:8080/WorkItemTracking/v3.0/ClientService.asmx
- Invoke StampWorkitemCache method
// error in MSDN includes "tfs/_tfs_resources/" just after port in above URL
If Version Control cache is causing errors, invoke the tf.exe workspaces command
- On every client computer in the organization
- tf workspaces /collection:http://{tfsName}:8080/tfs/CollectionName
// only invoke these if you are having problems
Monitor server health and performance.
- monitoring the server for performance issues (monitoring activity logging database
and Team Foundation Server manager)
- monitoring the job infrastructure for failed jobs (monitoring warehouse adapters
and warehouse jobs)
- cleanup of stale workspaces and shelvesets
- setting up Team Foundation Build to use a version control proxy server
monitoring the server for performance issues
monitoring activity logging database
monitoring the job infrastructure for failed jobs
(no links for MSDN)
monitoring warehouse adapters and warehouse jobs
http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx
(on TFS box)
cleanup of stale workspaces and shelvesets
setting up Team Foundation Build to use a version control proxy server
WarehouseControlWebService
http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx
Performance of individual commands
Dbo.tbl_Command
- Found in Tfs_Configuration database
- Measures performance of individual commands
// located in config database because we want to see it across the board
http://localhost:8080/tfs/_oi
- Activity log
- Job monitoring
Cleaning up stale workspaces and shelvesets
// we have workspaces and checkouts hanging out in space, this can help us
// clean that up
// Tf Undo is also useful
Tf workspaces
- List all the workspaces for a person
- Update user name or computer name
Tf workspace
- Create or delete workspace
- Change workspace properties
Tf shelvesets
- Lists information about shelvesets
Tf shelve
- Create or delete a shelveset
Tf status
- Displays information about pending changes
Configure Team Build to use a Proxy Server
// just drop into reg-edit and set two variables (step 2)
// can dramatically improve performance
1. On the server that is running Team Foundation Build Service, click Start,
click Run, type regedit, and then click OK.
2. In the browser pane, expand HKEY_CURRENT USER to
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Proxy.
3. In the details pane, set Enabled to True, and then set URL to
http://ProxyServer:Port.
4. ProxyServer is the name of the proxy server that you want Team Foundation
Build Service to use, and Port is the number of the port on which the proxy
server is listening for requests. (By default, this number is 8081.)
5. On the File menu, click Exit to close Registry Editor.
// SQL Server Management Studio, go to TFS_configurations -> Tables -> dbo.tbl_Command
// this contains all the actions that have occured and we can look at the types of
// commands, execution time, etc.
// difficult to interpret, so we can go to tfs/_oi, which is easier to understand
// (activity log). We can use filters to look at individual things.
// job monitoring tab shows information about the jobs that have run
// has info on average job execution time and job failures.
// warehouse control web service -> processing status has the same data
// this comes in an xml file
// warehouse control also runs on the localhost on the TFS server
EXAM BEST BETS
Focus on what’s possible rather than the deep technical details
- Learn the basics for Splitting a TPC rather than the set of steps or commands
Understand the command line tools that are related to TFS administration
- TfsConfig.exe
- Tf.exe – selected commands (workspaces, workspace, status, shelve, shelvesets,
undo, etc)
Realize that the tools you really use to manage performance and health of TFS aren’t
on the exam
- You have to study other approaches that are infrequently, if ever, used in real life
// would powerview be good for visualizing command table? yes
// automation of workspaces and shelvsets? TFS Sidekicks is a tool for managing workspaces
// backups default to the TFSService account... this is likely a developer who doesn't
// have permission to the enterprise backup infrastructure
// cleaning out workspaces can be done with tf (command line)
// tfs/_oi requires permissions. If it is not found, you don't have permission
// what is the problem with just using a database backup tool:
// - tfs is very active, so while you are backing up a given database the other
// databases are being updated. Important to have sync points.
*******************************************************************************************
MODULE 4
*******************************************************************************************
// lol somebody left their pants hanging up hahahaha
Operate Lab Management.
- operating and modifying lab environments
- repairing lab environments
// in 2012 they made great strides in repairing lab env
- using snapshots
- storing System Center Virtual Machine Manager environments
operating and modifying lab environments
repairing lab environments
using snapshots
storing System Center Virtual Machine Manager environments
Intro to Lab Management
Overview: http://examcr.am/132j169
Benefits of Lab Management:
- Use a test plan to run automated tests
// within MTM we run an automated test, which is executed by Lab Management
- Use a build-deploy-test workflow
- Collect diagnostic data from all machines, even during manual testing
- Automatic test agent installation
Additional Benefits with SCVMM (system center virtual machine manager):
- Quickly reproduce machine configurations
- Reproduce the exact conditions of a bug
// environmental snapshot
// network isolation allows you to have multiple configurations that are identical
// with respect to IP address and machine names
// you can have multiple domain controllers
- Run multiple copies of a lab environment at the same time
Changing Properties of an SCVMM environment
1. Open Microsoft Test Manager and connect to the team project.
2. Open Lab Center.
3. Choose the Lab tab.
4. Choose the Environments sub-tab.
5. A list of environments is displayed.
6. Choose the environment that you want to view or change.
7. Choose Open, and then follow the steps in the wizard to view or change the properties.
8. If you have opened the wizard just to view the properties of the SCVMM environment,
choose Cancel to close the wizard. If you have made changes and want to save the changes,
choose Finish
Repairing Lab Environments
When you view your lab environment in the Environments tab in Lab Center, the
status might be in the Not Ready state and display the error message, “The environment
has one or more errors.”
- The installation or configuration of a test agent on one or more of the machines in
your environment failed.
- There is a communication problem between one of the test agents in your environment,
and your test controller.
- The test controller or the test agent process has shut down or is not functioning.
- The user account of the test agent or the lab service account cannot be authenticated
by the test controller.
To repair, choose Repair Environment from shortcut menu
Using Snapshots
// you can capture the SCVMM in a particular state
You can do the following with environment snapshots:
- Creating Snapshots of an Environment
- Restoring an Environment From a Snapshot
- Sharing a Snapshot of an Environment
- Storing an Environment With Snapshots in the Library
- Deleting a Snapshot of an Environment
Storing SCVMM environments
Can use stored environment in the following situations:
- Archiving deployed environments
- Creating stored environments from stored virtual machines and templates
- Creating a stored network isolated environment
- Createing a stored environment from a deployed environment
// are there scenarios where lab management can be leveraged to deploy to a live
// physical environment? Yes! rather than using a default template when configuring
// the build, we use a lab default template, we get a wizard for deploying. Can deploy
// to a SCVMM environment or a standard environment.
// for a very modest environment, it is possible to deploy HyperV on a single box
How do you manage security?
- configuring limited users
- configuring security for users who do not have a Client Access License (CAL)
- managing roles in Team Foundation Server using Active Directory groups
// or any other Windows group...
- managing permissions in Team Foundation Server in SharePoint, SSRS, builds, source
control, and Work Item Management
- creating and managing teams
// keep security simple
configuring limited users
managing roles in TFS using Active Directory groups
(no links)
managing permissions in TFS in SharePoint
managing permissions in TFS in SSRS
managing permissions in TFS in builds
managing permissions in TFS in source control
managing permissions in TFS in Work Item Management
creating and managing teams
configuring security for users who do not have a Client Access License (CAL)
Limited Users (formerly Work Item Only View)
Limits the user to only creating new work items and viewing / editing
work items that they have created.
// requires no Client Access License
Configuring Limited Users (AKA “No CAL" users)
- From web access, click the “gear” to get to the Admin site
- Click the “Control Panel” link on the breadcrumb
- Click the “access levels” tab
- Add Windows users, Active Directory groups, or TFS groups to the Limited access level
// these users will have a restricted view
// security settings are under the "gear" in the project control panel,
// which takes you to project profile. You can see the project teams on the project.
//
// Under "control panel" we have access levels.
// limited, standard, and full access levels.
// standard includes:
// - view work items
// - standard features
// - agile boards
// full includes
// - all features with standard plus
// - backlog and sprint planning tools
// - request and manage feedback
// - full access requires VS Premium or higher, or Test Professional
// limited has no Client Access License
// we can add windows users or groups
// these users will only see restricted view
//
// can set the default access level of new users coming in
//
// can upload extensions in the extensions tab (tiago pascal's blog...)
//
// We can manage security at the team level as well (web dev, prod dev, support, etc)
// We can add a team as a TFS group, then give them custom security permissions
// We deny permission for one team to alter another teams work items.
// Work item security is set up under "areas", general security is set under "security"
// Can set alerts: new work items sends alert to team (email), etc.
// bissubscribe is command line for alerts
//
// iteration security allows us to change the security parameters on a per-sprint basis
// source control security can be managed through Source Control Explorer
// can use source control security to manage how changes are checked in. May require
// users with one role (builder) to check in changes made by another user (contributor)
//
// SharePoint has a Site Permissions module, allows you to add users or groups to have
// access to site.
//
// SQL Server Reporting services (SSRS) has security settings as well
//
// a particular build can also have individual security settings
// Question about alerts - can set alert to go just to one user, or to a group.
// Extensions to web access - none built yet
Manage reporting for Team Foundation Server.
- managing basic reporting using Microsoft Office Excel Services
- customizing the SharePoint team project portal
- uploading a new SSRS Team Foundation Server report
- configuring Team Foundation Server to enable a report to appear in a SharePoint
project portal
- rebuilding the Team Foundation Server data warehouse // BIG deal
managing basic reporting using Microsoft Office Excel Services
customizing the SharePoint team project portal
uploading a new SSRS Team Foundation Server report
configuring Team Foundation Server to enable a report to appear in a SharePoint
project portal
rebuilding the Team Foundation Server data warehouse
Manual approach
- Go to:
http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx
- Process the warehouse:
- click ProcessWarehouse, and then click Invoke
- Process the cube:
- click ProcessAnalysisDatabase.
- in processingType, type either Incremental or Full, and then click Invoke
Rebuilding the Warehouse and Cube in the UI
Using the TFS Administration Console
- Open the administration console for Team Foundation.
- Under Team Foundation, expand the name of the server, expand Application Tier,
and then click Reporting.
- Under Reporting, click Start Rebuild.
- The Take Offline dialog box opens.
- Click OK to take the data warehouse and Analysis Services cube offline.
- The Rebuild the Warehouse and Analysis Services Databases dialog box opens.
- Click OK to initiate the rebuild process.
Rebuilding the Warehouse and Cube via Cmd
- Using the TfsConfig.exe RebuildWarehouse command
- Log in with an elevated command prompt
- Type TFSConfig RebuildWarehouse /analysisServices to only process the cube
- Type TFSConfig RebuildWarehouse /all to process both the warehouse and the cube
- Note: This command has NO option that will allow you to ONLY process the warehouse,
without the cube
// navigate to WarehouseControlWebService
// process warehouse, can process for particular collection or job, and invoke
// getprocessingstatus allows us to see the status of the rebuild process
// In the TFS Admin Console, we can select "rebuild"
// OR use C:\tfsconfig rebuildWarehouse in the command prompt
//
// to add reports, we can upload from reports portal
// some configuration of report necessary for it to run ("Manage")
EXAM BEST BETS
-Focus on what’s possible rather than the deep technical details
- Learn the basics of Lab Management as opposed to the steps necessary to snapshot
an environment
- Clearly understand how security around Teams works, both for version control and work
items
- Know how to rebuild the data warehouse in multiple ways
No comments:
Post a Comment