Install on Oracle WebLogic

You can install and configure  to run as an on-premise service on Oracle WebLogic Server.
You can install and configure 
Layer7 Live API Creator
 to run as an on-premise service on Oracle WebLogic Server.
In this article:
 
 
3
 
 
Verify the Prerequisites
Before you install 
Layer7 Live API Creator
 on WebLogic Server, ensure that you have completed the following prerequisite steps:
  • You have obtained the package containing the 
    CALiveAPICreator.war
     web application ARchive (WAR) file.
  • You have installed WebLogic Server.
  • You have installed the Java Development Kit (JDK) version that 
    Layer7 Live API Creator
     supports.
    For more information:
  • You have created a 
    JAVA_HOME
     environment variable and set the value to point to the JDK installation directory.
    If you have not already done this, complete the following based on your operating system:
    (Windows)
     Set the value for the 
    JAVA_HOME
     environment variable as the path to your JDK installation. If you did not change the path during installation, it is something like 
    C:\Program Files\Java\jdk1.8.0_201
    . If the path contains spaces, use the shortened path name, for example, 
    C:\PROGRA~2\Java\jdk1.8.0_201
    . Close and re-open any command line windows that you had open before you made these changes, since you cannot reload environment variables from an active command prompt. If the changes do not take effect after reopening the command window, restart Windows.
    (Mac)
     From terminal, set the 
    JAVA_HOME
     environment variable using the following command:
    export JAVA_HOME=/Library/Java/Home
  • You know the license type that you are using 
    Layer7 Live API Creator
     under, either a standard license that the CA Support site issues or an Enterprise Software Portfolio License Agreement (PLA).
    For more information about licensing, see Licensing.
  • You have reviewed the installation best practices.
    For more information about the best practices, see Installation Best Practices.
(Optional) Bundle the Admin Repository into the WAR File
You can bootstrap 
Layer7 Live API Creator
 with a specific configuration for your API metadata by bundling the admin repository into the 
CALiveAPICreator.war
 file. For example, you have configured 
Layer7 Live API Creator
 in your development environment, and you want to include this configuration in the 
CALiveAPICreator.war
 file and deploy it to a server.
If you are persisting the authentication tokens that 
Layer7 Live API Creator
 dynamically generates by way of an authentication database, you can also bundle the definition of the data source for the authentication token database (the 
ApiKey.json
 file) into the WAR file.
You can bundle the admin repository and the definition of the data source for the authentication token database into the WAR file using a script. For more information about this script, see Example: Deploy the Bundled WAR to a Cluster.
Prerequisite: 
If you are licensed to use 
Layer7 Live API Creator
 under a PLA, you have verified that the admin repository includes the 
system/telemetry.json
 file and that it is configured to collect and send 
Layer7 Live API Creator
-specific usage data.
 You can also activate 
Layer7 Live API Creator
 and configure it to send usage data after you have started API Server. For more information, see Activate and Configure to Send Usage Data.
For more information:
Follow these steps:
 
  1. Create the 
    WEB-INF/classes
     directory.
  2. Create the 
    configuration.zip
     file from your admin repository (the 
    teamspaces
     and 
    system
     directories).
    For more information about these directories, see View your API Definition.
  3. Copy the following files to the 
    WEB-INF/classes
     directory:
    • The 
      configuration.zip
       file.
    • (Optional) The 
      ApiKey.json
       file for your environment.
  4. From the command line window, bundle the files that are in the 
    WEB-INF
     directory into the WAR file by issuing the following command:
    jar uvf <war file> WEB-INF
    Step 3 of the sample script bundles these files into the WAR file.
The admin repository (and optionally the definition of the data source for the authentication token database) is added to the 
CALiveAPICreator.war
 file.
Install on WebLogic Server
Using the WebLogic Server Administration Console, install the 
CALiveAPICreator.WAR
 file.
For more information about how to install WAR files using the administrative console, see the Oracle WebLogic documentation.
You have installed 
Layer7 Live API Creator
 in WebLogic Server.
Optional Configuration
The following topic provides optional configuration details.
Configure External Logging
You can create a logger for externalizing your API logs.
For more information, see External Logging.
Next Steps
Complete the following procedures after you have installed 
Layer7 Live API Creator
 in WebLogic Server.
Enable Other Options at Startup
The following are options that you can enable at startup:
 Add these options when you start API Server only once. Do not add these options as part of normal operations.
If you receive WARNING messages that resource models have ambiguous resource methods when you start API Server, you can safely ignore them. These messages are not errors.
For more information about these options and other options that you can add when you start API Server, see API Server Startup Options.
Bypass the Extra Step at Login to Accept the EULA
If you are deploying into production using a cluster or if you are scripting deployment, you can bypass the API Creator screen that asks the initial API developer (a TeamSpace user) to log in to accept the user license, which pre-accepts the terms of the EULA. You can pre-accept the terms of the EULA by adding the 
CA_ACCEPT_LICENSE
 option when you start API Server, for example:
-DCA_ACCEPT_LICENSE=ENU
Specify an Alternate License File
If you are licensed to use 
Layer7 Live API Creator
 under a standard license, the first time that you start WebLogic with 
Layer7 Live API Creator
, you must install the API Server license file. You can install this file when you start your WebLogic service by adding the 
LAC_DEFAULT_LICENSE_FILE
 option when you start API Server:
