Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.09k stars 648 forks source link

Setup recovery to "restart service" when installing the windows host #1229

Closed andreasohlund closed 10 years ago

andreasohlund commented 11 years ago

Does TopShelf support this? Can we use sc.exe?

http://technet.microsoft.com/en-us/library/cc742019(v=ws.10).aspx

SimonCropp commented 11 years ago

see the bottom of this page http://docs.topshelf-project.com/en/latest/configuration/config_api.html

johnsimons commented 11 years ago

New version of TS does support it but not an easy update! And I don't see much value in keeping TS around either. I think is time for Host v2 :)

On Friday, June 7, 2013, Andreas Öhlund wrote:

Does TopShelf support this? Can we use sc.exe?

http://technet.microsoft.com/en-us/library/cc742019(v=ws.10).aspx

— Reply to this email directly or view it on GitHubhttps://github.com/NServiceBus/NServiceBus/issues/1229 .

Regards John Simons NServiceBus

johannesg commented 11 years ago

This should be configurable IMHO.

2013/6/7 John Simons notifications@github.com

New version of TS does support it but not an easy update! And I don't see much value in keeping TS around either. I think is time for Host v2 :)

On Friday, June 7, 2013, Andreas Öhlund wrote:

Does TopShelf support this? Can we use sc.exe?

http://technet.microsoft.com/en-us/library/cc742019(v=ws.10).aspx

— Reply to this email directly or view it on GitHub< https://github.com/NServiceBus/NServiceBus/issues/1229> .

Regards John Simons NServiceBus

— Reply to this email directly or view it on GitHubhttps://github.com/NServiceBus/NServiceBus/issues/1229#issuecomment-19094935 .

johnsimons commented 11 years ago

Also a new host can be built completely separate and released out of band :)

On Friday, June 7, 2013, John Simons wrote:

New version of TS does support it but not an easy update! And I don't see much value in keeping TS around either. I think is time for Host v2 :)

On Friday, June 7, 2013, Andreas Öhlund wrote:

Does TopShelf support this? Can we use sc.exe?

http://technet.microsoft.com/en-us/library/cc742019(v=ws.10).aspx

— Reply to this email directly or view it on GitHubhttps://github.com/NServiceBus/NServiceBus/issues/1229 .

Regards John Simons NServiceBus

Regards John Simons NServiceBus

johnsimons commented 11 years ago

Btw, u also have the auto delay feature in server 2008+

On Friday, June 7, 2013, John Simons wrote:

Also a new host can be built completely separate and released out of band :)

On Friday, June 7, 2013, John Simons wrote:

New version of TS does support it but not an easy update! And I don't see much value in keeping TS around either. I think is time for Host v2 :)

On Friday, June 7, 2013, Andreas Öhlund wrote:

Does TopShelf support this? Can we use sc.exe?

http://technet.microsoft.com/en-us/library/cc742019(v=ws.10).aspx

— Reply to this email directly or view it on GitHubhttps://github.com/NServiceBus/NServiceBus/issues/1229 .

Regards John Simons NServiceBus

Regards John Simons NServiceBus

Regards John Simons NServiceBus

andreasohlund commented 11 years ago

Right now our own Octopus scripts figure out if there is a service already installed

#get the path to the current service
    $servicePath =  "HKLM:SYSTEM\CurrentControlSet\Services\Particular.Backend" 

    $serviceKey = get-itemproperty -path $servicePath -ErrorAction silentlycontinue
    $imagePath  = $serviceKey.psobject.properties | ?{ $_.Name -eq 'ImagePath' }

    $pos = $imagePath.value.IndexOf("NServiceBus.Host.exe") +  22

    $uninstallCommand = $imagePath.value.Substring(0, $pos).Replace('"','') + " /uninstall /endpointName:Particular.Backend /serviceName:Particular.Backend"
    "Uninstalling the previous service: " + $uninstallCommand

    iex $uninstallCommand | Write-Host

Do you guys see any merit in supporting this OOTB?

Ie make the /uninstall smart enough to uninstall the service even if it's in a different folder?

SimonCropp commented 10 years ago

moved to https://github.com/Particular/NServiceBus.Host/issues/10