Layer7 API Management

  • 1.  CA Gateway Installation and Deployment Autoamtion

    Posted Feb 20, 2018 04:04 AM

    Hi Team,

    We need to setup CA Gateway environment on AWS.Now my client has a requirement in such a way that need to automate everything from installation to deployment of CA API Gateway in AWS.So if he want to create a new environment he will use this scripts to create it without our support.What level of automation can we do for gateways.And onemore this for CA Gateway AWS  the database will be external.so if we replicate the existing database.can we create the new environment.



  • 2.  Re: CA Gateway Installation and Deployment Autoamtion
    Best Answer

    Broadcom Employee
    Posted Feb 20, 2018 05:03 PM

    Dear d.pradeepkumar1 ,

    The amazon AMI support user-data script to initialize the EC2 instance, and gateway supports headless configuration,

    Auto-Provision a Gateway Node - CA API Gateway - 9.3 - CA Technologies Documentation 

     

    But running headless-config on AMI is a bit tricky, because headless-config require the gateway is running, but  user-data script is executed before any service startup.

     

    So, only run the headless-config script in user-data script will always fail.

     

    The following user-data works for me (it connects to local mysql, you can change the setting to connect to external mysql)

     

    #!/bin/bash
    service mysql start
    service ssg start
    sleep 2m
    echo configure.db=true > create-node.properties
    echo database.type=mysql >> create-node.properties
    echo database.host=localhost >> create-node.properties
    echo database.port=3306 >> create-node.properties
    echo database.name=ssg >> create-node.properties
    echo database.user=gateway >> create-node.properties
    echo database.pass=7layer >> create-node.properties
    echo database.admin.user=root >> create-node.properties
    echo database.admin.pass=7layer  >> create-node.properties
    echo node.enable=true >> create-node.properties
    echo configure.node=true >> create-node.properties
    echo admin.user=admin >> create-node.properties
    echo admin.pass=7layer >> create-node.properties
    echo cluster.host=`hostname` >> create-node.properties
    echo cluster.pass=7layer >> create-node.properties
    cat create-node.properties | /opt/SecureSpan/Gateway/config/bin/ssgconfig-headless create
    # end of script

     

    The /var/log/cloud-init-output.log shows following,
    Cloud-init v. 0.7.5 running 'modules:config' at Mon, 05 Feb 2018 23:17:45 +0000. Up 652.75 seconds.
    Cloud-init v. 0.7.5 running 'modules:final' at Mon, 05 Feb 2018 23:17:52 +0000. Up 659.44 seconds.
    Starting MySQL............. SUCCESS!
    Starting Gateway Services: [  OK  ]
    Configuration Successful

     

    So, to answer your question, yes, when you have database ready, you can auto-provision new environment on AWS.

     

    Regards,

    Mark