Customize WildFly Startup Wrapper: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
=Customize the Wrapper=
=Customize the Wrapper=


Add at the top of the file:
* [[WildFly Startup Wrapper EAP 6.4.0]]
 
* [[WildFly Startup Wrapper EAP 7.0]]
<pre>
JBOSS_HOME=/home/eap/EAP-6.4.0
JBOSS_USER=eap
#
# The amount of time to wait for startup
#
STARTUP_WAIT=30
#
# The amount of time to wait for shutdown
#
SHUTDOWN_WAIT=30
#
# Location to keep the console log
#
JBOSS_CONSOLE_LOG=${JBOSS_HOME}/domain/log/console.log
[ ! -d ${JBOSS_HOME}/domain/log ] && { mkdir -p ${JBOSS_HOME}/domain/log; chown ${JBOSS_USER} ${JBOSS_HOME}/domain/log; chmod a+rx ${JBOSS_HOME}/domain/log; }
</pre>


==Domain Controller High Availability Considerations==
==Domain Controller High Availability Considerations==
Line 64: Line 47:
but this is undocumented, so it's probably best NOT to remove <tt>domain.xml</tt> and leave <tt>JBOSS_DOMAIN_CONFIG</tt> definition in <tt>jboss-host-controller</tt> alone.
but this is undocumented, so it's probably best NOT to remove <tt>domain.xml</tt> and leave <tt>JBOSS_DOMAIN_CONFIG</tt> definition in <tt>jboss-host-controller</tt> alone.


==Permissions==
=Permissions=


Then adjust permissions:
Adjust permissions so the init system can execute the scripts.


<pre>
<pre>

Latest revision as of 23:06, 13 March 2017

Overview

This procedure is used for both System V and systemd, as both systems use the same wrapper scripts. For context, see Start WildFly as a System V Service on Linux and Start WildFly as a systemd Service on Linux.

Customize the Wrapper

Domain Controller High Availability Considerations

If you're building a host controller that is expected to fail over among multiple HA domain controllers, increase the STARTUP_WAIT (see HA Domain Controller Failover Process for details).

Backup Domain Controller Considerations

If you're building a backup domain controller you will need to add this into jboss-host-controller}:

JBOSS_BACKUP_DOMAIN_CONTROLLER=true

and then add this to the start line:

  ...
  local backup_option
  ${JBOSS_BACKUP_DOMAIN_CONTROLLER} && backup_option="--backup"

  if [ ! -z "$JBOSS_USER" ]; then
    if [ -r /etc/rc.d/init.d/functions ]; then
      daemon  [...] --host-config=$JBOSS_HOST_CONFIG ${backup_option} [...]
    else
      su [...] --host-config=$JBOSS_HOST_CONFIG ${backup_option}" [...] 
    fi
  fi
  ...

Optional

If you deleted domain.xml, you will also need to set:

JBOSS_DOMAIN_CONFIG=domain.cached-remote.xml

but this is undocumented, so it's probably best NOT to remove domain.xml and leave JBOSS_DOMAIN_CONFIG definition in jboss-host-controller alone.

Permissions

Adjust permissions so the init system can execute the scripts.

chmod a+rx ./jboss
chmod a+rx ./jboss-host-controller