Chapter 5. Managing your JBoss EAP server installation using the Management CLI
In JBoss EAP 8.0, we have integrated the jboss-eap-installation-manager
into the JBoss EAP server management model, allowing you to update
and revert
your remote server installations without the need to log in to the remote machine and use the jboss-eap-installation-manager
from the operating system command line.
If you are updating or reverting a local JBoss EAP installation, the jboss-eap-installation-manager
is recommended instead of the Management CLI operations. However, you cannot use the jboss-eap-installation-manager
to update or revert a remote JBoss EAP installation. In this case, use the Management CLI.
5.1. Prerequisite
- You have a JBoss EAP installed.
5.2. Updating JBoss EAP running as a stand-alone server or a managed domain using the Management CLI
You can update your JBoss EAP server installation in a stand-alone server or a managed domain using the JBoss EAP Management CLI. The following steps outline the phases of the update process.
-
List update: Before preparing the server to be updated, the
installer update
command will check for all available updates and provide a list of updates ready to be applied to your JBoss EAP instance. -
Prepare update: After confirming the available updates, the command will prepare a candidate server ready to be applied to your current installation. The candidate server is prepared in the server temporal directory, which is the directory represented by the file system path
jboss.domain.temp.dir
in a managed domain orjboss.server.temp.dir
in stand-alone server mode. Once the preparation phase is completed, no further server preparations can be made. However, at any time, you can remove the prepared candidate server by cleaning up the manager cache. This action clears the cache and allows the preparation of a different installation, enabling you to start afresh. For more information, see Cleaning the installer. - Apply update: Once the candidate server is created, you can apply it to your instance by restarting your JBoss EAP server.
Procedure
Launch the JBoss EAP Management CLI.
EAP_HOME/bin/jboss-cli.sh
Update JBoss EAP:
Update JBoss EAP in a stand-alone server.
[standalone@localhost:9990 /] installer update
Update JBoss EAP in a managed domain
[domain@localhost:9990 /] installer update --host=target-host
Restart your JBoss EAP server to complete the update process:
NoteYou must ensure that no other processes are launched from the
JBOSS_EAP/bin
folder, such asJBOSS_EAP/bin/jconsole.sh
andJBOSS_EAP/bin/appclient.sh
, when restarting the server with the--perform-installation
option. This precaution prevents conflicts in writing files that might be in use by other processes during the server’s update.Restart your JBoss EAP server in a stand-alone server.
[standalone@localhost:9990 /] shutdown --perform-installation
Restart your JBoss EAP server in a managed domain.
[domain@localhost:9990 /] shutdown --host=target-host --perform-installation
For more information about additional command options use the help
command.
Additional resources
5.3. Updating your JBoss EAP server offline using the Management CLI
The following example describes how to use the Management CLI to update JBoss EAP offline in a stand-alone server and a managed domain. This is useful in scenarios where the target server installation lacks access to external Maven repositories. You can use the Management CLI to update your server. To do so, you need to specify the location of the Maven repository that contains the required artifacts to update your server. You can download the Maven repository for your update from the Red Hat Customer Portal
Prerequisite
- You have the Maven archive repository containing the required artifacts locally on your machine.
Procedure
Launch the Management CLI:
EAP_HOME/bin/jboss-cli.sh
Update JBoss EAP offline:
Update JBoss EAP offline in a stand-alone server:
[standalone@localhost:9990 /] installer update --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
Update JBoss EAP offline in a managed domain:
[domain@localhost:9990 /] installer update --host=target-host --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
Restart your JBoss EAP server to complete the update process:
NoteYou must ensure that no other processes are launched from the
JBOSS_EAP/bin
folder, such asJBOSS_EAP/bin/jconsole.sh
andJBOSS_EAP/bin/appclient.sh
, when restarting the server with the--perform-installation
option. This precaution prevents conflicts in writing files that might be in use by other processes during the server’s update.Restart your JBoss EAP server in a stand-alone server:
[standalone@localhost:9990 /] shutdown --perform-installation
Restart your JBoss EAP server in a managed domain:
[domain@localhost:9990 /] shutdown --host=target-host --perform-installation