How to Join Payara Micro Instances to the Data Grid in the Admin Console
Published on 03 Jan 2020
by Kenji HasunumaPayara Micro instances can join a cluster automatically. They could also join the Domain Data Grid as well as standalone Payara Server instances. In this blog, I explain how to join Payara Micro instances to the Data Grid in the Admin Console.
Prerequisites
First, we need to run the Payara Server Domain Administration Server (DAS) before joining Payara Micro instances. In this case, we assume that DAS is on dashost.
$ ./asadmin start-domain
The Hazelcast version of all instances in Data Grid must be same. If it is different, Hazelcast denies joining the instances to the cluster.
To avoid incompatibility issues, we should also use the same version of Payara Server and Payara Micro, but it's not required.
Join a Payara Micro Instance to Data Grid
To join a Payara Micro instance to Data Grid, run Payara Micro with “--clustermode” option as follows:
$ java -jar payara-micro-5.193.1.jar --clustermode domain:dashost:4900
In default, “--clustermode” option is set as “multicast” for joining with a Payara Micro cluster automatically. We need to set the mode to “domain” and specify the DAS’s hostname and its Hazelcast listening port (4900 in default) for joining to Data Grid. Regarding the other options, we would set them (e.g. “--deploy”, “--autobindhttp”) on demand as usual.
When the Payara Micro instance is running, the status is listed on “Data Grid Instance” page in Admin Console (figure 1). We could confirm its location, listen port, deployed applications and other information.
Figure 1. List of Payara Micro Instances (on "Data Grid Instances" Page)
Note: Payara Micro Instances couldn’t join to any Deployment Groups. Their configuration is independent from other instances (either Payara Server or Payara Micro).
Send asadmin Command to Payara Micro Instances
We could send asadmin command to Payara Micro instances on Data Grid using Admin Console or asadmin command on DAS.
Deploy an Application to Payara Micro Instances
Payara Micro instance is usually started with applications and we couldn’t deploy or undeploy other applications while it’s running. However, to send asadmin command from DAS, we could deploy applications to Payara Micro instances which is still running.
To deploy an application, choose the target from the list of Payara Micro instances and send “deploy” asadmin command as follows:
deploy /path/to/application
Note: The application should exist on the host which the instance is running.
For example, in Figure 2, I send “deploy” command to a Payara Micro instance (“Crazy-Lionfish”) to deploy “clusterjsp-1.1.war” application, and then its result is as figure 3.
Figure 2. Send "deploy" command to Payara Micro instance
Figure 3. The result of sending "deploy" command to Payara Micro instance.
Stop Payara Micro Instances
We could shutdown Payara Micro instances to send asadmin command from DAS.
To stop the instances, choose the target from the list of Payara Micro instances and send “stop-domain” asadmin command as follows:
stop-domain
For example, in figure 4, I send “stop-domain” command to both Payara Micro instances (“Bright-Dogfish” and “Crazy-Lionfish”) to stop them, and then its result is as figure 5. (To refresh the page, once select another tab and select it again.)
Figure 4. Send "stop-domain" command to Payara Micro instances
Figure 5. Result of sending "stop-domain" command to Payara Micro instances
Control Payara Micro and Payara Server Instances in the Domain Data Grid with the Admin Console
We could join Payara Micro instances to the Domain Data Grid as well as standalone Payara Server instances, and control them in Admin Console to send asadmin commands.
Related Posts
Payara Platform Enterprise 4 Lifetime Support 2025
Published on 24 Sep 2024
by Dawn Baird
0 Comments
Series: What’s Stopping Businesses from Application Server Migrations: Insights From Industry Players - Part 2
Published on 16 Sep 2024
by Chiara Civardi
0 Comments