Closed VoidMonk closed 7 years ago
Well, it depends on how you package/distribute your app or component.
What we do is package the app as a rhel/centos rpm file, which includes an initrc script in charge of invoking mono-service, and read some env variables from /etc/sysconfig/$your.app.name$
Once we start moving towards centos7, we will have to provide something similiar as systemd's units, thought.
Thanks Pablo. We basically package our app (.NET Windows Service) as a .tar. It includes the .exe, .config and .dll's. So, I guess we'll have to use both, mono-service
to run the service and a Linux init system to take care of background process as well as server restarts.
But do we need TopShelf.Linux in that case? Can't the TopShelf-based service run with mono-service
on Linux?
I am not sure I understand you question. Yes, TopShelf does work with mono-service oob. It is TopShelf's ServiceBase-derived code which gets called by mono-service..
Cool, I know that mono-service invokes TopShelf's ServiceBase code. My question, and confusion, is what is TopShelf.Linux used for? Where does it fit in?
It fits in making TopShelf's service code being usable under linux (when used with mono-service). Maybe I do not understand your question, thought.
Got it, thanks.
Hi, having read the brief repo doc, I'm assuming that this package only allows TopShelf's
start
andstop
commands under Linux.I'm trying to figure out what's the best approach to support the full-lifecycle for a Windows Service under Linux & Mono:
systemd
) to handle service start, stop and server restarts, or,mono-service
(by itself?) to do the sameIs this package still needed in both the two cases? Some clarity on the required components and process will be useful.
Thanks.