ARTICLE

How to publish Managed Metadata Service across Farms in SharePoint 2010

Posted by Vijai Anand Articles | SharePoint 2010 December 21, 2010
In Microsoft SharePoint Server 2010, some service applications can be shared across farms. By publishing a service application, you can optimize resources, avoid redundancy, and provide enterprise-wide services without installing a dedicated enterprise services farm.
Reader Level:

Publishing Managed Metadata Service across farms:

In Microsoft SharePoint Server 2010, some service applications can be shared across farms. By publishing a service application, you can optimize resources, avoid redundancy, and provide enterprise-wide services without installing a dedicated enterprise services farm. In this document we are going to publish and consume Managed Metadata Service across farms. The Publisher farm is the farm in which the Service application is running and the Consumer farm is the farm which will consume data from the publishing farm.

Configure Managed Metadata Service in Publishing Farm:

We need to configure Managed Metadata service in the publishing farm which will be used by the consuming farm. The steps involved to configure Managed Metadata Service are given below.

Steps Involved:

  1. In the publishing farm go to the Central Administration->Application Management->Manage Service Applications.

    1.gif

  2. In the Ribbon click on New to create a new Metadata Service.style="margin-top: 0cm; margin-bottom: 0cm" start="3" type="i">

    2.gif

  3. Enter the Name, Database Name and Database Server Name. Now your metadata service is ready.

  4. Click OK.

  5. Now the Managed Metadata Service has been created in the publishing Farm.

Taxonomy Term Store:
 
  1. Go to the Central Administration->Application Management->Manage Service Applications.

    3.gif

  1. Click on the Managed Metadata Service.

  2. You will enter into the Term Store Management Tool.

  3. On the left hand side you could see Taxonomy Term Store.

  1. First we will create a group for the Term Sets.

    4.gif

  1. Click on the Managed Metadata Service a  New Group  menu appears.

  2. Click on the New Group.

  3. Enter the name for the group as Sharepoint.

  4. Now click on the Sharepoint a menu will appear.

    5.gif

  1. Select  New Term set.

  2. Enter the name for the Term Set as Analysis.

  3. Now click on the Analysis a menu will appear.

  4. Select Create Term and enter the name .

    6.gif

  1. Now we have created Group, Term Set and Terms for the service.

    7.gif

Creating Content Type Hub:
SharePoint 2010 introduces a new concept called Content Type Hubs. It's a way to make content types available centrally and be reusable in the Farm. This is a huge improvement from SharePoint 2007 both in terms of management of content types and overall flexibility that comes with it. In SharePoint 2007 there is no way to manage Content type centrally. To share Content Type across site collection level or web application level in SharePoint 2007, you need to copy the same content type in different site collections or web applications. Another way could be to use web feature to enable content type across site collections or web applications. SharePoint 2010 has provided out of the box support for sharing Content Types across farm level.

Content Type Hubs enables you to create new content types and then make them available to other SharePoint site collections in the same or different web applications or across farms. This is a publisher-subscriber model, where content types are published by the Content Type Hubs using Metadata service and subscribers are the web applications in the SharePoint Farm. Finally, all the site collections in the web application which subscribe to this Metadata service will get this content type.

Configuring the Content Type Hub:

Publish Content Type:

The Enterprise Metadata Management Service or Metadata Service (in short), allows sharing Metadata and Content Type across the farm. To share Content types you need to define the content type(s) in a site collection. You can consider the site collection as the place where you'll put all your related content types to share across farm. This site collection, which is used to host content types or sharing, is called Content Type Hub.

1.  Create a new Content Type in a site collection that to be shared:

First select a site collection as a place to host your content types. You will define your content types to share across farm. Given below are the following steps to be followed to create a new content type that has to be shared.

Steps Involved:

  1. Go to the site collection where you want to host your content Type.

  2. Go to Site Actions -> Site Settings -> Galleries ->Site Content Types.

    8.gif

  3. In the top right you can see Create, click Create.

    9.gif

  4. Enter the name of the content type as Parent Content Type as shown in the figure below.

    10.gif

  5. Click OK to create a new content type named Parent Content Type.

    11.gif

  6. Go to Site Content Type Information and click Add from New Site Column.

  7. Enter the name for the column as Category - Metadata and choose the type of information as Managed Metadata as shown in the figure below.

    12.gif

  8. Choose the term set that we have already created when configuring the Managed Metadata service and click ok.

    13.gif

  9. A new field has been added to the content type.

