- Description
- Setup requirements
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Contributing
The nservicebusservicecontrol module installs and manages Service Control along with Service Control Instances.
ServiceControl is the backend web api used for monitoring and replaying of messages for nservicebus endpoints.
The nservicebusservicecontrol module requires the following:
- Puppet Agent 4.7.1 or later.
- Access to the internet.
- Microsoft .NET 4.6.1 Runtime.
- Windows Server 2012/2012R2/2016.
- (Optional) Silverlight 5 if you want to manage the nservicebusservicecontrol from management studio.
To get started with the nservicebusservicecontrol module simply include the following in your manifest:
include nservicebusservicecontrolThis example downloads, installs, and configures the currently pinned version of the Service Control (3.6.1). After running this you should be able to begin to create service control instances and perform other tasks using the nservicebusservicecontrol::instance defined type.
All parameters for the nservicebusservicecontrol module are contained within the main nservicebusservicecontrol class, so for any function of the module, set the options you want. See the common usages below for examples.
class { 'nservicebusservicecontrol':
package_ensure => 'present',
remote_file_source => 'https://github.com/Particular/ServiceControl/releases/download/3.6.1/Particular.ServiceControl-3.6.1.exe',
}$license_xml = @(LICENSE)
<?xml version="1.0" encoding="utf-8"?>
<license type="Commercial" DeploymentType="Elastic Cloud" Quantity="4" Edition="Enterprise" Applications="All" RenewalType="Subscription" expiration="2020-01-23" Notes="BlueSnap" id="7d26ad59-8805-4da6-8dad-f3540213ca">
...
</license>
LICENSE
class { 'nservicebusservicecontrol':
package_ensure => 'present',
remote_file_source => 'https://github.com/Particular/ServiceControl/releases/download/3.6.1/Particular.ServiceControl-3.6.1.exe',
license_xml => $license_xml,
}nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'RabbitMQ - Conventional routing topology',
connection_string => 'host=localhost;username=guest;password=guest',
}nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'SQL Server',
connection_string => 'Data Source=.; Database=ServiceControl.Development; User Id=svc-servicecontrol; Password=super-secret-password;',
}NOTE: Ensure the database is already created and the user can connect. ServiceControl by default will take care of creating the tables for using as queues.
nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'SQL Server',
connection_string => 'Data Source=.; Database=ServiceControl.Development; Trusted_Connection=True;',
service_account => 'DOMAIN\svc-servicecontrol',
service_account_password => 'super-secret-password',
}NOTE: Ensure the database is already created and the user can connect. ServiceControl by default will take care of creating the tables for using as queues.
nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'MSMQ',
}NOTE: Ensure the MSMQ Windows Feature is is already installed. ServiceControl by default will take care of creating the tables for using as queues.
nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'Azure Storage Queue',
# connection_string => 'UseDevelopmentStorage=true',
connection_string => 'DefaultEndpointsProtocol=https;AccountName=[ACCOUNT];AccountKey=[KEY];',
..
}nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'Azure Service Bus',
connection_string => 'Endpoint=sb://[NAMESPACE].servicebus.windows.net/;SharedAccessKeyName=[KEYNAME];SharedAccessKey=[KEY]',
..
}nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'AmazonSQS',
..
}nservicebusservicecontrol::instance { 'Development':
ensure => 'present',
transport => 'RabbitMQ',
connection_string => 'host=localhost;username=guest;password=guest',
forward_audit_messages => true,
audit_log_queue => 'audit.log',
forward_error_messages => true,
error_log_queue => 'error.log',
}NOTE: If external integration is not required, it is highly recommend to turn forwarding queues off. Otherwise, messages will accumulate unprocessed in the forwarding queue until eventually all available disk space is consumed.
See REFERENCE.md
There is a bug in the New-ServiceControlInstance powershell cmdlet that ships with servicecontrol that causes any failure to not be propogated to the caller correctly. This makes it impossible to determine if the instance creation was successful or failed. Therefore, failed puppet runs could be misleading and the resulting errors might be caused from this situation.
Particular/ServiceControl#1565
Currently there is no implementation to handle upgrading the package after intiail install via this module. In the future it might be helpful to implement the ability to specify an internal chocolatey server the user can use as well as handle upgrades, if possible, when downloading the install file from the public internet.
Neither the Unattended file method or New-ServiceControlInstance powershell cmdlet ( which this modules uses ) cover all the many configuration settings that are available to a ServiceControl Instance. The only mechanism that can be used to utilize all of the available customizations is by specifying them in the "ServiceControl.exe.config" file that resides in the service control instances install directory. If you would like to be able to configure one of these please open up a Github issue.
All documented available settings ( https://docs.particular.net/servicecontrol/creating-config-file )
If you try and a forwarding queue ( error or audit ) after a service control instance is created these queues will not get created. It's therefore your responsibility to manually create these and set them up if you decide to change your mind after a servicecontrol instance has been created. This is a limitation of servicecontrol itself.
I have selectively chosen not to support what appears to be old or deprecated transports. If you need one feel free to open an issue and if your feeling lucky submitting a pull-request.
- Azure Service Bus - Forwarding topology (Legacy)
- Azure Service Bus - Forwarding topology (Old)
- Azure Service Bus - Endpoint-oriented topology (Legacy)
- Azure Service Bus - Endpoint-oriented topology (Old)
- RabbitMQ - Direct routing topology (Old)
- Fork it ( https://github.com/tragiccode/tragiccode-nservicebusservicecontrol/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request