Sunday, November 18, 2012

Deploying Lync Server 2013 Persistent Chat Server

One of the semi new features I’ve been interested in since Lync Server 2013 was initially announced was the new Persistent Chat Server that replaces the Group Chat server.  Those who have worked with the older version of Group Chat would know that the feature doesn’t really feel like it’s tightly integrated with Lync and administration can sometimes feel a bit clumsy at times.  With that being said, I’ve seen several clients who have had success with the feature in their environment so I’m anxious to test it out now that Lync Server 2013 has RTM-ed.  This blog post will serve to demonstrate the deployment process and what the new Persistent Chat looks like.

SQL and File Store Requirements

Similar to the Lync Server 2010 front-end server, a SQL backend database and file share is required for the Persistent Chat Server.  The backend database is used to store chat history, configuration, user provisioning data and if the compliance option is selected, a Persistent Chat compliance database to store compliance data:

Technical Requirements for Persistent Chat Server
http://technet.microsoft.com/en-us/library/gg398495.aspx

image

Microsoft recommends to install a dedicated backend database server for the Persistent Chat Server but for smaller deployments, it is supported to have the database collocated on the same SQL backend database as the front-end server.  For the purpose of this example, we’ll be using the same backend database as the front-end server.

In addition to the backend database, a file share is also needed for a repository to store uploaded files so prior to the deployment of the server, create a file share on the preferred file server of your choice and share out the folder.

Define New Persistent Chat Server in Topology Builder

Prior to installing the new Persistent Chat Server we’ll need to define the new server in the topology so begin by launching Topology Builder and downloading the existing topology:

image

Define file store share:

Continue by right clicking on the File stores node to define a new store for the Persistent Chat Server:

image

image

image

Define New Persistent Chat Pool:

With the file store defined, proceed with creating the new Persistent Chat Pool:

image

image

We won’t be enabling compliance in this demonstration so leave the checkbox unchecked:

image

Since we’ll be using the same backend database as the front-end server, select that instance for the SQL Server store:

image

Continue by selecting the file store previously defined for the Persistent Chat Server:

image

Select the appropriate Lync Server 2013 pool for the next hop:

image

image

With the new Persistent Chat Server pool defined, proceed with publishing the topology:

image

image

Note that the Persistent Chat Server backend databases will automatically created and if you choose to let the wizard automatically determine where to put the database, ensure that the drives have more than 12GB of space or the creation of databases will fail (I increased the C drive by 5GB to a total of 17GB):

image

image

image

image

Once the topology successfully publishes, you should see the following 2 folders created in the file store:

  • 1-PersistentChatService-9
  • 1-PersistentChatService-10

image

You should also see a new database named mgc created on the backend SQL server:

image

Install Prerequisites

While the documentation for deploying the Persistent Chat server:

Deploying Persistent Chat Server
http://technet.microsoft.com/en-us/library/jj205357.aspx

image

… does provide quite a bit of information, it isn’t exactly as detailed as the front-end server role because all it says for prerequisites is the following:

The prerequisite software for Persistent Chat Server is the same as the prerequisite software for the Lync Server 2013 Front End Servers and the Lync Server 2013 Standard Edition server on which Persistent Chat Server features are installed.

The prerequisite software required for the Persistent Chat Server file store is the same as that for Lync Server 2013.

The prerequisite software for the SQL Server databases for Persistent Chat Server content and compliance is also the same as that for Lync Server 2013.

image

Assuming this means exactly what it reads then all we need to do is repeat the installation and configuration of the prerequisites we used for the front-end server:

Install Windows Roles and Features (including MSMQ):

Rather than manually going through Server Manager to install the roles and features, the following PowerShell cmdlets can be used to automatically install all of them.

Import-Module ServerManager

Add-WindowsFeature Web-Server, Web-Static-Content, Web-Default-Doc, Web-Scripting-Tools, Web-Windows-Auth, Web-Asp-Net, Web-Log-Libraries, Web-Http-Tracing, Web-Stat-Compression, Web-Default-Doc, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Errors, Web-Http-Logging, Web-Net-Ext, Web-Client-Auth, Web-Filtering, Web-Mgmt-Console, Web-Dyn-Compression, Web-Mgmt-Console, Desktop-Experience, msmq-server,msmq-directory

