Configuring The Service Bus Workflow Farm

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

This post is related to currently named Windows Azure Workflow 1.0. I describes how to configure the Workflow Host farm.

If you chose to create the farm, the configuration wizard will create three required databases:

Management Database
Resource Management Database
Instance Management Database

At this step you don’t have to change anything.

image

Then enter credentials of the user who will run hosting processes.
As a certificate generation key enter some typical password and remember it!!!

image

After all configure required TCP and HTPP management ports. I would recommend to leave them at default.

image

In the next step Service Bus farm settings be configured. First of all following databases will be created:

-Farm Management Database
-Gateway Database
-Message Container Database

image

Then like in previous step service account. It is good to know that the wizard will automatically after you have entered the user name, check if the user exists.
Also enter the password for certificate generation key. This can be a different one that in a case of Workflow Host.

image

At the end you will have to enter TCP and HTTP port of the Service Bus server and the admin group name.

image

Before the farm is configured you will get a summary:

image                image

You are finished if you see following:

image

How do all this with PowerShell?

Following script is exactly executed by Wizard:

# To be run in Workflow PowerShell Console which has both Workflow and Service Bus installed.

# Create new SB Farm
$SBCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText  -Force  -String '***** Replace with Service Bus Certificate Auto-generation key******';


New-SBFarm -FarmMgmtDBConnectionString 'Data Source=HOSTInitial Catalog=SbManagementDB;Integrated Security=True' -PortRangeStart 9000 -TcpPort 9354 -RunAsName 'appfabricserviceuser@DOMAIN-AdminGroup 'BUILTIN\Administrators' -GatewayDBConnectionString 'Data Source=HOST;Initial Catalog=SbGatewayDatabase;Integrated Security=True' -CertAutoGenerationKey $SBCertAutoGenerationKey -ContainerDBConnectionString 'Data Source=Auxo.DAENET.LAN;Initial Catalog=SBMessageContainer01;Integrated Security=True';

# To be run in Workflow PowerShell Console which has both Workflow and Service Bus installed.

# Create new WF Farm
$WFCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText  -Force  -String '***** Replace with Workflow Certificate Auto-generation key******';


New-WFFarm -FarmMgmtDBConnectionString 'Data Source=HOST;Initial Catalog=WFManagementDB;Integrated Security=True' -RunAsName 'appfabricserviceuser@DOMAIN' -AdminGroup 'BUILTIN\Administrators' -HttpsPort 12290 -HttpPort 12291 -InstanceMgmtDBConnectionString 'Data Source=HOST;Initial Catalog=WFInstanceManagementDB;Integrated Security=True' -ResourceMgmtDBConnectionString 'Data Source=HOST;Initial Catalog=WFResourceManagementDB;Integrated Security=True' -CertAutoGenerationKey $WFCertAutoGenerationKey;

# Add SB Host
$SBRunAsPassword = ConvertTo-SecureString -AsPlainText  -Force  -String '***** Replace with RunAs Password for Service Bus ******';


Add-SBHost -FarmMgmtDBConnectionString 'Data Source=Auxo.DAENET.LAN;Initial Catalog=SbManagementDB;Integrated Security=True' -RunAsPassword $SBRunAsPassword -CertAutoGenerationKey $SBCertAutoGenerationKey;

Try
{
    # Create new SB Namespace
    New-SBNamespace -Name 'WorkflowDefaultNamespace' -AddressingScheme 'Path' -ManageUsers 'appfabricserviceuser@HOST','svcuser@DOMAIN';

    Start-Sleep -s 90
}
Catch [system.InvalidOperationException]
{
}

# Get SB Client Configuration
$SBClientConfiguration = Get-sbclientConfiguration -Namespaces 'WorkflowDefaultNamespace';

# Add WF Host
$WFRunAsPassword = ConvertTo-SecureString -AsPlainText  -Force  -String '***** Replace with RunAs Password for Workflow ******';


Add-WFHost -FarmMgmtDBConnectionString 'Data Source=HOST;Initial Catalog=WFManagementDB;Integrated Security=True' -RunAsPassword $WFRunAsPassword -SBClientConfiguration $SBClientConfiguration -EnableHttpPort  -CertAutoGenerationKey $WFCertAutoGenerationKey;

 

How to join an Existing Farm?

Joining to an existing farm is more or less trivial operation, at least from point of view of configuration. You have to provide database host name, credentials and generation keys for Workflow Host and Service Bus.

image image

Note that jonining process does not create databases. Instead it joins the node to farm described by set o existing databases.

What if something goes wrong?

During creation of the farm some things can go wrong. Here is one example which shows how my configuration wizard failed to add the host to the farm.

image
When something similar happen it can be that installation state remains inconsistent. Assuming the databases have been created which is probably the case, you can join the farm as described in the previous topic.
If this does not work,  start configuration wizard again

image 

and this time leave the farm:

image

After that I also stopped all services:
image

and delete all created databases in SQL Management Studio. After that you can start fresh new configuration by selecting Create New Farm.


Posted Jul 12 2012, 07:40 AM by Damir Dobric
Filed under: , , , ,

Comments

Keischa wrote re: Configuring The Service Bus Workflow Farm
on 10-31-2012 0:00

Pefrcet shot! Thanks for your post!

developers.de is a .Net Community Blog powered by daenet GmbH.