ThePrez / ServiceCommander-IBMi

Service Commander for IBM i
Apache License 2.0
40 stars 12 forks source link

v0.5 #179

Closed ThePrez closed 2 years ago

ThePrez commented 2 years ago

Explain the reasoning for this pull request. For instance, is it for a new feature, bug fix, code style/cleanup, or something else? If fixing an open issue, please link to it here.

Any additional comments/context?

chrjorgensen commented 2 years ago

Hi @ThePrez

What is the purpose of this PR - autorestart a service? Interesting... 😃

ThePrez commented 2 years ago

@chrjorgensen , I committed things to the wrong branch and was too lazy to manage it properly. Thank you for keeping me accountable!

The major feature here is that one can ship a sc definition (.yaml file) adjacent to the solution and create symlinks from /QOpenSys/etc/sc/services or $HOME/.sc/services. So, a product can ship a definition with dir: . and it can be placed anywhere on the filesystem. Before this change, if the filesystem location changed, the YAML would need to be changed too.

This branch also had the screbash utility, which was a horrible first attempt at auto-restarting of services.

ThePrez commented 2 years ago

For an example use case, see https://github.com/ThePrez/Prometheus-client-IBMi and more specifically https://github.com/ThePrez/Prometheus-client-IBMi/blob/main/src/main/resources/com/ibm/jesseg/prometheus.yml

chrjorgensen commented 2 years ago

@ThePrez

Thank you for keeping me accountable!

That's what I'm here for! 😆

Great idea of symlinks to a product SC definition file! 😍 And looking forward to further attempts of restart... 👍