Share via


Configure a Server Farm for AppFabric

The following steps show one possible scenario for setting up Microsoft AppFabric 1.1 for Windows Server on a server farm.

For the purpose of this example, we will be using the domain corp.contoso.com.

Important

This installation requires you to have at least one computer running Active Directory as well as one computer running database software, such as SQL Server, in addition to the computers that will make up the AppFabric server farm.

Step One: Prepare the Domain

AppFabric has a specific security model that will help you secure your installation. The first step is to prepare your domain with the appropriate Windows groups and users to satisfy the AppFabric security model. For this example we will use the following groups and user accounts.

AppFabric role Group User

Administrators

AS_Administrators

dubAdmin

Users

AS_Users

dubUser

Observers

AS_Observers

dubObserver

Use the built-in Active Directory management tools to create these user groups and accounts.

Note

Because the users assigned to AS_Administrators will be used to run services in the various computers in the AppFabric farm, the “Logon as a Service” privilege must be granted to this group and enforced in the domain.

Step Two: Install AppFabric

See the topics earlier in this document for installing AppFabric software prerequisites on your target computers.

Next, review the information in the Automated Installation (AppFabric 1.1 Caching) topic, and use the following command to install AppFabric on the target computers:

%Download Location%\start /w setup.exe /i

where %Download Location% is the path to the AppFabric setup executable.

This command will perform an AppFabric installation using a “Neutral” configuration. In this case the Event Collection service and Workflow Management service will be installed and configured to use the Local Service account, no databases will be configured, and no behavior configuration will be added to the computer.

Note

You can automate this process by using a script or the Sysprep utility.

If you are using the Shared Configuration feature of IIS 7.0 to share configuration and encryption keys from a central location, you will have to disable Shared Configuration for installation, and then re-enable it. For more information about the Shared Configuration feature, see Configuring Shared Configuration (IIS 7) (https://go.microsoft.com/fwlink/?LinkId=178477).

To install AppFabric when Shared Configuration is enabled in IIS

  1. Disable Shared Configuration on all sharing computers.

  2. Install AppFabric on each sharing computer.

  3. To re-enable Shared Configuration on all sharing computers, first create a shared folder.

  4. For one computer in the network, export the configuration for sharing to the shared folder.

  5. For that computer, enable Shared Configuration to point to the shared folder.

  6. Repeat steps 4 and 5 for the other computers in the network.

Step Three: Prepare the Databases

Database preparation can be performed by using the AppFabric UI tools, Windows PowerShell cmdlets, or provided T-SQL scripts. We will use the Windows PowerShell cmdlets in this example. For the purpose of this example we will assume we want our databases to be created on a computer running database software, such as SQL Server, named SQLBox, and that the user executing the cmdlets has sufficient privileges to create a database and grant access permissions to it. The databases being created will be called monitoringDB and persistenceDB respectively.

  • Prepare the monitoring database by using the Initialize-ASMonitoringDatabase cmdlet:

    Initialize-ASMonitoringSqlDatabase –Database “monitoringDB” –Admins “corp\AS_Administrators” –Readers “corp\AS_Observers” –server “SQLBox” –Writers “corp\AS_Users”

  • Prepare the persistence database by using the Initialize-ASMonitoringDatabase cmdlet:

    Initialize-ASPersistenceSqlDatabase –Admins “corp\AS_Administrators” –Database “persistenceDB” –Readers “corp\AS_Observers” –server “SQLBox”

For more information about the AppFabric Windows PowerShell cmdlets, see AppFabric Cmdlets Overview (https://go.microsoft.com/fwlink/?LinkId=178308).

Note

Database preparation can be performed at any point, independent of the installation or configuration process.

Step Four: Configure AppFabric

You can configure AppFabric by using the AppFabric Configuration Wizard and Windows PowerShell cmdlets for AppFabric. In this example we will use a combination of the tools to achieve the desired configuration.

To configure AppFabric on a farm

  1. If SQL Server has not yet been initialized and configured, do so. How you proceed depends upon the permissions you have in the SQL Server database.

    • If you do not have total control over the SQL Server computer, ask the DBA to create empty monitoring and persistence databases, and give you the names of the server and the databases. You will need these when running AppFabric configuration. Ensure that the DBA adds you to the dbcreator role for that database. This allows you to initialize the databases, but does not give you full permissions as sysadmin.

    • If you are sysadmin on the SQL Server computer, run the initialization cmdlets below to ensure that the databases are properly created and initialized. When you run the Initialize-ASPersistenceSqlDatabase and Intialize-ASMonitoringSqlDatabase cmdlets, specify that the domain accounts that you previously created are parameters to the roles as specified below.

  2. Update the Event Collection service configuration on the AppFabric server computer. The Event Collection service by default is running under the Local Service identity. For it to have access to the remote database, the user credentials must be changed to use “corp\dubAdmin”.

  3. Update the Workflow Management service configuration on the AppFabric server computer. The Workflow Management service by default is running under the Local Service identity. For it to have access to the remote database, the user credentials must be changed to use “corp\dubAdmin”.

  4. Update the AppFabric default application pool configuration. By default AppFabric runs under the Network Service identity. For it to have access to the remote database, you must change the user credentials to “corp\dubUser”.

  5. Use the following procedure in the AppFabric Configuration Wizard to add the connection strings to the root Web.config file:

    • Click Start, and then click Configure AppFabric.

    • On the Before You Begin page of the AppFabric Configuration Wizard, click Next.

    • On the Configure Hosting Services page, select Set monitoring configuration or Set persistence configuration.

    • Select the appropriate provider (System.Data.SqlClient for monitoring or sqlStoreProvider for persistence), and then click Configure.

    • Click Register AppFabric monitoring (or persistence) store in root web.config.

    • Select a database, and then click OK.

  6. Use the following cmdlets to set the default behaviors for monitoring and persistence:

    • $Monitoring_ConnectionStringName = "monitoringDB"

    • $Monitoring_MonitoringLevel = "HealthMonitoring"

    • $Persistence_ConnectionStringName = "persistenceDB"

    • Set-ASAppMonitoring -MonitoringLevel $Monitoring_MonitoringLevel -ConnectionStringName $Monitoring_ConnectionStringName -Root

    • Set-ASAppSqlServicePersistence -ConnectionStringName $Persistence_ConnectionStringName -Root -HostLockRenewalPeriod "00:00:20" -InstanceEncodingOption "GZip" -InstanceCompletionAction "DeleteNothing" -InstanceLockedExceptionAction "BasicRetry"

For additional detailed information on how to configure a Web farm for Microsoft AppFabric 1.1 for Windows Server, see the Windows Server AppFabric Web Farm Guide.

  2012-09-12