Configuring a Managed Domain

Overview

This topic describes how to use the managedomain script to configure a managed API Gateway domain. 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.

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 creating and deleting groups and API Gateway instances.

[Important] Important

To use the API Gateway, you must have a domain configured in your API Gateway installation. If you did not already configure a domain when installing the API Gateway, 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 an introduction to the API Gateway domain and group runtime architecture, see the Oracle API Gateway User Guide.

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 Windows and Linux/Solaris 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)

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, which are documented in this topic.

Further Information

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

Windows INSTALL_DIR\apigateway\Win32\bin
UNIX/Linux INSTALL_DIR/apigateway/posix/bin


[Note] Note

To register an API Gateway instance as a service on Windows or Linux/UNIX, you must run the managedomain command as Administrator on Windows or root on Linux/UNIX.

For more details on managedomain options, see Managedomain Command Reference.

Registering 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:

    Windows INSTALL_DIR\apigateway\Win32\bin
    UNIX/Linux INSTALL_DIR/apigateway/posix/bin

  2. Enter the following command:

    managedomain

  3. 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.

  4. Enter q to quit when finished.

  5. Enter the following command to start the Admin Node Manager or local Node Manager on the registered host:

    nodemanager

[Note] Note

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

When registering multiple hosts in a domain, the API Gateway must be installed on each host machine, and option 1 must be run on each machine.

Creating 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:

    Windows INSTALL_DIR\apigateway\Win32\bin
    UNIX/Linux INSTALL_DIR/apigateway/posix/bin

  3. Enter the following command:

    managedomain

  4. 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.

  5. Enter q to quit when finished.

  6. Use the startinstance command to start the API Gateway, for example:

    startinstance -n "my_server" -g "my_group"

[Note] 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 Windows or UNIX services for the API Gateway, you must run managedomain on same host.

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

Connecting to 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:

http://HOST:8080/healthcheck

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:

https://HOST:8090

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 the Policy Studio. For more details, see Installing the Policy Studio.

Managing a Domain in API Gateway Manager

You can also use the topology view in the web-based API Gateway Manager tool to manage an existing domain. For example, you can perform tasks such as creating or deleting groups and API Gateway instances.

[Note] Note

When using API Gateway Manager to manage an existing domain, you must ensure that the host was first registered in the domain (for example, using managedomain). If you create an API Gateway instance, you must start it on the command line using startinstance.

Managing Groups

To use the API Gateway Manager to create an API Gateway group, perform the following steps:

  1. Click the Menu button in the topology view on the Dashboard tab.

  2. Select Create New Group.

  3. Enter a group name (for example, Engineering).

  4. Click OK.

To delete a group, perform the following steps:

  1. Ensure that the API Gateway instances in the group have been stopped.

  2. Hover over the group in the topology view, and click the edit button on the right.

  3. Select Delete Group.

  4. Click OK.

Managing API Gateway Instances

To use the API Gateway Manager to create an API Gateway instances, perform the following steps:

  1. Hover over the API Gateway instance in the topology view, and click the edit button on the right.

  2. Select Create New Group.

  3. Configure the following fields:

    • Name: API Gateway instance name (for example, Server2).

    • Management Port: Local management port (for example, 8086).

    • Services Port: External traffic port (for example, 8081).

    • Host: Host address (for example, 127.0.0.1).

  4. Click OK.

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

  1. Ensure that the API Gateway instance has been stopped.

  2. Hover over the API Gateway instance in the topology view, and click the edit button on the right.

  3. Select Delete Server.

  4. Click OK.