Configure an API Gateway domain

This topic describes how to use the managedomain command in interactive mode to configure a managed API Gateway. It shows how to register a host in a new domain, and create a new API Gateway instance. These are the minimum steps required to configure a domain.

Note   This topic assumes that you have already installed the API Gateway (see the API Gateway Installation Guide). To use the API Gateway, you must have a domain configured in your installation.If you installed the QuickStart tutorial, an example domain was created automatically. If you did not install QuickStart, you must configure a domain using managedomain.

A single API Gateway installation supports a single API Gateway domain only. If you wish to run API Gateways in different domains on the same host, you need separate installations for each domain. For details API Gateway domains and groups, see the API Gateway Concepts Guide.

You can also use the topology view in the web-based API Gateway Manager tool to manage a newly created domain. For example, you can perform tasks such as create or delete API Gateway groups and instances,and start or stop API Gateway instances. For more details, see Manage domain topology in API Gateway Manager.

Managedomain script

When configuring a domain, the managedomain script enables you to perform tasks such as the following:

  • Host management (registering and deleting hosts, or changing Admin Node Manager credentials)
  • API Gateway management (creating and deleting API Gateway instances, or adding UNIX/Linux services)
  • Group management (editing or deleting API Gateway groups)
  • Topology management (viewing topologies)
  • Deployment (deploying to a group, listing deployments, creating or downloading deployment archives, and editing group passphrases)
  • Domain SSL certificates (regenerating SSL certificates on localhost)

For example, you can use the managedomain script to register a host in a domain and create a new API Gateway instance. These are the minimum tasks required to create a new domain, and which are documented in this topic.

Managedomain options

For details on selecting specific options, enter the managedomain command in the following directory, and follow the instructions at the command prompt:

INSTALL_DIR/apigateway/posix/bin
Note   To register an API Gateway instance as a service on UNIX/Linux, you must run the managedomain command as root.

For more details on managedomain options, see Managedomain command reference. For details on how to use the managedomain command to configure SSL certificates and Admin Node Manager high availability, see Configure Admin Node Manager high availability.

Register a host in a domain

To register a host in a managed domain, perform the following steps:

  1. Change to the following directory in your API Gateway installation:
  2. INSTALL_DIR/apigateway/posix/bin
  3. Enter the following command:
  4. Enter 1 to register your host, and follow the instructions when prompted. For example, if this is the first host in the domain, enter y to configure an Admin Node Manager on the host. Alternatively, to add the host to an existing domain, enter n to configure a local Node Manager that connects to the Admin Node Manager in the existing domain.
  5. Enter q to quit when finished.
  6. Enter the following command to start the Admin Node Manager or local Node Manager on the registered host:
Note   Before registering multiple hosts in a domain, you must first ensure that a licensed API Gateway is installed on each host machine. Then to register each host, you must select option 1 on each host machine.

You must ensure the Admin Node Manager is running in the domain to enable monitoring and management of API Gateway instances.

Create an API Gateway instance

To create an API Gateway instance, perform the following steps:

  1. Open a new command window.
  2. Change to the following directory in your API Gateway installation:
  3. INSTALL_DIR/apigateway/posix/bin
  4. Enter the following command:
  5. Enter 5 to create a new API Gateway instance, and follow the instructions when prompted. You can repeat to create multiple API Gateway instances on local or remote hosts.
  6. Enter q to quit when finished.
  7. Use the startinstance command to start API Gateway, for example:
Note   You can add an API Gateway instance on any registered host in the domain, not just the local host. However, if you are creating UNIX/Linux services for API Gateway, you must run managedomain on same host.

You must run startinstance on the host on which you intend to start the instance. You must ensure that the startinstance file has execute permissions. Running startinstance without any arguments lists all API Gateway instances available on the host.

Test the health of an API Gateway instance

You can test the connection to the new API Gateway instance by connecting to the Health Check service. For example, enter the following default URL in your browser:

This should display a simple <status>ok</status> message.

You can view the newly created API Gateway instance on the API Gateway Manager dashboard. For example, the default URL is as follows:

The port numbers used to connect depend on those entered when configuring the domain using managedomain, and are available from the localhost only.

Alternatively, you can also connect to the new API Gateway instance in Policy Studio. For more details, see Start and stop the API Gateway.

Related Links