Install on IBM WebSphere

You can install  on IBM WebSphere application server as an installable web application ARchive (WAR).
You can install 
Layer7 Live API Creator
 on IBM WebSphere application server as an installable web application ARchive (WAR).
Use the following process to install on WebSphere:
3
Verify the Prerequisites
Before you begin installing 
Layer7 Live API Creator
 on WebSphere, ensure that you have completed the following prerequisite steps:
  • You have installed WebSphere.
  • You have Admin rights to the WebSphere application server.
  • WebSphere is running and administrative console is accessible from the browser.
  • You have Java Development Kit (JDK) installed.
    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_92
    . If the path contains spaces, use the shortened path name, for example, 
    C:\PROGRA~2\Java\jdk1.8.0_92
    . 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 under which you are using 
    Layer7 Live API Creator
    , 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.
  • You have reviewed the WebSphere limitations.
    For more information about these limitations, see the "WebSphere Limitations" section.
(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 WebSphere
The 
Layer7 Live API Creator
 installation zip file includes the WAR files that you can use to install 
Layer7 Live API Creator
. You can install the components—API Creator, API Server, and Data Explorer—simultaneously or (if you are an advanced user and you want greater flexibility) each of the components individually.
Install the components simultaneously using the 
development/
 
CALiveAPICreator.war
 file.
Follow these steps:
 
  1. Retrieve the 
    CALiveAPICreator.war
     file from your 
    Layer7 Live API Creator
     installation bundle.
  2. Using the administrative console, install the 
    CALiveAPICreator.war
     file as an application in your WebSphere server.
    For more information about how to install application files on WebSphere application server, see the IBM WebSphere documentation.
  3. Verify that the application path is to the 
    CALiveAPICreator.war
     file. While mapping resource references to resources, map the 
    Layer7 Live API Creator
     module to the configured authentication token database, the 
    jdbc/MyDB
     resource.
Install an individual 
Layer7 Live API Creator
 component using the WAR file pertaining to that component. These files are located in the 
/production
 directory.
Follow these steps:
 
  1. Retrieve the WAR file for the component you want to install from your 
    Layer7 Live API Creator
     bundle.
    •  
      APICreator.war
      , which installs API Creator.
    •  
      APIServer.war
      , which installs API Server.
    •  
      DataExplorer.war
      , which installs Data Explorer.
  2. Using the administrative console, install the WAR as an application in your WebSphere server.
Optional Configuration
The following topic provides optional configuration details.
The following optional configurations require that you restart WebSphere after you configure.
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
 on WebSphere.
Enable Other Options as Startup
The following are options that you can enable at startup:
 Add these options before starting your server only once. Do not add these options as part of normal operations.
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 TeamSpace user to log in to accept the user license, which pre-accepts the terms of the End User License Agreement (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 WebSphere with 
Layer7 Live API Creator
, you must install the API Server license file. You can install this file when you start your WebSphere service by adding the 
LAC_DEFAULT_LICENSE_FILE
 option when you start API Server:
LAC_DEFAULT_LICENSE_FILE
Example:
 
<...WebSphere 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 passwords for the system administrator (
sa
) user and for the initial API developer (a TeamSpace user) for the default TeamSpace as options when you started 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:
<...WebSphere 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 you set using 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:
 
<...WebSphere Server startup...> -DLAC_REPOSITORY_CONFIGURATION_URL=<Complete path to your admin repository, URL or Git>
Specify the Location to Where you Want 
Layer7 Live API Creator
 to Add your Admin Repository
The first time that you start WebSphere with 
Layer7 Live API Creator
, you must set the location for your admin repository at startup by adding the 
LAC_REPOSITORY_ROOT
 option 
when you start API Server:
LAC_REPOSITORY_ROOT
Example:
 
<...WebSphere startup...> -DLAC_REPOSITORY_ROOT=${HOME}/CALiveAPICreator.repository
You can change the location by adding this option at server startup.
Start your WebSphere Application Server
Issue the following command based on your operating system:
(AIX)
/usr/IBM/WebSphere/AppServer/bin/startServer.sh <
server_name>
-profileName <
profile_name>
\ -username <
user_name>
-password <
password>
(Windows)
"C:\Program Files\IBM\WebSphere\AppServer\bin\startServer.bat" <
server_name>
-profileName <
profile_name>
-username <
user_name>
-password <
password>
(Linux and Solaris)
/opt/IBM/WebSphere/AppServer/bin/startServer.sh <
server_name>
-profileName <
profile_name>
\ -username <
user_name>
-password <
password>
The WebSphere application server starts and 
Layer7 Live API Creator
 is installed.
(Optional) Check the Logs
You can optionally verify your installation and verify that there are no exceptions by checking the logs in the WebSphere application server.
For more information about the High Performance Extensible Logging (HPEL) log and trace facility that is included with WebSphere, see the IBM WebSphere documentation.
 If you see an error and the server does not start properly, fix the error then stop and restart the server.
Log in to API Creator
You can access the 
Layer7 Live API Creator
 component WARs that you have installed on WebSphere 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:9043/<ContextRoot>/DataExplorer
Follow these steps:
 
  1. Enter the following URL into a web browser window:
    http://localhost:9043/<ContextRoot>/APICreator
    The API Creator logon authentication dialog opens.
  2. Log in to API Creator as a TeamSpace user. 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 a TeamSpace user.
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 and you did not specify a license file when you started WebSphere (by adding the 
LAC_DEFAULT_LICENSE_FILE
 option at WebSphere startup), you must now upload it.
For more information about how to upload the API Server license, 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.
WebSphere Limitations
The following are known limitations when running 
Layer7 Live API Creator
 on WebSphere:
  • You can import and export your APIs only in JSON format.
    For more information about this limitation, see Release Notes.
  • You cannot send binary data to REST endpoints.