Hitachi

JP1 Version 12 JP1/Base User's Guide


N.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 N.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. Configure the auto-scaling startup settings.

    When a scale out occurs and the virtual machine starts, the settings for running the auto-scaling linkage script (jbsas_setup_agent) are needed. Specify these settings by performing the following procedure:

    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:

    In Windows:

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

    In Linux 7#:

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

    In Linux 6 (x64)#:

    #!/bin/sh
    perl -p -0777 -i -e "s/\..*//;" /etc/sysconfig/network
    hostname `hostname | perl -pe 's/\..*//'`
    /bin/sh /opt/jp1base/tools/cloud/jbsas_setup_agent.sh

    #: In line 2 of the command for Linux 7 and in lines 2 and 3 of the command for Linux 6 (x64), 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.

    By using the startup settings created in step 2, create an Auto Scaling group whose auto-scaling operations are to be controlled. For details about how to create Auto Scaling groups, see the official Amazon Web Services site.