N.5 Setup procedure for using JP1/Base linked with the auto-scaling functionality (for the manager host)
This subsection describes how to set up manager hosts when JP1/Base is to be linked with the auto-scaling functionality.
Note that steps 8 and 9 are required if JP1/PFM is to be used for monitoring.
-
Install Java Runtime Environment (JRE).
JRE is a prerequisite program for Amazon EC2 API Tools. Install JRE in advance.
-
Install Amazon EC2 API Tools.
Download Amazon EC2 API Tools from the official Amazon Web Services site, and save it in a directory of your choice.
-
Specify the environment variables required for running Amazon EC2 API Tools.
Specify the environment variables required for running Amazon EC2 API Tools in the script definition file (jbsas_setup_manager.ini). For details about the settings that are required for the execution environment of Amazon EC2 API Tools, see the official Amazon Web Services site. For details about the script definition file, see N.8 Auto-scaling linkage script.
-
Install JP1/Base and JP1/IM - Manager.
-
Enable the health check function of JP1/Base.
-
Set an automated action for starting the monitoring of hosts that were scaled out.
To run an auto-scaling linkage script (jbsas_add_agent), specify the automated action definition described in the table below. For details about automated action definitions, see the chapter on executing commands by using automated actions in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.
Table N‒1: Automated action definition (for scale out) Definition item
Definition value
Action name
Any value
Event ID
1011 (If the event ID of the scale-out notification event was changed, specify the new event ID.)
Event condition
None
User name of the user who executes the action
- In Windows:
-
User name of the JP1 user who is mapped to the OS user with jp1admin or Administrator permissions
- In Linux:
-
User name of the JP1 user who is mapped to the OS user with jp1admin or superuser permissions
Target host
Manager host name
Action
- In Windows:
-
powershell -ExecutionPolicy RemoteSigned "&'installation-folder\tools\cloud\jbsas_add_agent.ps1'" $EVIPADDR $EVHOST $EV"OS_TYPE" $EV"INSTALLPP_INFO" <nul
- In Linux:
-
/bin/sh /opt/jp1base/tools/cloud/jbsas_add_agent.sh $EVIPADDR $EVHOST $EV"OS_TYPE" $EV"INSTALLPP_INFO"
-
Set an automated action for terminating the monitoring of hosts that were scaled in.
To run an auto-scaling linkage script (jbsas_del_agent), specify the automated action definition described in the table below. For details about automated action definitions, see the chapter on executing commands by using automated actions in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.
Table N‒2: Automated action definition (for scale in) Definition item
Definition value
Action name
Any value
Event ID
*
Event condition
4725,4749,474D
User name of the user who executes the action
- In Windows:
-
User name of the JP1 user who is mapped to the OS user with jp1admin or Administrator permissions
- In Linux:
-
User name of the JP1 user who is mapped to the OS user with jp1admin or superuser permissions
Target host
Manager host name
Action
- In Windows:
-
powershell -ExecutionPolicy RemoteSigned "&'installation-folder\tools\cloud\jbsas_del_agent.ps1'" $EVOBNAM <nul
- In Linux:
-
/bin/sh /opt/jp1base/tools/cloud/jbsas_del_agent.sh $EVOBNAM
-
Install JP1/PFM - Manager.
-
Set the alarm table to be bound to agents.
In the script definition file (jbsas_setup_manager.ini), specify the name of the alarm table that is to be bound to the agent hosts that were scaled out. For details about the script definition file, see N.8 Auto-scaling linkage script.
When you perform setup for using JP1/Base linked with the auto-scaling functionality, configure other necessary settings such as the following:
-
Specifying the automated action to be executed when an agent fails
In the automated action definition, if $EVHOST is specified as the host on which the automated action is to be executed, when an agent fails, the automated action will be executed on the agent that issued the failure event.