Hitachi

JP1 Version 13 JP1/Base User's Guide


L.7 Configuring the Amazon EC2 service

This subsection describes how to configure the settings required for the Amazon EC2 service.

Perform this procedure by using the AWS Management Console. For details about the AWS Management Console and how to use it, go to the official Amazon Web Services site.

  1. Create a virtual machine image of the agent host.

    Create a virtual machine image (AMI) of the agent host that was set up in L.6 Setup procedure for using JP1/Base linked with the auto-scaling functionality (for agent hosts). For details about how to create images, go to the official Amazon Web Services site.

  2. Create an Auto Scaling launch configuration or an Auto Scaling startup template.

    To start a virtual machine by Auto Scaling, you need to specify settings to execute the script (jbsas_setup_agent) linked with Auto Scaling.

    Specify the settings by performing the following steps.

    When creating a launch configuration:

    1. From the AWS Management Console, open the Amazon EC2 console.

    2. In Auto Scaling in the left-hand navigation pane, click Launch Configuration.

    3. Click Create Launch Configuration.

    4. From the Select AMI window, select the virtual machine image (AMI) that was created in step 1.

    5. In the Advanced Settings window, click Advanced Settings - User Data, select Text, and then enter the following code in the text box:

    When creating a startup template:

    1. From AWS Management Console, open the Amazon EC2 console.

    2. In Instance in the navigation pane on the left, click Startup Template.

    3. Click Create Startup Template.

    4. From the Select AMI window, select the virtual machine image (AMI) that you created in step 1.

    5. In the Advanced Details window, enter the following in the textbox User Data.

    Text to be entered in User Data.

    In Windows:

    <script>
    powershell -ExecutionPolicy RemoteSigned "&'installation-folder\tools\cloud\jbsas_setup_agent.ps1'"
    </script>

    In Linux #:

    #!/bin/sh
    /bin/hostnamectl set-hostname `/bin/hostname | /bin/sed -e 's/\..*//'`
    /bin/sh /opt/jp1base/tools/cloud/jbsas_setup_agent.sh

    #: In line 2 of the command for Linux, change the domain names to short names if the host names are in FQDN format. If JP1/PFM is not used and host names in FQDN format are used, these lines are not needed.

    6. Follow the displayed instructions to finish configuring the settings.

  3. Create an Auto Scaling group.

    Use the launch configuration or startup template that you created in step 2 to create an Auto Scaling group that controls autoscaling action.

    For details about how to create Auto Scaling groups, see the official Amazon Web Services site.

    When a new setup is performed by using the setup command (jegn_setup), the default port number that is set when the port number specification (the -port option) is omitted was changed.

    Values related to English UTF-8 encoding were added to the values that can be specified for the environment variable LANG in the environment variable file (the jegn_env.conf file) and the jp1bs_param.conf file of JP1/Base.