共用方式為


TFS 2005 & Windows SharePoint Services 2.0 Configuration Explained

Windows Sharepoint Service 2.0 is a free to download & use version of Sharepoint Services. TFS 2005 at time of installation required WSS 2.0 to be installed but not configured. In this post let's look at 3 things:

1. How TFS 2005 installation impacts WSS 2.0

2. What if somebody has to Uninstall & Reinstall WSS 2.0 post installation of TFS 2005 because of some issues in WSS 2.0.

3. What are my options for customising WSS 2.0 post installation of TFS 2005

 

How TFS 2005 installation impacts WSS 2.0

The TFS installer runs the following commands to configure SharePoint Services 2.0:

SETLOCAL
REM Variables you need to set are here:
SET StsAdm="D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Bin\Stsadm.exe"
SET ServiceUser="ServiceAccountDomain\ServiceAccountUser"
SET ServicePassword="ServiceAccountPassword"
SET DataTierInstance="DataTierInstance"
REM DataTierInstance can also be "Machine\Foo" or "Machine,1234" for named instances
REM Set the admin port to the value we typically use:
%StsAdm% -o setadminport -exclusivelyusentlm -port 17012 -admapcreatenew -admapidname TFSWSSADMIN -admapidtype configurableid -admapidlogin %ServiceUser% -admapidpwd %ServicePassword%
if NOT %ERRORLEVEL%==0 then goto eof
REM Create/assign the config database:
%StsAdm% -o setconfigdb -databaseserver %DataTierInstance% -databasename "STS_Config_TFS"
if NOT %ERRORLEVEL%==0 then goto eof
REM Create the Virtual Server:
%StsAdm% -o extendvs -exclusivelyusentlm -url https://localhost:80 -ownerlogin %ServiceUser% -owneremail "admin@localhost" -dn "STS_Content_TFS" -apcreatenew -apidname TFSWSS -apidtype configurableid -apidlogin %ServiceUser% -apidpwd %ServicePassword% -sitetemplate sts
if NOT %ERRORLEVEL%==0 then goto eof
REM Delete and recreate the SQL RS path exclusions
REM Note, the deletes will error if they don't already exist – you can ignore those errors:
%StsAdm% -o deletepath -url https://localhost:80/ReportServer
%StsAdm% -o addpath -url https://localhost:80/ReportServer -type exclusion
if NOT %ERRORLEVEL%==0 then goto eof
%StsAdm% -o deletepath -url https://localhost:80/Reports
%StsAdm% -o addpath -url https://localhost:80/Reports -type exclusion
if NOT %ERRORLEVEL%==0 then goto eof
REM Force the Virtual Server instance to the correct version (of ASP.Net etc.)
%StsAdm% -o upgrade -forceupgrade -url https://localhost:80
if NOT %ERRORLEVEL%==0 then goto eof
ENDLOCAL

The above script does the following tasks in the below sequence:

1. An application pool called TFSWSSADMIN is created with the TFS Service account as the identity for the pool.

 

2. The Sharepoint Central Administration Site get created at port 17012 & is setup to use:

a. A configuration database called STS_Config_TFS is created on the Data Tier.

b. TFSWSSADMIN is set as the application pool for the site.

c. The site is set to use NTLM.

 

3. An application pool called TFSWSS is created with the TFS Service account as the identity for the pool.

 

4. The default web site at port 80 gets extended with Windows Sharepoint Services. Also:

a. A content database by the name STS_Content_TFS gets created on the Data Tier.

b. TFSWSS becomes the application pool for the default web site.

c. The stsfltr ISAPI filter is set for the default web site.

 d. The Reports & ReportServer web apps are excluded from the managed paths in WSS. (This behaviour is different in WSS 3.0)

e. Root site collection is created. (This behaviour is different in WSS 3.0)

f. The site is set to use NTLM.

Subsequently the TFS installer installs the global site templates for MSF Agile & CMMI to \Program files\Microsoft Visual Studio 2005 Team
Foundation Server\TF Setup\1033 location & uses the stsadm command line tool to upload the templates as follows:

stsadm -o addtemplate -filename  \Program files\Microsoft Visual Studio 2005 Team
Foundation Server\TF Setup\1033\MSFAgile.stp -title VSTS_MSFAgile

