Particular / ServiceControl

Backend for ServiceInsight and ServicePulse
https://docs.particular.net/servicecontrol/
Other
52 stars 47 forks source link

Document automation to install/update the latest version of ServiceControl Management #2857

Open mikeminutillo opened 2 years ago

mikeminutillo commented 2 years ago

We should document how to install/update the latest version of ServiceControl Management.

We already have documentation for how to automate the installation and upgrading of ServiceControl instances but it relies on you manually installing the latest version of ServiceControl when it is released. This part could be potentially automated as well.

Here is a very simple Powershell script to install the latest release of ServiceControl:

#Requires -RunAsAdministrator

$tag =  (Invoke-WebRequest "https://api.github.com/repos/Particular/ServiceControl/releases" | ConvertFrom-Json)[0].tag_name
$fileName = "Particular.ServiceControl-$tag.exe"
Invoke-WebRequest "https://github.com/Particular/ServiceControl/releases/download/$tag/$fileName" -OutFile $fileName
Start-Process $fileName -Wait -ArgumentList '/quiet'

This could be expanded with error handling and reporting, and then be added to docs.

TraGicCode commented 2 years ago

Hey @mikeminutillo ,

In the documentation ( https://docs.particular.net/servicecontrol/installation ) it mentions an open-source puppet module ( https://forge.puppet.com/modules/tragiccode/nservicebusservicecontrol) I maintain. It not only installs and allows you to configure servicecontrol, When you bump the version it actually performs the instance upgrade automatically as well. This module also has nightly github action runs that pull the latest version of servicecontrol and runs through automated tests ( to check if new versions work ).

There are also automated tasks for doing some administrative work such as:

  1. Re-importing failed error and audit messages
  2. Compacting the RavenDB Database

While i know not every company is using puppet, other configuration management tools pretty much work the same ( chef, ansible..etc ). This means, anyone can take a peak at that module and implement the same thing in their configuration management tool of choice.

The same can also be done with raw powershell, like you have, but i would think most companies are rarely using raw powershell and more likely using some sort of configuration management tool in order to utilize configuration as code, prevent drift, and report on compliance.

Creating an ansible module is also on my radar so this might be coming soon.

TraGicCode commented 2 years ago

As a side note, while interesting, you all currently do not have automated tests with servicecontrol installation, configuration, and upgrades. Since this puppet module is doing that nightly and always on the latest version that is published, the work has technically been done for you all already. While the tests don't live here that are indeed exercising the latest changes work as expected for new users with a high level of confidence.