puppet-wildfly
puppet-wildfly copied to clipboard
Multiple standalone instances in the same machine
Change wildfly from a class to a define and allow:
wildfly::install { 'wildfly-1':
}
wildfly::instance { 'wildfly-1':
}
Preserve original mode for domain mode users.
One way to achieve this is using domain mode.
Along this line of thinking, you could template more params so everything can be in one directory
- Set unix user home dir to wildfly::dirname
- Send console.log to wildfly::dirname / wildfly::mode / logs / console.log
- Move the content of /etc/wildfly to wildfly::dirname / wildfly::mode / configuration
- Default user group dirname servicename to wildfly::title
- It kinds of conflict with the idea of multiple instance, right? I was to planning to have all instances using the same OS user.
- There is already a log in
${jboss.server.log.dir}/server.log
. The purpose of console log is to have a log of the start script in a standard location (/var/log). You can check bundle init scripts, but it's pretty much this:daemon --user $JBOSS_USER "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG $JBOSS_OPTS &" >> $JBOSS_CONSOLE_LOG 2>&1
- I'm tied to bundle scripts and its path is kind of hardcoded. See #148
- :+1:
-
In my experience of multiples instances (oracle, tomcat, etc) we've always splitted users, usually with the same unix group.
-
Ok, but as far as systemd is concerned, there's no log. It's not starting, console.log isn't anywhere confirmed by
updatedb ; locate console.log
. Nothing injournalctl -u wf10
only starting, started, stopped. I had to come up withsu - wf10 -c "export WILDFLY_HOME=/opt/wf10; bash -x /opt/wf10/bin/launch.sh standalone 'standalone.xml -P /opt/wf10/jboss.properties'"
to get a sense of issues (like java incompatibility between java 7 with wildfly 10, etc). -
So be it, next version maybe
- Found it finally : in systemd init script, you should template StandardOutput (isn't there is a error output too ?) with console output. Actually it's none, so no debug...
-
Any specific reason for this? Set limits per user?
-
Wildfly 10 bundled systemd script has this behavior, but for prior versions we use a wrapper for sysvinit: https://github.com/biemond/biemond-wildfly/blob/master/templates/wildfly.sysvinit.service.erb. All sysvinit scripts will output to JBOSS_CONSOLE_LOG.
Wildfly 10 native systemd service configuration ($WILDFLY_HOME/docs/contrib/systemd) is a source of problem to me, apart from the problem with shell shebang in the launch.sh that I mentioned before, it also doesn't wait for the service to be up, it works in a fire-and-forget style.
I need to bring this dicusssion to wildfly-dev-list. It's somehow related to this bug that I reported long ago: https://bugzilla.redhat.com/show_bug.cgi?id=1224170
To better understand this you'll need to analyze wildfly 8, 9 and 10 init scripts. :frowning:
Is this still on the roadmap? Is there an approximate ETA?