Creating a custom image in AWS

Optionally, create a custom Amazon Machine Image (AMI) with the base OS and IBM® Spectrum Conductor installed. EC2 instances are provisioned using this custom image, significantly reducing the time it takes to provision a compute host from the cloud.

Before you begin

  • At least 8 GB of free disk space is required to install IBM Spectrum Conductor on an EC2 instance. Ensure that the EC2 instance has the required EBS storage.
  • For Spot instances, only a subset of AWS base images are allowed for custom images. To check which base images are available for use, go to EC2 > Spot Requests and click Request Spot Instances.

About this task

To create a custom AMI, you must first manually launch an EC2 instance with a base OS image. Then, customize the instance by installing IBM Spectrum Conductor. For instructions on creating an instance on EC2, see Getting Started with Amazon EC2 Linux® Instances.

Procedure

  1. Use SSH with the key file (keyfile.pem) to log on to the instance that you created.
  2. Update the /etc/hosts file on the EC2 host by adding the host names of the IBM Spectrum Conductor primary and primary candidates. If the ego.conf file in your cluster uses a short name for the primary host, add the short name of the host as well.
  3. Copy the IBM Spectrum Conductor package to the EC2 host.
  4. Install IBM Spectrum Conductor on the EC2 host as a compute host. For more information, see Installing on a compute host.
  5. After installation, join the host to the cluster and start IBM Spectrum Conductor on the EC2 host. For more information, see Configuring IBM Spectrum Conductor.
    1. Source the environment for your shell. For example, when you use BASH, enter:
      . $EGO_TOP/profile.platform
    2. Join the EC2 host to the cluster:
      egoconfig join primary_host
    3. Ensure that the instance group used for cloud bursting is deployed to the host. You can deploy the instance group either by triggering automatic deployment when the host joins a resource group in which the instance group is already deployed, or by deploying a new instance group to the resource group that the host belongs to.
    4. Disable automatic deployment in the $EGO_CONFDIR/../../ascd/conf/ascd.conf file to prevent automatic deployment during cloud bursting:
      ASC_AUTO_DEPLOY_ON_NEW_HOST=OFF
  6. Create an AMI using this EC2 instance with IBM Spectrum Conductor preinstalled. compute host. Select the instance on the EC2 portal and click Actions > Image > Create Image.
    Note: Keep track of image properties, especially details such as the AMI ID. You will need this information to set up your host template configuration in the awsprov_template.json file.

What to do next

After you create your image, configure a post-provisioning script for greater flexibility in managing your configuration. See Configuring the sample post-provisioning script for AWS.