CA API Gateway 7.3 to 9.2 Upgrade

Overview

Below process explain how to upgrade CA API Gateway (Layer7) from version 7.3 to 9.2.  New version of gateway is on AWS and using RDS as database.

Process can be summarised in below steps

  • Configure new 9.2 gateway
  • Replace new 9.2 database with 7.3 database as upgrade process

 

Configuration Process

To install  layer7 on AWS we use AMI (ami-35939a22) in  public images.  Spin up a instance and ssh.

you can login as root or ssgconfig user.  To configure layer 7 we need to use ssgconfig user only & root for system management.

  • Login Using user ssgconfig
    considering you are using a  linux system to login command will be

 

ssh ssgconfig@<Ip/Hostname> -i

 

  • You will see below screen with options & select option 2

login-screen

 

  • To configure CA gateway use option 3 and below screen will be shown

screen-2

  •  (Device takes time to respond – be patient (smile) ) for below screen to come up.

screen-3

  • Configuration starts with database configuration.  Layer7 uses MySql as backend database, we are using RDS mysql for HA purpose.  Provide relevant information, make the database is reachable and able to connect. Same as below

screen-4

=================

Cluster passphrase

=================

After database password next is cluster passphrase as below.

NOTE : As we are upgrading from  version 7.1.3 to 9.2  using database,   cluster passphrase of new gateway should be same as old gateway.  Enter the cluster passphrase of old device.

screen-6

 

  • For below screen say “NO” reason being we are using Mysql RDS.   In normal case Mysql replication is the strategy for HA and we need to provide other node information here,  as its on AWS we are using AWS managed service RDS.

  • Next screen will be as below,

screen-7

Press  Enter and waiting for success message, if you  get any error make sure you have provided proper detail and layer7 node is able to  login into RDS with provided credentials.

==========================================================================

Assuming you have successfully configured layer 7, we will move forward with upgrade process.

Upgrade Process

  • Dump of database from existing layer7 device with routines flag
    • Command will be

      Mysqldump –routines -h -u -p >> layer7_dump.sql
  • setup up new cluster 9.2 with same cluster password as old device.
    • This is done in above steps

 

  • Drop database of newly configured cluster.
    • After configuration process database is created on RDS, login and drop  database “SSG”
    • Restore is not straight forward, run below command on dump file before restoring
      perl -pe 's/\sDEFINER=`[^`]+`@`[^`]+`//' < dump.sql > dump.fixed.sql
  • Import dump of old database
    • Create a database

      Create database ssg;
    • Restore the database, make sure you have fixed dump file using above perl command.

      mysql -h -u -p < fixed_dump_file.sql;

      Make sure the dump is successful

  • Upgrade service version to 7.1.1
    • After successful dump the version number inside DB will be 7.1.3 we need to make it 7.1.1

      update ssg_version set current_version=”7.1.1″;
    • Check using a select query

      mysql> select current_version from ssg_version;

      +—————–+

      | current_version |

      +—————–+

      | 7.1.1                 |

      +—————–+

      1 row in set (0.00 sec)

Drop cache and temp tables

 Log into the console as root or connect through SSH using the ssgconfig then select option 3 from the menu for elevated permissions
Log into mysql using the command: mysql ssg
Run the following commands to flush the audits
SET FOREIGN_KEY_CHECKS = 0;
truncate table audit_admin;
optimize table audit_admin;
truncate table audit_detail;
optimize table audit_detail;
truncate table audit_detail_params;
optimize table audit_detail_params;
truncate table audit_main;
optimize table audit_main;
truncate table audit_message;
optimize table audit_message;
truncate table audit_system;
optimize table audit_system;
SET FOREIGN_KEY_CHECKS = 1;

Know Issue after upgrade:-  Below error is found in logs-

    • ssg_0_0.log:2015-10-20T21:10:37.028-0600 INFO 1 com.l7tech.server.util.GatewaySanityChecker: Running upgrade task: upgrade.task.800003=com.l7tech.server.upgrade.Upgrade71To80IdProviderReferences 
  • Solution : delete from cluster_properties where propkey like ‘upgrade.task%’;

Make sure you run above command before next step for smooth upgrade.

  • Upgrade database to 9.2 from application using ssgconfig user, use option 2 then 1 as below.
  • Select option 1 from below screen.

 

  • Upgrade process will take around 30 min based on the machine, be  patient (smile)
  • Restart server after upgrade.
  • Boot sequence  database first then layer 7 node.

Login Process

We use  CA API gateway system manager 9.2 version to manage the node.  Software was provided by CA support as  version 9.2 was not available for public.

NOTE :

  • Environment is accessible only from AWS  Dev or Shared VPC.
  • Root access is required for upgrading the system.
  • As we are using RDS we need to restore dump on RDS,
    • Know Issue
      • Restore is not straight forward, run below command on dump file before restoring
      • perl -pe 's/\sDEFINER=`[^`]+`@`[^`]+`//' < dump.sql > dump.fixed.sql
Advertisements

One thought on “CA API Gateway 7.3 to 9.2 Upgrade

  1. Pingback: CA API Gateway 7.3 to 9.2 Upgrade | Dipin Thomas

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s