Getting Started with Service Bus for Windows Server 1.1
This section describes how to install Service Bus for Windows Server locally and set configuration options. Once Service Bus for Windows Server is running, you can follow a tutorial that shows how to create a queue, as well as some basic messaging operations. To start developing an application, see Tutorial.
Install Service Bus for Windows Server
This section describes the basic steps required to set up Service Bus for Windows Server. Note the following prerequisites:
All SQL instances are placed in a local SQL Server.
The SQL Browser service must be enabled and running.
TCP/IP must be enabled. This includes disabling the firewall on a specific port and enabling SQL Browser services.
If you had an earlier version of the Service Bus installed, refer to the Upgrading Service Bus topic later in this manual.
If you had previously installed Service Bus, make sure the following databases are deleted: SBGatewayDatabase; SBManagementDB; ServiceBusDefaultContainer.
Services run with the current user credentials.
The installation script requires a domain account.
The Service Bus uses an auto-generated certificate.
Note
This getting started tutorial assumes you are not updating an existing Service Bus for Windows Server farm running Service Bus for Windows Server 1.0.
Installing Service Bus
First, be sure to uninstall any existing Windows Fabric services as well as Service Bus. Then, do the following:
Using a Web Platform Installer public feed
Install the Microsoft Web Platform Installer 4.6 from here.
Start the Web Platform Installer. Under Products, click Windows Azure and search for Windows Azure Service Bus 1.1.
Configure Service Bus for Windows Server
Configuring Service Bus using the Configuration Wizard
The steps required to configure a Service Bus for Windows Server 1.1 farm are similar to the ones specified here.
After the Web Platform Installer finishes, you can start the Service Bus configuration wizard. Use the following procedure:
From the Start menu, click All Programs. Then click Service Bus 1.1. Click Service Bus Configuration to start the Service Bus configuration wizard.
The configuration wizard guides you through configuring a new Service Bus farm (cluster of servers), joining an existing farm, or leaving a farm that you have already joined. This getting started tutorial walks you through the farm creation process, with default settings.
The Service Bus configuration wizard uses the Service Bus PowerShell cmdlets for all the operations. You can use the wizard to set your farm properties, and then export the generated cmdlet script for future use. You cannot use the wizard to modify settings or to perform operations after the farm is created.
Click Using Default Settings (Recommended). The New Farm Configuration dialog appears.
In the SQL SERVER INSTANCE text box, the name of the SQL Server instance on the current computer appears by default. To specify a different SQL Server, type the complete name of the SQL Server instance that will host the databases for the farm. To verify that the instance name you have entered points to a valid instance, click Test Connection. If the connection is made correctly, a green check mark icon appears next to the button. If an error occurs, a message is displayed in the wizard.
Under Configure Service Account, your user ID appears in the USER ID text box to identify the user account under which services run. Enter the password for that user ID in the PASSWORD text box. The wizard validates the user ID and password combination, and if it finds an error, notifies you to re-enter the user ID and password. The same user credentials are used for all Service Bus services.
Under Certificate Generation Key, enter a key in the first text box, and then re-enter it in the text box under CONFIRM CERTIFICATE GENERATION KEY to confirm the first key you entered. Record the key for future use; you must provide it every time you add a computer to this farm. The configuration cmdlets use this key for generating certificates. You can specify a custom certificate with the custom settings option.
The Enable firewall rules on this computer check box enables you to indicate whether you are interested in allowing the configuration wizard to create firewall rules. Uncheck this box only if Service Bus clients (your application) will run on the same server as Service Bus.
If you want the Service Bus farm to be managed in the Windows Azure Pack portal, click Manage this farm with the Service Bus Management Portal.
Set the username\password (not domain-joined user) for the portal to communicate with Service Bus. Note that you are required to provide two different sets.
Note
The configuration wizard enables you to specify the parameters that are required for the Windows Azure Pack site to connect to Service Bus. If you plan to connect the Service Bus for Windows Server farm to the Windows Azure Pack site, you must configure two sets of usernames and passwords, which are used to secure the API calls between the portal and the Service Bus for Windows Server farm.
Note
The authentication between Service Bus and the Windows Azure Pack site is not based on Windows authentication. Therefore, when entering usernames and passwords, do not enter domain users (for both the admin and the tenant APIs).
Click Next. The wizard displays the Summary screen, which lists the values that you entered, along with the default values for the remaining configuration options. The screen also displays the configuration options and values for the entire farm, and for Service Bus for Windows Server 1.0 individually. The wizard also validates that the configuration values are valid for this computer. With any error, the wizard displays the error page and does not allow you to proceed further. You can either go back to change the configuration that is causing the error or, if possible, fix the error outside the wizard.
For some errors, it may not be possible to continue with the default configuration. For example, if the default port used for Service Bus for Windows Server 1.0 management is blocked by an application, it may not be possible to unblock it. If it is not possible to continue with the default configuration, you must create a new farm with custom settings.
Tip
If there are any errors that you fix outside the wizard, you can use the re-validate button to validate the configuration again.
Tip
If you want to configure Service Bus for Windows Server using PowerShell, you can generate a script based on the current configuration on this page by clicking Get PowerShell Commands.
Click Apply to approve the listed options, create the new farm, and add the server to the new farm. Click Back to return to the New Farm Configuration page and change the entries you have made.
Configure Service Bus in the Windows Azure Pack Admin Site
After a Service Bus for Windows Server farm is configured, you can connect it to a Windows Azure Pack management site to enable administrators and tenant to use Service Bus for Windows Server using the Windows Azure Pack tenant site.
You can start by setting up the Windows Azure Pack admin site or install it after you have configured the Service Bus for Windows Server farm.
Note
Service Bus namespaces created with the Service Bus administrators PowerShell cmdlet (New-SBNamespace
) do not appear in the Windows Azure Pack tenant site.
Install and configure the Windows Azure Pack admin site. See the Windows Azure Pack deployment guide here.
Browse to the Windows Azure Pack Service Management Portal. Click New and then click Service Bus Clouds followed by Connect To.
Provide a friendly, unique name by which the Service Bus cloud will be identified in the Windows Azure Pack site.
Enter the Resource Provide endpoint of your farm. It should be similar to this:
https://<ServiceBusFQDN>:9359
Enter the administrator and tenant username and password you provided when creating the farm (either in the new-sbFarm cmdlet or within the Service Bus for Windows Server configuration wizard).
When you are successfully authenticated by the Service Bus for Windows Server farm, you can see the newly created Service Bus for Windows Server cloud in the Windows Azure Pack site.
Provision a Service Bus Namespace Using the Windows Azure Pack Site
Create a plan that includes Service Bus in the Windows Azure Pack administrator site. Do the following:
In the Windows Azure Pack admin portal, click Plans, and then click Create Plan.
Enable Service Bus in the newly created plan. Select the Service Bus cloud which will be offered as part of the plan.
So that a tenant can use it, set the plan to be a public plan. Or, set an invitation code.
Make sure to set the plan to allow unlimited subscriptions.
Configuring Service Bus using PowerShell
The first step is to choose a password to use when generating the certificate. Note that these steps must be executed in a Service Bus PowerShell command window. Create a secure string with your password.
Choose a password to use when generating the certificate. Issue the following command:
$mycert=ConvertTo-SecureString -string <Password> -force -AsPlainText
Create a farm:
New-SBFarm –SBFarmDBConnectionString "data source=localhost\sqlexpress;integrated security=true" –CertificateAutoGenerationKey $mycert
Add a host to the farm
Add-SBHost -CertificateAutoGenerationKey $mycert -SBFarmDBConnectionString "data source=localhost\sqlexpress; integrated security=true"
Note
You will be prompted for your password.
Check status of the farm
Get-SBFarmStatus
The expected result should be similar to the following:
HostName ProcessName Status -------- ----------- ------ ... Service Bus Gateway Running ... Service Bus Message Broker Running ... FabricHostSvc Running
Create your first service namespace
New-SBNamespace –Name DemoSB –ManageUsers yourDomain\yourUsername
The expected result should be similar to the following:
Name : <Namespace Name> AddressingScheme : Path CreatedTime : 5/1/2012 5:30:49 PM IssuerName : <Namespace Name> IssuerUri : <Namespace Name> ManageUsers : {<domain\user>} Uri : ServiceIdentifier : PrimarySymmetricKey : <GUID> SecondarySymmetricKey :
If you need to reset the auto-generated key, issue the following PowerShell command:
Set-SBCertificateAutoGenerationKey –SBFarmDBConnectionString "data source=<hostname>\sqlexpress;integrated security=true"
Provision a Service Bus Namespace Using PowerShell (No Windows Azure Pack)
Check to see if you have created a service namespace by issuing the following Get-SBNamespace PowerShell command:
Get-SBNamespace
If no service namespace exists, create one by issuing the following New-SBNamespace PowerShell command:
New-SBNamespace -name DemoSB -ManageUsers yourDomain\YourAccount
This command creates a Service Bus service namespace named “DemoSB”.
Retrieve the Service Bus connection string by issuing the following Get-SBClientconfiguration PowerShell command:
Get-SBClientconfiguration –namespace DemoSB
Build Date:
2013-10-18