To use Amazon AMIs in Application Services you must create an AMI by customizing an existing AMI.

Prerequisites

  • Familiarize yourself with the AWS management console and the steps to launch, configure, and terminate an Amazon EC2 instance or virtual machine.

  • Verify that you have the proper credentials to access the AWS management console.

  • Identify the AWS Region where the Application Services applications will run and confirm that the AMIs are accessible to the Region.

  • Verify that the Amazon EC2 AMI meets the Application Services virtual machine requirements. See Virtual Machine Requirements for Creating Amazon EC2 Custom Templates.

    For more information about using AMIs, see the Amazon AWS documentation.

Procedure

  1. Log in to the AWS console and locate an EBS-backed AMI in the appropriate Amazon Region to deploy applications.
  2. Use the AMI to start an Amazon EC2 instance, log in as a root user, and open a terminal.
  3. Download and install the supported JRE packages for an RPM-based AMI.
    1. On a machine in the same network as Application Services, download the JRE package from http://Application_Director_IP/agent/jre-7u45-linux-ArchitectureName.rpm, where the ArchitectureName is i586 for 32-bit and amd64 for 64-bit.
    2. Upload the JRE package to the Amazon EC2 instance.
    3. From the Amazon EC2 instance, enter rpm -i jre-7u45-linux-ArchitectureName.rpm to install the package.
  4. Download and install the Application Services agent bootstrap service for an RPM-based AMI.
    1. On a machine in the same network as Application Services, download the agent bootstrap service from http://Application_Director_IP/agent/vmware-appdirector-agent-service-ec2_5.2.0.0-0_ArchitectureName.rpm, where the ArchitectureName is i386 for 32-bit and x86_64 for 64-bit.
    2. Upload the agent bootstrap service to the Amazon EC2 instance.
    3. From the Amazon EC2 instance, enter rpm -i vmware-appdirector-agent-service-ec2_5.2.0.0-0_ArchitectureName.rpm to install the service.
  5. (Optional) : Add a second Ethernet device eth1 on the CentOS operating system.
    1. Locate the ifcfg-eth0 file.
    2. Copy the contents of the file to the ifcfg-eth1 file.
    3. In the ifcfg-eth1 file, replace all of the DEVICE=eth0 strings with DEVICE=eth1 and save your changes.

    The second Ethernet device lets you deploy a virtual machine-based on this AMI with more than one NIC.

  6. (Optional) : Erase the Linux command history to secure the AMI you will create.
    1. Delete the Linux command history saved in the .bash_history file.
       cat /dev/null > ~/.bash_history
    2. Delete the Linux command history in the current Bash login session.
      history -c
  7. In the AWS console, stop the Amazon EC2 instance.
    Caution:

    If you terminate the instance, you lose all of your changes.

  8. To create an Amazon EBS-backed AMI, select the stopped Amazon EC2 instance, provide the Image Name, and initiate the process to convert to an EBS-backed image.

    The AMI creation might take several minutes.

    After the AMI is available, you can end the Amazon EC2 instance.

What to do next

Map the Amazon EC2 Region to a Application Services cloud provider and provide access to the AMIs or virtual machine templates. See Register the Amazon EC2 Cloud Provider and Template.