image

Restart the server once the executation of the cmdlet completes.

 

Install Microsoft .NET Framework 4.5:

Proceed with downloading and installing Microsoft .NET Framework 4.5 from the following URL:

http://www.microsoft.com/en-us/download/details.aspx?id=30653

Note that the link provided in the message prompt when you attempt to launch the Lync Server 2013 setup but don’t have Microsoft .NET Framework 4.5 installed is:

http://go.microsoft.com/fwlink/?LinkID=264944

image

Install PowerShell 3.0:

Continue and PowerShell 3.0 from the following URL: http://www.microsoft.com/en-us/download/details.aspx?id=34595

There’s a list for 4 items for download and the way to determine which one you’re supposed install is actually noted at the bottom. Since we’re installing PowerShell 3.0 onto a Windows Server 2008 R2 SP1 server, proceed by downloading the following file:

WINDOWS6.1-KB2506143-x64.MSU

image

Install Windows Identity Foundation:

Continue and Windows Identity Foundation from the following URL: http://www.microsoft.com/en-us/download/details.aspx?id=17331

Windows6.1-KB974405-x64.msu

image

Launch Setup:

Launching the Setup.exe executable for the Lync Server 2013 binaries will automatically install Microsoft Visual C++ 2012 x64 Minimum Runtime – 11.0.50727 Package so don’t bother downloading it:

image

Install the Microsoft Visual C++ 2012 x64 Minimum Runtime – 11.0.50727 Package:

image

The setup wizard will be presented to you once the Microsoft Visual C++ 2012 x64 Minimum Runtime – 11.0.50727 Package is installed:

image

Proceed by through through the installation wizard:

image

image

image

Deploying the Persistent Chat Server

Install Local Configuration Store:

With the Central Management Store populated with the new topology, proceed by launching the Lync Server 2013 – Deployment Wizard on the front end server, click on the Install or Update Lync Server System link:

image

… then the Run button for Install Local Configuration Store:

image

image

Setup Lync Server Components:

Once the local configuration store has been installed, proceed with installing the Lync Server Components:

image

image

image

Request, Install and Assign Certificates:

Once the Lync Server components have been installed, proceed with requesting, installing and assigning certificate for the server:

image

image

image

image

image

image

image

image

**Note that you can either create the certificate as exportable or not. I prefer to have an exportable certificate so I could back it up.

image

image

image

image

image

image

image

image

image

image

image

Start Services:

With the certificates issued and assigned, proceed with starting the services:

image

image

Check Service Status:

Every though the last step Service Status is listed as option, it’s always best to perform it anyways to ensure that all the services are listed as Started:

  • Lync Server Centralized Logging Service Agent
  • Lync Server Persistent Chat
  • Lync Server Replica Replicator Agent

image

image

Adding a Persistent Chat Administrator

The deployment of the Persistent Chat Server should automatically create CsPersistentChatAdministrator group that is used to grant administrators permissions to administer the Persistent Chat Server. Proceed by adding the user account or accounts that will be used for administration:

image

Configuring Persistent Chat Server

With the appropriate permissions granted to users who will be administering the Persistent Chat Server, proceed by launching the Lync Server 2013 Control Panel to configure the following:

  • Configure the Global Policy for Persistent Chat
  • Create a Site Policy for Persistent Chat
  • Create a User Policy for Persistent Chat
  • Apply a Persistent Chat Policy to a User or User Group

I won’t actually be creating policies for sites or users but rather just simply enable it in the default Global policy as shown in the following:

image

image

image

For more information on how to configure policies for more granular control, see the following:

Enable Persistent Chat Server Policy
http://technet.microsoft.com/en-us/library/jj205056.aspx

image

Persistent Chat Configuration:

Several configuration parameters are available for each Persistent Chat policy created.  We won’t be changing the defaults of the global policy we’ll be using but the following are the settings available:

image

image

Configure a Category for Persistent Chat:

Before we can create rooms, we need to configure categories so proceed to click on the Category node in the Lync Server 2013 Control Panel:

image

From within the Category window, click on the New button to create a new Category:

image