2.  Activate feature to enable content publishing in site collection:

The site collection, which will host content types for sharing, is known as content type hub. To enable your site collection to be a content type hub you need to activate a feature known as "Content Type Syndication Hub".

Steps Involved:

  1. Go to Site Actions -> Site Settings -> Site Collection Administration -> Site Collection Features.

    14.gif

  2. Activate the feature Content Type Syndication Hub.

    15.gif

  3. Once you have activated this feature, you will find an option "Manage Publishing for this content type" in your content type setting  page as shown below:

    16.gif

Bind content type hub with a metadata service

  1. Go to the Central Administration->Application Management->Manage Service Applications.

    17.gif

  2. Select the Managed Metadata service and in the Ribbon Select the Properties.

  3.  There's an option for Content Type Hub and here put the url of your site collection where the content type is created.

    18.gif

  4. Configure Metadata Connection: To configure metadata connection, go to metadata service connection properties and ensure that the connection consumes the content type hub as shown below.

    19.gif

Publish the Content Type:

Now you go back to the site collection (which is used as content type hub) and go to content type settings page. Here in this page you will get the option "Manage publishing for this content type" option. Now click on the link "Manage Publishing for this content type" and ensure the 'publish' option is selected and then click OK as shown below.
 
         20.gif   

Exchange trust certificates between farms:

In Microsoft SharePoint Server 2010, a SharePoint farm can connect to and consume a service application that is published on another SharePoint Server 2010 farm. For this to occur, the farms must exchange trust certificates. You must use Windows Power Shell 2.0 commands to export and copy the certificates between farms. After the certificates are exported and copied, you can use either Windows Power Shell 2.0 commands or Central Administration to manage the trusts within the farm. To exchange trust certificates between farms the following steps should be followed.

Steps Involved:

  1. Exporting and copying certificates

  2. Managing trust certificates

Exporting and copying certificates:

An administrator of the consuming farm must provide two trust certificates to the publishing farm: a root certificate and a security token service (STS) certificate. An administrator of the publishing farm must provide a root certificate to the consuming farm.

To export the root certificate from the consuming farm:

  1. In the consuming farm go to Start menu.

    21.gif

  2. Go to SharePoint 2010 Management Shell and select Run as Administrator.

  3. In the command prompt, type each of the following commands.

$rootCert = (Get-SPCertificateAuthority).RootCertificate

$rootCert.Export("Cert") | Set-Content "C:\Users\554pa\ConsumingFarmRoot.cer" -Encoding byte


To export the STS certificate from the consuming farm:
  1. In the Command Prompt, type each of the following commands.
     

$stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate

$stsCert.Export("Cert") | Set-Content  "C:\Users\554pa\ConsumingFarmSTS.cer" -Encoding byte

To export the root certificate from the publishing farm:

  1. In the Command Prompt, type each of the following commands.

$rootCert = (Get-SPCertificateAuthority).RootCertificate

$rootCert.Export("Cert") | Set-Content  "C:\Users\554pa\PublishingFarmRoot.cer" -Encoding byt


To copy the certificates:
  1.  Copy the root certificate and the STS certificate from the server in the consuming farm to the server in the publishing farm.
  2. Copy the root certificate from the server in the publishing farm to a server in the consuming farm.
Managing Trust Certificates:
Establishing trust on the consuming farm:
  1. To import the root certificate and create a trusted root authority on the consuming farm, type the following commands.

$trustCert = Get-PfxCertificate  "C:\Users\554pa\PublishingFarmRoot.cer"

New-SPTrustedRootAuthority "MetadataPublishingFarm" -Certificate $trustCert


Establishing trust on the publishing farm:
  1. To import the root certificate and create a trusted root authority on the publishing farm, type the following commands.

    $trustCert = Get-PfxCertificate  "C:\Users\554pa\ConsumingFarmRoot.cer"

    New-SPTrustedRootAuthority "MetadataConsumingFarm" -Certificate $trustCert

  2. To import the STS certificate and create a trusted service token issuer on the publishing farm, type the following commands.

$stsCert = Get-PfxCertificate "C:\Users\554pa\ConsumingFarmSTS.cer"

