puppet-wildfly icon indicating copy to clipboard operation
puppet-wildfly copied to clipboard

Multiple standalone instances in the same machine

Open jairojunior opened this issue 8 years ago • 8 comments

Change wildfly from a class to a define and allow:


wildfly::install { 'wildfly-1':
}

wildfly::instance { 'wildfly-1':
}

jairojunior avatar Oct 30 '16 16:10 jairojunior

Preserve original mode for domain mode users.

jairojunior avatar Oct 30 '16 16:10 jairojunior

One way to achieve this is using domain mode.

jairojunior avatar Nov 21 '16 20:11 jairojunior

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

rgarrigue avatar Dec 08 '16 13:12 rgarrigue

  1. It kinds of conflict with the idea of multiple instance, right? I was to planning to have all instances using the same OS user.
  2. 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
  3. I'm tied to bundle scripts and its path is kind of hardcoded. See #148
  4. :+1:

jairojunior avatar Dec 08 '16 13:12 jairojunior

  1. In my experience of multiples instances (oracle, tomcat, etc) we've always splitted users, usually with the same unix group.

  2. 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 in journalctl -u wf10 only starting, started, stopped. I had to come up with su - 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).

  3. So be it, next version maybe

rgarrigue avatar Dec 08 '16 14:12 rgarrigue

  1. 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...

rgarrigue avatar Dec 08 '16 15:12 rgarrigue

  1. Any specific reason for this? Set limits per user?

  2. 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:

jairojunior avatar Dec 08 '16 16:12 jairojunior

Is this still on the roadmap? Is there an approximate ETA?

ljkimmel avatar Dec 19 '17 14:12 ljkimmel