The following procedure is a high level guide on how to deploy ServiceControl onto a Microsoft fault tolerance Windows cluster. This guide assumes that MSMQ is the underlying transport.
- Set up a Failover (active/passive) Windows cluster:
- Creating a Cluster in Windows Server 2008
- Creating a Cluster in Windows Server 2012R2
- Install ServiceControl on each node adding it as a "Generic service" using the cluster manager. This means that ServiceControl will fail over automatically with the cluster.
- Set up a MSMQ Cluster Group. Cluster Group is a group of resources that have a unique DNS name and can be addressed externally like a computer.
- Add the ServiceControl generic clustered service to the MSMQ Cluster Group:
- Make it depend on MSMQ and MSMQ network name;
- Check "use network name as computer name" in the service configuration;
Once set up ServiceControl queues will be available on the cluster. The server name will be the MSMQ network name, not to be confused with the cluster name.
More information on Message Queuing in Server Clusters.
The RavenDB database needs to be located in shared storage that is highly available and fault tolerant. Shared storage does not mean a shared network share but shared cluster storage. Access to the data should always be 'local' althought physically that data could be stored on a SAN. When this disk is mounted RavenDB needs to be configured to use that location. See Customize RavenDB Embedded Location for more information on how to change the ServiceControl database location.
Once the Failover cluster is created and ServiceControl is installed, the next step is to configure ServiceControl to run in a clustered environment.
ServiceControl exposes an HTTP API that is used by ServicePulse and ServiceInsight. URL ACL(s) need to be defined on each cluster node. The URL needs to be the
cluster name and the ACL is set to give permissions to the
Service Account running ServiceControl.
localhostonly. Once the URL ACL is changed from
cluster nameServiceControl is accessible from the network.
ServiceControl configuration needs to be customized changing the following settings:
DbPathto define the path to the shared location where the database will be stored;
portneed to be updated to reflect
errorqueues need to be updated to include the
The following is a sample ServiceControl configuration file (ServiceControl.exe.config):
<configuration> <appSettings> <add key="ServiceControl/DbPath" value="drive:\SomeDir\" /> <add key="ServiceControl/Hostname" value="clusterName" /> <add key="ServiceControl/Port" value="33333" /> <add key="ServiceBus/AuditQueue" value="audit@clusterName" /> <add key="ServiceBus/ErrorQueue" value="error@clusterName" /> <add key="ServiceBus/ErrorLogQueue" value="error.log@clusterName" /> <add key="ServiceBus/AuditLogQueue" value="audit.log@clusterName" /> </appSettings> </configuration>
See Customizing ServiceControl Configuration for more information.