Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reworded note

...

Table of Content Zone
maxLevel4
locationtop

Step 3.1 - Configure the common configurations

Carryout the following configurations on the Gateway manager node.

Multiexcerpt
MultiExcerptNamecommon-gw-steps

Note that these configurations are common to the Gateway Manager and Gateway Worker nodes.

  1. Open the <API-M_HOME>/repository/conf/api-manager.xml file in the Gateway node.
  2. Modify the api-manager.xml file as follows. This configures the connection to the Key Manager component.

    noneChange admin password

    To change the admin passowrd see admin password go to Changing the super admin password, and pay attention to Note in the documnetation if there are special characters in the password. See the note given under step 2 for instructions to follow if your password has special characters.

  3. Configure key management related communication.

    trueCluster fronted by a load balancer
    1. In a clustered setup if the Key Manager is fronted by a load balancer, you have to use WSClient as KeyValidatorClientType in <API-M_HOME>/repository/conf/api-manager.xml. This should be configured in all Gateway and Key Manager components.

      none
    2. Disable the Thrift Client to optimize performance.
      You need to configure this in the Gateway  <API-M_HOME>/repository/conf/api-manager.xml file.

    Cluster without a load balancer
    1. In a clustered setup if the Key Manager is NOT fronted by a load balancer, you have to use ThriftClient as KeyValidatorClientType in <API-M_HOME>/repository/conf/api-manager.xml. This should be configured in all Gateway and Key Manager components.

      none
    2. Disable the Thrift Client to optimize performance.
      You need to configure this in the Gateway <API-M_HOME>/repository/conf/api-manager.xml file.

    3. Specify the ThriftClientPort and ThriftServerPort values. 10397 is the default.

    4. Specify the hostname or IP of the Key Manager. The default is localhost. In a distributed deployment we must set this parameter in both Key Manager nodes and Gateway nodes only if the Key Manager is running on a separate machine. Gateway uses this parameter to connect to the key validation thrift service.

  4. If you need to enable JSON Web Token (JWT) you have to enable it in all Gateway and Key Manager components.
    For more information on enabling JWT, see .

Step 3.2 - Configure the carbon.xml file

The following configurations are done in the <GATEWAY_MANAGER_HOME>/repository/conf/carbon.xml file.

  1. Open <GATEWAY_MANAGER_HOME>/repository/conf/carbon.xml.
  2. Locate the <HostName> tag and add the cluster host name:  <HostName>am.wso2.com</HostName>
  3. Locate the <MgtHostName> tag and uncomment it. Make sure that the management host name is defined as follows: <MgtHostName> mgt.am.wso2.com </MgtHostName> 

Step 3.3 - Configure the catalina-server.xml file

Specify the following configurations in the catalina-server.xml file located in the <GATEWAY_MANAGER_HOME>/repository/conf/tomcat/ directory.

Code Block
languagehtml/xml
<Connector  protocol="org.apache.coyote.http11.Http11NioProtocol"
                port="9763"
                proxyPort="80"
--------
/>
<Connector  protocol="org.apache.coyote.http11.Http11NioProtocol"
                port="9443"
                proxyPort="443"
--------
/>

The TCP port number is the value that this Connector will use to create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address.

Step 3.4 - Map the hostnames to IPs

Open the server's /etc/hosts file and add the following.

Code Block
languagenone
<GATEWAY-WORKER-IP> am.wso2.com

In this example, it would look like this:

Code Block
languagenone
xxx.xxx.xxx.xx4 am.wso2.com

Once you replicate these configurations for all the manager nodes, your Gateway manager is configured. Next configure the Gateway worker.  

...