Continue by selecting the service and then click the OK button:

image

In the New Category window, type in a name for the Name field and check the following:

  • Enable invitations
  • Enable file upload
  • Enable chat history

In the Allowed members section, add users who you want to be members of the category:

image

Scrolling down the window will reveal sections to add denied members and creators:

image

Proceed with adding the members you want grant permissions for creating rooms and then click on the Commit button to apply:

image

From within the Lync Client of the members that were added to the category, we should see an additional icon:

image

**Note: Try logging off and on the Lync client if the Chat Room icon isn’t shown.

Clicking on the Chat Room icon will bring up the following window that usually lists rooms the user is in but since we don’t have any rooms configured, we’ll proceed to click on the + icon to create one:

image

Clicking on the + icon and the Create a Chat Room… button will launch the browser to the following page:

image

Continue by clicking on the Create A New Room button:

image

Fill in the required fields, add the members you would like to be a part of the chat room and then click on the Create Room button to create the room:

image

image

With the room created, you should now notice a notification in the Lync Clients of the users who were added as members indicating that they jave a new chat room invite:

imageimage

image

Double clicking on the new list item will bring up the window for the chat room:

image

Creating Chat Rooms with PowerShell:

If administrators want to maintain more control on what rooms can be created thus not granting users the ability to create rooms, PowerShell can be used instead to create rooms.  The full list of available cmdlets are available in the following URL:

Configuring Persistent Chat Server by Using Windows PowerShell Cmdlets
http://technet.microsoft.com/en-us/library/jj204877.aspx

image

The following is an example of a cmdlet that will create a new chat room named PowerShell Talk

New-CsPersistentChatRoom -Name “PowerShell Talk” -PersistentChatPoolFqdn svr-lyncpc-01.ccs.int -Category “Test Category”

image

With the room created, we can add users with the following cmdlet:

Set-CsPersistentChatRoom -Identity “PowerShell Talk” -Members @{Add="sip:tluk@ccs.bm", “sip:LyncTest@ccs.bm”}

image

The user you added as a member to the room should now see a new chat room available:

image

To remove the room that was just created PowerShell, use the following cmdlet:

Remove-CsPersistentChatRoom -Identity “PowerShell Talk”

image

9 comments:

H Limbada said...

Hi
Hope you're well. Is it possible to deploy persistent chat on the frontend? I have a lab setup with a single server, and was wondering if it can just be added to that and how?

Any help will be appreciated.

Regards

H Limbada

Ross Taylor said...

Interesting Post Terence. Thank you for sharing your knowledge of deploying lync server and persistent chat server with us. It's been so helpful for me to understand deploying techniques. Theory dint give me so much information than pictures. Pictures have helped me out to work easily. Your articles show that you have great knowledge about servers. I request you to keep posting such information. All the Best. Servers Market Analysis

Anonymous said...

Hi H Limbada

Yes you can deploy persistent chat on STANDARD FE servers and use SQLexpress local instance.

Regards Corlin

BRAINPLAN said...

Hi!

I'm struggling to find information if rooms hosted in persistent chat can be accessed by employees working at home (i.e via the edge / reverse proxy).

Does anyone know if this is possible?

Thanks in advance,

Ed

Terence Luk said...

Ed: Yes, persistent chat rooms can be accessed by users who work from remote and connect via the Edge server.

Daniel said...

Hi Terence,
Great article. I have persistent chat on a FE server and I also have a Edge server in my deployment. However, persistent chat does not work for users outside of our internal network.

What is required for the chat to work via the Edge server? Port openings?

BR
Daniel

Pietro Ciaccio said...

Thanks for the above post.

I am using clear-cspersistentchatroom to clear down old chat messages in the mgc database.

I can't find anything on how to define a retention age or to clear down old history in the persistent chat compliance database, i.e. mgccomp. Any ideas?

Any help greatly appreciated.

Parthiban said...

Hi,

Is it possible to have PC installed on Director server?

Richard Ojeleye said...

Hi Daniel, BrainPlan

Any updates regarding being able to access rooms from outside the internal network ? At the moment I am getting an error message that says "your chat rooms may be limited due to an outage" however when I connect via VPN or back in the office the rooms appear.