4.10.4 Setting up Application Server on a remote host
To set up Application Server on a remote host, use the create-node-dcom subcommand to create a node for the remote host. After you create the node, configure the performance tracer and Java EE server (server instance) on the remote host by using the create-prf and create-instance subcommands respectively. If you plan to use a hardware load balancer, use the create-webserver subcommand to configure the web server on the remote host. If you plan to use a software load balancer, use the delete-webserver subcommand to delete the web server on the localhost. Run these subcommands on the localhost where the domain administration server (DAS) is running.
Prerequisites
-
The domain administration server (DAS) is running.
-
Application Server has been set up on the localhost.
-
Application Server has been installed on the remote host.
-
The remote host and localhost have been connected by using DCOM.
Intended users
-
System engineers
Procedure
To add a node to the remote host, run the create-node-dcom subcommand of the asadmin utility command on the localhost.
asadmin --user domain_administration_server_user_name --passwordfile password_file_path create-node-dcom --nodehost remote_host_address --installdir installation_directory_path_for_Application_Server/javaee_absolute_path --nodedir node_directory_path_for_Application Server --windowsuser remote_host_user_name remote_host_node_name
When this command is run, the result is displayed as follows:
Command create-node-dcom executed successfully.
To set up the performance tracer on the remote host, run the create-prf subcommand of the asadmin utility command on the localhost.
asadmin create-prf --node remote_host_node_name performance_tracer_name_in_remote_host
When this command is run, the result is displayed as follows:
Command create-prf executed successfully.
To set up the Java EE server on the remote host, run the create-instance subcommand of the asadmin utility command on the localhost.
asadmin create-instance --node remote_host_node_name --prf performance_tracer_name_in_remote_host --cluster cluster_name server_instance_name_in_remote_host
In the cluster_name, specify the name of the cluster that was specified when setting up Application Server on the localhost.
When this command is run, the result is displayed as follows:
Command create-instance executed successfully.
If you plan to use a hardware load balancer, set up the web server on the remote host.
To set up the web server on the remote host, run the create-webserver subcommand of the asadmin utility command on the localhost.
asadmin create-webserver --node remote_host_node_name --prf performance_tracer_name web_server_name_of_remote_host
When this command is run, the result is displayed as follows:
Command create-webserver executed successfully.
When specifying the extended properties of the web server that was created on the localhost, to specify the extended properties of the web server on the remote host, run the set subcommand of the asadmin utility command on the localhost.
- Reference note
-
In the create-webserver subcommand, which is run in the previous step, the server template settings of the localhost are applied to the web server that was created on the remote host. However, the settings of the extended properties are not applied.
asadmin set hitachi-webservers.hitachi-webserver. web_server_name_in_remote_host.property.extended_property_name=value
When this command is run, the result is displayed as follows:
hitachi-webservers.hitachi-webserver.web_server_name_in_remote_host.property. extended_property_name=value Command set executed successfully.
To associate the Java EE server (server instance), which is used as the redirector destination of the request received by the web server, run the create-relation subcommand of the asadmin utility command on the localhost.
asadmin create-relation --relationtype redirect --from web_server_name_in_remote_host --to server_instance_name_in_remote_host --properties property_name_of_dependency_relation = value dependency_relation_name_in_remote_host
While setting up the redirection-relation association, in property_name_of_dependency_relation = value, specify path and network-listener.
Example:
path=/:network-listener=http-listener-1
When this command is run, the result is displayed as follows:
Command create-relation executed successfully.
If the static content is deployed on the web server of the localhost, store the static content in the document root directory of the web server of the remote host.
The web server document root directory of the remote host is installation_directory_for_Application_Server_in_remote_host/javaee/glassfish/nodes/remote_host_node_name/web_server_name_in_remote_host/root/htdocs.
Repeat steps 1 to 4 for each remote host that is used as the distribution destination of requests.
When Web Server is used as a software load balancer, delete the web server of the localhost.
For planned termination of the web server of the localhost, run the stop-webserver subcommand of the asadmin utility command, on the localhost.
asadmin stop-webserver --graceful true web_server_name_in_localhost
When this command is run, the result is displayed as follows:
Command stop-webserver executed successfully.
To delete associations of redirector relations that are not required, run the delete-relation subcommand of the asadmin utility command, on the localhost.
asadmin delete-relation dependency_relation_name_in_local_host
Because the web server of the destination that receives the request becomes a software load balancer, the web server created on the localhost will not be required anymore. For dependency_relation_name_in_local_host, specify the relation dependency that were created when Application Server was set up on the localhost.
When this command is run, the result is displayed as follows:
Command delete-relation executed successfully.
To delete unnecessary web servers, run the delete-webserver subcommand of the asadmin utility command on the localhost.
asadmin delete-webserver web_server_name_in_localhost
In web_server_name_in_localhost, specify the name of the web server created while setting up Application Server on the localhost.
When this command is run, the result is displayed as follows:
Command delete-webserver executed successfully.
Postrequisites
-
Specifying settings for using the operation management server