Modeling environments for Amazon Web Services

To model an Amazon Web Services (AWS) environment, log in with an AWS cloud project and specify the AWS-specific information in a blueprint.

Before you begin

Procedure

  1. Create the blueprint:
    1. Click Blueprints.
    2. Click New.
    3. In the Add a New File window, specify a name for the blueprint.
    4. To set the repository in which the blueprint is saved, select a project from the Project list. The project list contains the default project and a project for each team. Each project except the default project corresponds to both a team and a Git repository of the same name. The default project is not associated with a team, and blueprints that are associated with the default project cannot be shared with other users.
    5. In the Type list, select Blueprint, and then click Save.
  2. Add resources from the palette to the blueprint, such as virtual images. The palette shows resources from the currently connected cloud, which is shown at the upper right of the page. For more information on working with the blueprint designer, see Editing blueprint diagrams and Editing blueprint source code.
  3. In the blueprint source code, in the metadata section, specify your AWS login information. For example, if your AWS access ID is ABC12345 and your secret key is 67890DEF, the code looks like the following example:
    metadata:
      ec2_properties:
        access_id: ABC12345
        secret_key: 67890DEF
  4. Customize the blueprint source code for your configuration of AWS. For example, you might have to change the mount points of volumes from defaults like /dev/vdc to specific locations like /dev/xvdc, as in the following example:
    linux_image_1_volume_1_attachment:
      type: OS::Cinder::VolumeAttachment
      properties:
        volume_id: vol-4d4aaa04
        instance_uuid: { get_resource: linux_image_1_volume_1_attachment }
        mountpoint: /dev/xvdc
    In another example, to ensure that nodes and volumes are created in the same zone, you might need to update the availability_zone property to resources in the blueprint, as in the following example:
    parameters:
      availability_zone:
        type: string
        default: us-east-1d
        description: Name of availability zone in which to create the instance
    
    resources:
    linux_image_A:
      type: OS::Nova::Server
      properties:
        flavor: { get_param: flavor }
        image: "LinuxImageA"
        key_name: { get_param: key_name }
        name: "images/linux_image_A"
        availability_zone: { get_param: availability_zone }
      metadata:
        ec2_properties:
          access_id: ABC12345
          secret_key: 67890DEF
    linux_image_A_volumeA_attachment:
      type: OS::Cinder::VolumeAttachment
      properties:
        volume_id: volumeA
        instance_uuid: { get_resource: linux_image_A }
        mountpoint: /dev/xvdc
      metadata:
        ec2_properties:
          access_id: ABC12345
          secret_key: 67890DEF
    
    volumeA:
      type: OS::Cinder::Volume
      properties:
        name: volumeA
        availability_zone: { get_param: availability_zone }
        size: 1
      metadata:
        ec2_properties:
          access_id: ABC12345
          secret_key: 67890DEF
    For more information, see the Amazon Web Services documentation.
  5. Optional: In the blueprint source code, in the metadata property for the resource, specify any virtual image tags. You provide the tags as a series of name/value pairs. For example, to specify the named value pairs cluster: blue and database_type: mysql, the code looks like the following example:
    metadata:
      cluster: blue
      database_type: mysql
  6. Create a configuration file and externalize properties to the file. See Editing configuration files.
  7. In the configuration file, ensure that the core OpenStack types are mapped to Amazon Elastic Compute Cloud (EC2) types. The configuration file must have mapping similar to the following code:
    resource_registry:
      OS::Nova::Server : IBM::EC2::Server
      OS::Cinder::Volume : IBM::EC2::Volume
      OS::Cinder::VolumeAttachment : IBM::EC2::VolumeAttachment
      OS::Neutron::Port : IBM::EC2::Port
      OS::Neutron::Net : IBM::EC2::VPC
      OS::Neutron::Subnet : IBM::EC2::Subnet
      OS::Neutron::Router : IBM::EC2::RouteTable
      OS::Neutron::RouterGateway : IBM::EC2::InternetGateway
      OS::Neutron::RouterInterface : IBM::EC2::RouteTableAssociation

What to do next

Add the components of your application to the blueprint. See Deploying components with blueprints.


Feedback