Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add SystemD support for
create-service
asadmin command. The configuration script is generated in/etc/systemd/system
, filename ispayara-{domainname}.service
. The help describes, what are further necessary steps.Add
--system-type
parameter to override autodetection, allowing to force a specific init type script generation.Add
--system-type
also to_delete-script
subcommand.Add
_delete-script
help page.Testing
Testing Performed
SystemD, SystemV script creation, both autodetection and --system-type, deleting service
Create domain and service for it:
After that, try
systemctl
, findpayara
, you should seeVerify the running payara is domain3:
Open
http://localhost:4848/common/index.jsf
in browser, you should see on the right side:Domain: domain3
To verify, that the CONF_ENV is visible in the service (via microprofile config), try the simple app attached to the jira ticket. The key piece of source code:
Test:
Try to stop, start, restart service:
Delete service:
Testing Environment
Linux Debian, SystemD (tried forced SystemV scripts)
Documentation
in process
Notes for Reviewers
Verify Windows service, if it isn't broken, please.
After creating SystemD service, it is necessary to call
systemctl daemon-reload
, it reloads service files, must be run after every change in the service file(s)! It also automatically restarts the changed services.Other commands to try:
systemctl status payara.service
journalctl -xe
Review
help create-service
andhelp _delete-service