LAC_DEFAULT_LICENSE_FILE
Example:
 
<...WebLogic Server startup...> -DLAC_DEFAULT_LICENSE_FILE=/Users/jdoe/License.txt
Change the Initial Password for the System Administrator User and for the Initial API Developer
If you did not change the initial passwords for the system administrator (
sa
) user and for the initial API developer (a TeamSpace user) for the default TeamSpace as options when you start API Server, change the passwords. Add the 
LAC_INITIAL_SA_PASSWORD
 and the 
LAC_INITIAL_ADMIN_PASSWORD
 options when you start API Server, for example:
<...WebLogic startup...> -DLAC_INITIAL_SA_PASSWORD=<MySAPassword>
For more information:
Specify the Location from Where you Want 
Layer7 Live API Creator
 to Pull your Admin Repository
By default, when you first start API Server, 
Layer7 Live API Creator
 pulls your admin repository from the location 
that you defined for the 
LAC_REPOSITORY_ROOT
 option. You can change this location by adding the following option when you start API Server:
LAC_REPOSITORY_CONFIGURATION_URL
Example:
 
<...WebLogic Server startup...> -DLAC_REPOSITORY_CONFIGURATION_URL=<Complete path to your admin repository, URL or Git>
Specify the Location from Where you Want 
Layer7 Live API Creator
 to Add your Admin Repository
The first time that you start WebLogic Server with 
Layer7 Live API Creator
, you must set the location for your admin repository at startup by adding the following option when you start API Server:
LAC_REPOSITORY_ROOT
Example:
 
<...WebLogic Server startup...> -DLAC_REPOSITORY_ROOT=${HOME}/CALiveAPICreator.repository
You can change the location by adding this option when you start API Server.
Log in to API Creator
You can access the 
Layer7 Live API Creator
 component WARs that you have installed on WebLogic Server using a URL that includes the WAR file's name. For example, if you have installed the 
DataExplorer.war
 file, you can start Data Explorer using the following URL:
http://localhost:7001/DataExplorer
Follow these steps:
 
  1. Enter the following URL into a browser window:
    http://localhost:7001/APICreator
    The API Creator logon authentication dialog opens.
  2. Complete the following fields, and then click 
    Login
    :
     If the 
    default
     TeamSpace is the only TeamSpace that exists, you are the initial TeamSpace user, and you are just starting to use API Creator, the user name for this user is 
    admin
    .
    Server
     
    The URL and location of API Server, which can include the root web application archive (WAR) file's name.
     
    Example: 
    /APIServer
     The server location and name depends on the type of installation and configuration of your API.
     
    Username
     
    The username for the initial API developer that 
    Layer7 Live API Creator
     creates when you install 
    Layer7 Live API Creator
    , which is 
    admin
     . Enter 
    admin
     .
     
    Password
     
    The TeamSpace user's password. Enter 
    Password1
     .
  3. If this is your first time logging in to API Creator, accept the terms of the EULA. You must accept these terms before you can use API Creator.
You are logged in to API Creator as the administrator user (admin).
Configure 
Layer7 Live API Creator
 to Collect and Send Usage Data
If you are licensed to use 
Layer7 Live API Creator
 under a PLA, you must activate 
Layer7 Live API Creator
 and configure it to collect and send usage data. If you are licensed to use 
Layer7 Live API Creator
 under a standard license, you can consent to 
Layer7 Live API Creator
 collecting and sending telemetry data, or system and usage data.
For more information about how to configure to collect and send usage data, see Activate and Configure to Send Usage Data.
Import the API Server License
The API Server license controls access to API Creator and services. If you are licensed to use 
Layer7 Live API Creator
 under a standard license that the CA Support site issues and you did not specify a license file when you started WebLogic Server (by adding the 
LAC_DEFAULT_LICENSE_FILE
 option at API Server startup), you must now upload it.
For more information about licensing, see Licensing.
Install the Admin CLI
If you want to manage your 
Layer7 Live API Creator
 installation from the command line or using scripts, install the Admin command-line interface (CLI). With the Admin CLI installed, you can manage your admin services, such as migrating APIs–including your JavaScript user libraries, resources, authentication providers, API Gateway definitions–to a new version of 
Layer7 Live API Creator
.
For more information:
Begin Exploration of the API Samples
For more information about these samples, see Tutorials and Samples.
Advanced Configuration
The following topics provide advanced configuration details.
Configure to Run as a Cluster
You can configure 
Layer7 Live API Creator
 for scalability and increased performance by configuring it to run as a cluster within multiple nodes.
For more information about how to configure 
Layer7 Live API Creator
 to run as a cluster, see Configure to Run as a Cluster.
Create a Database for your Authentication Tokens
By default, 
Layer7 Live API Creator
 generates authentication tokens, stores them in the in-memory Derby database, and synchronizes them to your admin repository in the following cases:
  • You have configured 
    Layer7 Live API Creator
     to run as a single node.
  • You are running in a local development environment.
  • You have specified an authentication provider that uses the 
    Default Auth Provider
     authentication method (for example, the 
    built-in authentication
     authentication provider) or a custom JavaScript authentication provider that uses the 
    JavaScript Auth Provider
     authentication method as the authentication provider for your API.
You can optionally have 
Layer7 Live API Creator
 store the authentication tokens that it generates for API users in a database instead by creating one.
For more information about how to create this database, see Create a Database for your Authentication Tokens.