voxpupuli / puppet-wildfly

Puppet module to install, configure and manage Wildfly (8/9/10+), JBoss EAP (6.1+/7.0+) and some Wildfly based products like apiman, Keycloak and Infinispan.
Apache License 2.0
29 stars 78 forks source link

Multiple standalone instances in the same machine #149

Open jairojunior opened 7 years ago

jairojunior commented 7 years ago

Change wildfly from a class to a define and allow:


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

wildfly::instance { 'wildfly-1':
}
jairojunior commented 7 years ago

Preserve original mode for domain mode users.

jairojunior commented 7 years ago

One way to achieve this is using domain mode.

rgarrigue commented 7 years ago

Along this line of thinking, you could template more params so everything can be in one directory

jairojunior commented 7 years ago

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:

rgarrigue commented 7 years ago
  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 commented 7 years ago
  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...
jairojunior commented 7 years ago
  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_CONSOLELOG.

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:

ljkimmel commented 6 years ago

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