New-SPTrustedServiceTokenIssuer  "MetadataConsumingFarm"  -Certificate $stsCert

 

copy the Published URL which should be provided by the consuming farm when connecting to the publishing farm.copy the Published URL which should be provided by the consuming farm when connecting to the publishing farm.copy the Published URL which should be provided by the consuming farm when connecting to the publishing farm.

 

Publish a Service Application:
 

  1. Go to the Central Administration->Application Management->Manage Service Applications.

    22.gif
  2. In the Ribbon click on Publish to create a new Metadata Service.

  3. Publish Service application will be opened.

    23.gif

  4. Select the Connection Type that you want from the drop-down list.

  5. If you want the service application to be available to remote farms, select the check box for Publish this Service Application to other farms.

  6. In the Trusted farms column click the link you could see the trust relationship between farms that we have created

Set permission to the published service application for a consuming farm:
  1. In the publishing farm go to Start menu.
     
  2. Go to SharePoint 2010 Management Shell and select Run as Administrator.
     
  3. In the command prompt, type each of the following commands.

    Get-SPFarm | Select Id

  4. The above command is used to get the farm id.
     

  5. Save the farm id.
     

  6. Go to the Central Administration->Application Management->Manage Service Applications.

    24.gif
     

  7. Click on Managed Metadata Service.

    25.gif
     

  8. In the Ribbon select Permissions.

    26.gif
     

  9. Enter the farm id that you got from step 3 and click Add.
     

  10. In Permissions for Local Farm, select the Full Access to Term Store.
     

  11. Click OK.

Connect to a service application on a remote farm:

  1. In the consuming farm, go to the Central Administration->Application Management->Manage Service Applications.

    27.gif

  2. In the Ribbon click on Connect.

    28.gif

  1. Enter the URL that we got when we published the Managed Metadata Service in the publishing farm.

    29.gif
     
  2. Click OK.

    30.gif
     
  1. Click the Managed Metadata Service and check the Add this service application's proxy to the farm's default proxy list.
     
  2. Click OK.

    31.gif
     
  1. Enter the Connection Name and click OK.
     
  2. Now go and check it in the Central Administration->Application Management->Manage Service Applications.

    32.gif
     
  1. You could see the Service application that we have published in the publishing farm.

Associate the service application connection with a local Web application:

To use the published content type and the Taxonomy that we have created in the publishing farm you need to activate the Content Type Syndication Hub and the taxonomy feature. I have created web application in the consuming farm and I am going to use the published content type and the taxonomy in the root Site Collection of the Web Application that has been created. Follow the steps below.

Steps Involved:

  1. Go to the site collection where you want to use the published content Type Parent Content Type that we have created in the publishing farm.

  2. Go to Site Actions -> Site Settings -> Site Collection Administration -> Site Collection Features.

  3. Activate the feature Content Type Syndication Hub.

  4. Go to Site Actions -> Site Settings -> Galleries ->Site Content Types.

    33.gif

  1. You will not find the content type and you cannot use the taxonomy that we have created.

  2. Go to Site Actions -> Site Settings -> Site Collection Administration -> Site Collection Features.

  3. You will not be seeing Content Type Publishing option.

  4. When you try to use the Managed Metadata column type you may get an error saying "The Taxonomy feature (Feature ID "73EF14B1-13A9-416b-A9B5-ECECA2B0604C") has not been activated".

Activating the Taxonomy Feature using Power Shell:

  1. In the consuming farm go to Start menu.
     
  2. Go to SharePoint 2010 Management Shell and select Run as Administrator.
     
  3. In the command prompt, type each of the following commands.
     

    Enable-SPFeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -URL http://kijs01:4000/

  4. http://kijs01:4000/- is the site collection in the consuming farm.
     
  5. Now you have activated the Taxonomy Feature.
     
  6. Go to Site Actions -> Site Settings -> Site Collection Administration -> Site Collection Features.

    34.gif
     
  7. You will be able to see Content Type Publishing.

    35.gif
     
  8. Click on that you could see the Parent Content Type as shown in the above figure and also you could go to Site Actions -> Site Settings -> Galleries ->Site Content Types.

    36.gif

    37.gif

Summary:

In this document we have created Managed Metadata Service in the publishing farm and we have consumed the data from that in the consuming farm.

COMMENT USING
Employers - Post Free Jobs