stsadm -o addtemplate -filename  \Program files\Microsoft Visual Studio 2005 Team
Foundation Server\TF Setup\1033\MSFFormal.stp -title VSTS_MSF_CMMI.

 The stsadm tool is located at Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Bin folder.

 

What if somebody has to Uninstall & Reinstall WSS 2.0 post installation of TFS 2005 because of some issues in WSS 2.0.

Before you uninstall/reinstall WSS 2.0 the first thing that you need to do is to take the backup of the STS_Content_TFS database. This database contains the project portals & security configuartion for all the users that have access to them.

Once you uninstall & reinstall WSS 2.0 on the box, you would have to setup the SharePoint Central Admin Site & extend the default web site again. Then you would need to attach the content database STS_Content_TFS to the default web site.

 The steps should be:

1. Take a fullback of the STS_Content_TFS db.

2. Drop the STS_Config_TFS db in SQL.

3. Uninstall & Reinstall WSS 2.0 from the box.

============================================================================================================= 

At this point of time you can either use the long script above to configure sharepoint, providing the right values for the substitution variables. Or

============================================================================================================= 

4. When the WSS 2.0 installation is done, the installer should launch an Internet Explorer window that should prompt you to select an application pool. Select the TFSWSSADMIN application pool & click Ok.

5. Provide the SQL Server instance nane in the server name box & STS_Config_TFS as the name of the configuration db. Leave the rest of options as default.

6. Do an iisreset.

7. Open IIS, chnage the port number for the newly created SharePoint Central Admin site to 17012.

8. Browse the central admin site, & select extend or upgrade virtual server. In the virtual server setting page, click Default Web Site. Click extend & create a content database.

9. Select TFSWSS as the application pool, give the site owner name & owner's email address for the root site collection, keep the other options as defaults & click Ok.

10. Browse Central Admin, click configure virtual server settings, select default web site, click manage content databases.

11. Click on the database listed over there & in the new page check the check box for "Remove content database" & click ok.

12. Click Add a content database, provide the SQL Instance name. Specify the STS_Content_TFS (name is case sensitive) as the database name. Provide 9000 & 15000 for "Number of Site before a warining..." & "Maximum number of sites..." respectively & click ok.

13. Browse Central Admin, click configure virtual server settings, select default web site, click Define Managed Paths.

14. Specify Reports in "Path" textbox & click "Excluded path" & click ok.

15. Specify ReportServer in "Path" textbox & click "Excluded path" & click ok.

16. Upload the templates for TFS using the following two commands:

stsadm -o addtemplate -filename  \Program files\Microsoft Visual Studio 2005 Team
Foundation Server\TF Setup\1033\MSFAgile.stp -title VSTS_MSFAgile

stsadm -o addtemplate -filename  \Program files\Microsoft Visual Studio 2005 Team
Foundation Server\TF Setup\1033\MSFFormal.stp -title VSTS_MSF_CMMI.

17. Do an iisreset.

 That's it, WSS 2.0 is up & runing & configured.

 

What are my options for customising WSS 2.0 post installation of TFS 2005

Pretty much none if you want to ensure that TFS 2005 is servicable(you can apply service packs & hotfixes).

If you still want to do customisations such as:

1. Changing port number for Central Admin. Yes u can do it

2. Using a different site other than the Default Web Site as the content site. Yes u can do it.

3. Change the names for the config db & content db. Yes u can do it.

4. Changing the application pool for central admin or content db. Again Yes.

 

So if I do the above how would TFS know that my sharepoint urls's have changed.

Answer: Open the service_interface table in the TFSIntgeration database in SQL management studio. Edit the port numbers for Basesite Urls, BaseServer urls & WSSAdminService url to point to the correct port numbers for the content site & the Central  Admin site.

 

To summarise an ideal or default sharepoint configuration with TFS should include:

1. The default web site extended with WSS & setup to use the TFSWSS app pool that runs under the TFS Service account & uses the STS_Content_TFS as the content database at port 80.

2.The SharePoint Central Admin site setup to use the TFSWSSADMIN app pool that runs under the TFS Service account & uses the STS_Config_TFS as the content database at port 17012.

Comments