Using the Gateway AMI Appliance

The CA API Gateway AMI appliance provides the power of a conventional gateway appliance with the flexibility of a software application in the public cloud offering from Amazon and its EC2 service.
gateway84
The CA API Gateway AMI appliance provides the power of a conventional
CA API Gateway
appliance with the flexibility of a software application in the public cloud offering from Amazon and its EC2 service.
The
CA API Gateway
Amazon Machine Image (AMI) contains the software configuration required to create one or more virtual Gateway server instances. Leveraging the security and flexibility of the amazon web services infrastructure, these Gateway server instances can be deployed quickly and used for testing or production purposes. Mobile applications written against the SDK interact with the Amazon web service through the Gateway API proxy.
For more information about launching a virtual machine on the Amazon web service, see http://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/gsg-aws-tutorials.html
AMI Details
If you already know how to use AWS, use the following details to find the AMI for the
CA API Gateway
.  The AMI is available in all regions. 
Installing 
CA API Gateway
version 8.4 from Source on Amazon's Linux AMI on EC2
  • AMI name
    : ssg_v84 
  • Description
    : ssg_v84
Prerequisites
  • A program that can connect using the SSH protocol. For Windows, a popular and free utility is
    PuTTY
    . Similar programs exist for Windows and Linux.
  • An Amazon AWS account. You can create an account at https://aws.amazon.com/ec2
  • An SSH/certificate key pair. 
    This key pair may be converted into a private key format useable by your SSH tool. This is described later in this topic.
  • A recent version of Internet Explorer or Firefox to run the Policy Manager browser client.
Create the Security Group
A security group is necessary to allow communication between the CA API Gateway and Amazon Web Services.  
To create a new security group:
  1. Log into your AWS Management Console at https://aws.amazon.com/console
  2. Under Compute, click
    EC2
    .
  3. Under the Network and Security section, click
    Security Groups
  4. Click
     Create Security group
    and then complete the following:
    • Security group name:
      Enter
      SSG
    • Description:
      Enter a brief description of the group.
    • VPC:
      Accept the default value.
  5. Click 
    Add Rule
    for Inbound and create these firewall group settings:
    Type
    Protocol
    Port Range
    Source
    Custom TCP Rule
    TCP
    9443
    <optional>
    Custom TCP Rule
    TCP
    8080
    <optional>
    Custom TCP Rule
    TCP
    8182*
    <optional>
    Custom TCP Rule
    TCP
    8443
    <optional>
    SSH
    TCP
    22
    <optional>
    For the Source, you may want to select 
    Custom IP
     and restrict the access to only known IP addresses.
    *
     Note that defining port 8182 is optional and is required only if the Enterprise Service Manager is installed. 
  6. Click
    Create
    when done.
  7. Repeat steps 4 to 7 to create a new security group named
    SSG DB
    1. In step 6, add this additional Inbound firewall rule:
      Type
      Protocol
      Port Range
      Source
      MYSQL/Aurora
      TCP
      3306
      <see note below>
      For the Source, select
      Custom IP
      and then enter the Group ID from the "SSG" Security Group created above (for example: sg-705d461c (SSG)).
Create a New RDS Parameter Group
To create a RDS Parameter Group:
  1. Log into your AWS Management Console at https://aws.amazon.com/console.
  2. From the Database section, click 
    RDS
    . This takes you to the Relational Database Service dashboard.
  3. Click
    Parameters Groups
    from the RDS Dashboard.
  4. Click Create Parameter Group and then complete the following:
    • Parameter Group Family:
      Select the DB instance to be created (for example, "mysql5.5").
    • Group Name:
      Enter a name for the group. Note that spaces, underscores, and some special characters are not permitted.
    • Group Description:
      Enter a brief description for the group. This is required.
  5. Select your newly created group in the list and then click
    Edit Parameters
    .
  6. Search for the parameter: “log_bin_trust_function_creators”.
  7. Change the value from 
    <engine-default>
    to 
    1
    .
  8. Click
    Save Changes
    .
Launch a DB Instance
To launch a MySQL DB Instance:
  1. Log into your AWS Management Console at https://aws.amazon.com/console.
  2. In the top right corner of the console, select the region in which you want to create the DB instance.
  3. From the Database section, click 
    RDS
    . This takes you to the Relational Database Service dashboard. 
  4. Click
    Launch a DB Instance
    to start the workflow.
  5. In "Step 1: Select Engine", choose
    MySQL
    and click
    Select
    for MySQL Community Edition.
  6. In "Step 2: Production", indicate whether the database is for a production environment.
    Production environments use Multi-AZ deployment (includes standby database for failover) and Provisioned IOPS Storage.
  7. In "Step 3: Specify DB Details", configure the fields as appropriate. See AWS documentation for field details.
  8. Configure "Step 4: Configure Advanced Settings" as follows:
  9. Click 
    Launch DB Instance 
    to create your DB instance.
  10. On the final page of the wizard, click 
    Close
    .
On the Amazon RDS console, the new DB instance appears in the list of DB instances. The DB instance will have a status of 
creating
 until the DB instance is created and ready for use. When the state changes to available, you can connect to the DB instance. Depending on the DB instance class and store allocated, it could take several minutes for the new instance to be available.
Select and Launch the AMI Instance
With the security group configured, you can launch the AMI instance.
  1. Log into your AWS Management Console at https://aws.amazon.com/console
  2. Indicate where you want to launch your instance by selecting the region in the navigation bar. 
  3. Under Compute, click
    EC2
  4. Under Images, click 
    AMIs
    .
  5. Click the
    Owned by me
    drop-down list and select
    Public images
  6. Type the following search string to find the product instance and version to launch:
    ssg_v84
  7. Select the version and click 
    Launch
    . The configuration steps begin.
Configure the AMI Instance
You can customize the AMI instance by selecting different configuration and storage options. 
2
Choose Instance Type
Filter by Current Generation.
Suggested value: m3.medium
3
Configure Instance
Accept default settings to set up one instance using a default virtual private cloud.
Leave the shutdown behavior at
Stop
unless you want the instance to be deleted after shutdown.  
4
Add Storage
Accept default memory set by the instance type.
5
Tag Instance
Optional. Create a new key pair to identify your instance. Each tag consists of a key and an optional value.
See docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html
6
Configure Security Group
Select the SSG security group you previously created, or create it now.
All fields are required, including Description.
See Create the SSG Security Group earlier in this topic.
To continue, click 
Review and Launch
. Allow a moment for the instance to start up. The Status column switches from "pending" to "running" when boot-up is complete.
Generate a Key Pair  
After reviewing the settings, click 
Launch
 to assign a key pair to your instance and complete the launch process. The key pair allows you to access the instance securely. 
Perform one of the following:
  • Select 
    c
    hoose an existing key pair
    , select the key pair name, then check the acknowledgement check box to confirm access to the private key file.
  • Select 
    Create a new key pair
    , click 
    Download Key Pair
     to download the *.pem file. As the note says, store the file in a secure and accessible location. 
Click 
Launch Instances
.  If the storage configuration settings do not meet the requirements of the AMI file, the launch fails.  A volume of size greater than 50GB is expected. 
Boot time is usually less than two minutes, but can be as long as five minutes or more. This is an EC2 limitation and does not affect the performance of the system when running. The Status column switches from pending to running when boot-up is complete.