Forge Home

nservicebusservicecontrol

The `nservicebusservicecontrol` module installs and manages the NServiceBus Service Control on Windows systems.

13,909 downloads

145 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.0.0 (latest)
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.9.0
  • 1.8.2
  • 1.8.1
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.2
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
  • 0.3.1
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Jan 24th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'tragiccode-nservicebusservicecontrol', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add tragiccode-nservicebusservicecontrol
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install tragiccode-nservicebusservicecontrol --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

tragiccode/nservicebusservicecontrol — version 0.1.0 Jan 24th 2019

nservicebusservicecontrol

Puppet Forge Puppet Forge

Table of Contents

  1. Description
  2. Setup requirements
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Contributing

Description

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.

Setup Requirements

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.

Beginning with nservicebusservicecontrol

To get started with the nservicebusservicecontrol module simply include the following in your manifest:

include nservicebusservicecontrol

This 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.

Usage

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.

Install a newer/older release of service control

class { 'nservicebusservicecontrol':
  package_ensure     => 'present',
  remote_file_source => 'https://github.com/Particular/ServiceControl/releases/download/3.6.1/Particular.ServiceControl-3.6.1.exe',
}

Install your license

$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,
}

Create a Service Control Instance using the RabbitMQ Conventional Routing Topology Transport

nservicebusservicecontrol::instance { 'Development':
  ensure            => 'present',
  transport         => 'RabbitMQ - Conventional routing topology',
  connection_string => 'host=localhost;username=guest;password=guest',
}

Create a Service Control Instance using the SQLServer Transport ( SQL Authentication )

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.

Create a Service Control Instance using the SQLServer Transport ( Windows Authentication )

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.

Create a Service Control Instance using the MSMQ Transport

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.

Create a Service Control Instance using the Azure Storage Queue Transport

nservicebusservicecontrol::instance { 'Development':
  ensure            => 'present',
  transport         => 'Azure Storage Queue',
  # connection_string => 'UseDevelopmentStorage=true',
  connection_string => 'DefaultEndpointsProtocol=https;AccountName=[ACCOUNT];AccountKey=[KEY];',
  ..
}

Create a Service Control Instance using the Azure Service Bus Transport

nservicebusservicecontrol::instance { 'Development':
  ensure            => 'present',
  transport         => 'Azure Service Bus',
  connection_string => 'Endpoint=sb://[NAMESPACE].servicebus.windows.net/;SharedAccessKeyName=[KEYNAME];SharedAccessKey=[KEY]',
  ..
}

Create a Service Control Instance using the Amazon SQS Transport

nservicebusservicecontrol::instance { 'Development':
  ensure            => 'present',
  transport         => 'AmazonSQS',
  ..
}

Service Control Instance with forward error & audit queues

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.

Reference

See REFERENCE.md

Limitations

Unable to detect failing to create servicecontrol instance

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.

https://github.com/Particular/ServiceControl/issues/1565

Upgrading of the package after initial install

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.

Module is missing some Service Control Instance Configuration settings

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 )

Forwarding queues are created only at servicecontrol instance creation time only

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.

Unsupported transports

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)

Contributing

  1. Fork it ( https://github.com/tragiccode/tragiccode-nservicebusservicecontrol/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request