Migrate Live API Creator

Migrate Live API Creator
lac54
If you are running CA Live API Creator 4.x or earlier, migrate your API definitions–such as the authentication provider definitions and CA API Gateway configuration definition–to Live API Creator 5.0. In Live API Creator 4.x and earlier, API Server stored the API definition in a shared admin database. In Live API Creator 5.x, API Server stores the definition in the admin repository, which is a set of files and directories. As part of the migration workflow, you migrate from Live API Creator 4.x and earlier to Live API Creator 5.0, and then upgrade to the latest version of
Layer7 Live API Creator
.
The following image shows the workflow:
migration_upgrade_LAC_workflow
migration_upgrade_LAC_workflow
This article explains how to migrate the API definition that is in the admin database for Live API Creator 4.x and earlier to the admin repository that is in Live API Creator 5.0 using the migration service. This service is a utility that simplifies the process of migrating your APIs.
If you are running Live API Creator 5.x, your API definition is already stored in the admin repository, and you can skip the migration process. Upgrade to the latest version of
Layer7 Live API Creator
.
For more information about how to upgrade to the latest version, see Upgrade Live API Creator.
For more information:
  • About whether to migrate to Live API Creator 5.0 or upgrade to the latest version of
    Layer7 Live API Creator
    , see Release Notes.
  • About the admin repository, see View your API Definition.
In this article:
Verify the Prerequisites
Before you begin migrating to Live API Creator 5.0, verify the following prerequisites:
  • You have obtained and installed the license for Live API Creator 5.0.
    For more information about how to obtain and install the API Server license, see Import the API Server License.
  • You have cleared your browser cache.
  • You have Live API Creator 4.x or earlier and Live API Creator 5.0 installed.
    You can install Live API Creator 5.0 on a different server for the purpose of this migration activity. Live API Creator 5.0 is required only for the migration process.
    For more information about how to install Live API Creator, see Installing and Upgrading.
  • You have accepted the terms of the end-user license agreement (EULA).
  • You have downloaded the migration service (the
    migrate.sh
    shell script or the
    migrate.cmd
    batch file) from the MigrationService GitHub site.
  • You have the password for the system administrator (
    sa
    ) user and default TeamSpace user for Live API Creator 4.x or earlier.
    If the
    default
    TeamSpace is the only TeamSpace that exists, you are the initial API developer (a TeamSpace user), and you are just starting to use API Creator, the user name for this user is
    admin
    .
  • You have the password for the
    default
    TeamSpace user for Live API Creator 5.0.
Migrate your APIs Using the Migration Service
Migrate your API definitions from Live API Creator 4.x or earlier to Live API Creator 5.0 using the migration service.
Use the following process to migrate your APIs:
The following diagram illustrates a summary of the steps on how to migrate your APIs using the migration service:
MigrationService
MigrationService
Generate the Export and Import Scripts
Generate the export and import scripts that you use to migrate to Live API Creator 5.0.
From terminal or a command prompt, run the migration service based on your operating system:
(Mac/Linux)
migrate.sh
(Windows)
migrate.cmd
This migration service generates the following migration scripts:
  • The export scripts ((Mac/Linux)
    MasterExport-1.sh
    and (Windows)
    MasterExport-1.bat
    ). These scripts export the API definitions from Live API Creator 4.x or earlier.
  • The import scripts ((Mac/Linux)
    MasterImport-2.sh
    and (Windows)
    MasterImport-2.bat
    ). These scripts import the exported API definitions into Live API Creator 5.0.
Install the Admin Command-Line Interface
The migration scripts use the Admin CLI. Based on the platform (Mac/Linux/Windows) that you are running your migration scripts, copy the
lacadmin
that is located in the
<MigrationService>/macos|linux|windows
directory to the directories for Live API Creator 4.x or earlier and for Live API Creator 5.0 where you will run the migration scripts.
Export your API Definitions
You export your API definitions using the export script.
Prerequisite:
If you are exporting APIs from multiple TeamSpaces, you must have the appropriate access to export TeamSpaces.
Follow these steps:
  1. Configure the export script ((Mac/Linux)
    MasterExport-1.sh
    and (Windows)
    >MasterExport-1.bat
    ). In a text editor, open the script and update your TeamSpace user credentials (username and password) to the credentials that you have for Live API Creator 4.x or earlier, and then save the changes to the script.
  2. Start Live API Creator 4.x and earlier.
  3. Run the export script.
    The
    workspace
    directory is created. The API definitions from Live API Creator 4.x and earlier are exported to the
    workspace
    directory in JSON file format.
    The API definitions that the export script saves to the
    workspace
    directory are required only for the migration process.
  4. Confirm that the
    workspace
    directory contains the API definitions that you exported.
  5. Stop Live API Creator 4.x and earlier.
Create the TeamSpace and TeamSpace Users
If Live API Creator 5.0 includes more than one TeamSpace, create the TeamSpace and the TeamSpace users.
For more information:
Import your API Definitions
  1. Configure the import script ((Mac/Linux)
    MasterImport-2.sh
    and (Windows)
    MasterImport-2.bat
    ). In a text editor, open the script and update your TeamSpace user credentials (username and password) to the credentials that you have for Live API Creator 5.0, and then save the changes to the script.
  2. Start Live API Creator 5.0.
  3. Run the import script.
The API definitions that you exported (that are located in the
workspace
directory) are imported into the admin repository for Live API Creator 5.0.
Confirm the Migration of your APIs
Verify that the migration service has migrated your API definitions to the admin repository for Live API Creator 5.0 successfully from Live API Creator 4.x or earlier by running your automated regression tests. The location of the admin repository is dependent on the Java container on which you are running Live API Creator.
For more information about the location of the admin repository, see View your API Definition.
Next Steps
Now that you have migrated Live API Creator 4.x or earlier to Live API Creator 5.0, upgrade to latest version of Live API Creator. You use the output from the migration process (the API definition that is in the admin repository for Live API Creator 5.0) to upgrade to the latest version of Live API Creator.
For more information about how to upgrade, see Upgrade Live API Creator.