4 Managing Configurations

The first step toward creating a load-balanced service with Oracle Traffic Director is to create a configuration, which is a collection of metadata defining the run-time characteristics of an Oracle Traffic Director server. After creating a configuration, you can use it to create instances of Oracle Traffic Director servers on one or more administration nodes.

Note:

For the definitions of the Oracle Traffic Director terminology—configuration, administration node, and instance, see Oracle Traffic Director Terminology. For information about the relationship between configurations, administration nodes, and instances, see Figure 1-2 in Getting Started with Oracle Traffic Director.

This chapter contains the following topics:

Creating a Configuration

You can create configurations by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Oracle Java Cloud Service creates the initial configuration when you create an Oracle Java Cloud Service instance with a load balancer or add a load balancer to an Oracle Java Cloud Service instance. You need to create a configuration only if you require additional configurations.

Before You Begin

Before you begin creating a configuration, decide the following:

  • A unique name for the configuration. Choose the name carefully; after creating a configuration, you cannot change its name.

  • The user ID with which the Oracle Traffic Director instances of the configuration should run.

    Note:

    The server user that you specify for a configuration must meet the following requirements:

    • When the administration server is running as root, the server user of a configuration must either be root or belong to the same group as the user that installed Oracle Traffic Director.

    • When the administration server is running as a non-root user, the server user of a configuration must be the same as the administration server's server user.

    Note that the nodes to which a configuration is deployed must be homogenous in terms of the user accounts and groups configured on those systems.

  • A unique listener host:port combination for the default virtual server that you will create as part of the configuration.

  • host:port addresses of the servers in the origin-server pool that you will create as part of the configuration.

  • (optional) Host names of the administration nodes on which you want to create instances of the configuration.

    Note:

    While creating a configuration by using the New Configuration wizard, you can choose to also instantiate the configuration on one or more administration nodes. The wizard enables you to do this by displaying the host names of the administration nodes that are registered with the administration server.

Creating a Configuration Using the Administration Console

To create a configuration by using the administration console, do the following tasks:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. In the Common Tasks pane, click New Configuration.

    The New Configuration wizard starts.

    Figure 4-1 New Configuration Wizard

    Description of Figure 4-1 follows
    Description of "Figure 4-1 New Configuration Wizard"
  3. Follow the on-screen prompts to complete creation of the configuration by using the details—listener port, origin-server addresses, and so on—that you decided earlier.

    After the configuration is created, the Results screen of the New Configuration wizard displays a message confirming successful creation of the configuration. If you chose to create instances of the configuration, then a message confirming successful creation of the instances is also displayed.

  4. Click Close on the Results screen.

    In the New Configuration wizard, if you chose not to create an instance of the configuration, the message Undeployed Configuration is displayed, indicating that the configuration that you just created is yet to be deployed.

Creating a Configuration Using the CLI

To create a configuration, run the create-config command.

For example, the following command creates a configuration named soa.example.com with the virtual server and port soa-app.example.com:1905 and two origin servers, soa-1.example.com:80 and soa-2.example.com:80.

tadm> create-config --listener-port=1905 --server-name=soa-app.example.com
 --origin-server=soa-1.example.com:80,soa-2.example.com:80 soa.example.com

For more information about create-config, see the Oracle Traffic Director Command-Line Reference or run the command with the --help option.

Viewing a List of Configurations

At any time, you can view a list of the available configurations by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Viewing a List of Configurations Using the Administration Console

To view a list of the available configurations by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available Configurations is displayed, as shown in Figure 4-2.

    Figure 4-2 List of Configurations

    Description of Figure 4-2 follows
    Description of "Figure 4-2 List of Configurations"

You can view the properties of a configuration by clicking on its name.

Viewing a List of Configurations Using the CLI

To view a list of the available configurations, run the list-configs command, as shown in the following example:

tadm> list-configs --verbose --all
config-name      deployment-status
---------------------------------
soa  deploy-pending
adm  undeployed
dev  deployed
org  instance-modified

Deployment Statuses

A configuration can be in one of the following statuses:

  • Deployed: One or more instances of the configuration exist. All of the instances have the updated configuration settings.

  • Deployment pending: One or more instances of the configuration exist. But the instances do not have the latest configuration settings.

  • Undeployed: No instances exist for the configuration.

  • Instance modified: The settings of one or more instances of the configuration have been manually modified.

Deploying a Configuration

You deploy a configuration to either create an instance of it on an administration node or update a previously created instance with new configuration settings. When you deploy a configuration, the running instances are reconfigured to reflect the configuration changes.

Note:

Certain configuration changes cannot be applied dynamically without restarting the instances. For the configuration changes that require instances to be restarted, the administration interfaces—CLI and administration console—display a prompt to restart the instances.

You can deploy a configuration by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Deploying a Configuration Using the Administration Console

To deploy a configuration by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.

  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration that you want to deploy.

    If there is no instance yet of the configuration that you selected to deploy, the message Undeployed Configuration is displayed at the top of the main pane. For the procedure to create one or more instances of an undeployed configuration, see Creating Oracle Traffic Director Instances.

    If instances of the configuration exist, but do not have the latest configuration settings, the message Deployment Pending is displayed at the top of the main pane. To update the instances with the latest configuration settings, do the following:

    1. Click Deploy Changes.

      A prompt to confirm deployment is displayed.

    2. Click Deploy.

      A message is displayed confirming that the updated configuration was successfully deployed.

    3. Click Close.

Deploying a Configuration Using the CLI

To deploy a configuration, run the deploy-config command.

For example, the following command updates all instances of the configuration soa.example.com with the latest configuration settings.

tadm> deploy-config soa.example.com
OTD-70201 Command 'deploy-config' ran successfully.

For more information about deploy-config, see the Oracle Traffic Director Command-Line Reference or run the command with the --help option.

After deploying an updated configuration, for the changes to take effect, you should restart the instance.

Note:

For some parameters, you can reconfigure an instance without restarting it. For more information, see Updating Oracle Traffic Director Instances Without Restarting.

Modifying a Configuration

After you create a configuration and create instances from it, you might need to change some of the settings—log preferences, performance parameters, virtual server listener, origin-server pools, and so on.

You can modify a configuration by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Modifying a Configuration Using the Administration Console

To modify a configuration by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration that you want to modify.
  4. In the navigation pane, you can select the following additional categories of settings for the configuration. The parameters relevant to the selected category are displayed on the main pane.
    • SSL

    • Logging

      • Set and change parameters for the server log file—name and location of the log file, log level, date format, and so on.

      • Enable and disable the access log.

      • Set and change parameters for the access log file—name and location of the log file and log format

      • Schedule and manage events to rotate the server and access log files.

      • Configure access-log buffer settings to tune performance.

      For more information, see Managing Logs.

    • Advanced Settings

    • HTTP, under Advanced Settings: Set and change parameters to tune the performance of the virtual servers defined for the configuration—such as, request buffer size, response buffer size, timeout thresholds for the request body and header, thread-pool settings, and keep-alive settings.

      For more information, see Tuning HTTP Request and Response Limits.

    • Monitoring, under Advanced Settings

      • Enable and disable statistics collection, profiling, and the SNMP subagent.

      • Specify the statistics-collection interval.

      For more information, see Monitoring Oracle Traffic Director Instances.

    Note:

    For information about modifying origin servers, origin-server pools, listeners, and virtual servers, see:

  5. Specify the parameters that you want to change.

    On-screen help and prompts are provided for all of the parameters.

    When you change the value in a field or tab out of a text field that you changed, the Save button near the upper right corner of the page is enabled.

    At any time, you can discard the changes by clicking the Reset button.

  6. After making the required changes, click Save.
    • A message, confirming that the updated configuration was saved, is displayed in the Console Messages pane.

    • In addition, the Deployment Pending message is displayed at the top of the main pane. You can either deploy the updated configuration immediately by clicking Deploy Changes, or you can do so later after making further changes as described in Deploying a Configuration.

    Note:

    In the Advanced Settings page, if you change the Temporary Directory value, you should first stop all the instances of the configuration, deploy the changes, and then start the instances.

    If you deploy the changes without stopping the running instances, an error would occur when you attempt to stop the instances later. For information about solving this problem, see Unable to stop instance after changing the temporary directory.

Modifying a Configuration Using the CLI

The CLI provides several commands (see Table 4-1) that you can use to change specific parameters of a configuration.

Note:

For information about the CLI commands to change the properties of virtual servers, listeners, origin server pools, and origin servers in a configuration, see the following chapters:

Table 4-1 CLI Commands for Modifying a Configuration

Task CLI Commands

Change the server user and temporary directory

set-config-prop

Change access-log buffer properties

set-access-log-buffer-prop

get-access-log-buffer-prop

Change caching properties

set-cache-prop

get-cache-prop

Change DNS properties

set-dns-prop

get-dns-prop

Change DNS caching properties

set-dns-cache-prop

get-dns-cache-prop

Change HTTP request properties

set-http-prop

get-http-prop

Change keep-alive settings for client connections

set-keep-alive-prop

get-keep-alive-prop

Change the default language

set-localization-prop

get-localization-prop

Change error log settings

set-log-prop

get-log-prop

Change PKCS #11 encryption settings

set-pkcs11-prop

get-pkcs11-prop

Change QoS settings

set-qos-prop

get-qos-prop

Enable SNMP

set-snmp-prop

set-snmp-prop

Change SSL/TLS session caching properties

set-ssl-session-cache-prop

get-ssl-session-cache-prop

Change statistics collection properties

set-stats-prop

get-stats-prop

Change TCP thread pool properties

set-tcp-thread-pool-prop

Change HTTP thread pool properties

set-thread-pool-prop

get-thread-pool-prop

For example, the following command changes the location of the error log file for the configuration soa to /home/log/errors.log.

tadm> set-log-prop --config=soa log-file=/home/log/errors.log
OTD-70201 Command 'set-log-prop' ran successfully.

For the updated configuration to take effect, you should deploy it to the Oracle Traffic Director instances by using the deploy-config command.

For more information about the CLI commands mentioned in this section, see the Oracle Traffic Director Command-Line Reference or run the commands with the --help option.

Synchronizing Configurations Between the Administration Server and Nodes

When you create a configuration, the configuration files—server.xml and vs_name-obj.conf—are created in the configuration store on the administration server.

When you create instances of the configuration, the configuration files are copied from the configuration store to the instance-specific configuration directories on the nodes, as in the following examples:

INSTANCE_HOME/net-soa.example.com/config
INSTANCE_HOME/net-dev.example.com/config

So the configuration files in the instance-specific configuration directories are usually identical to the configuration files stored in the configuration store on the administration server. In the following situations, a configuration stored on the administration server can be different from that of its instances.

  • You modified a configuration on the administration server, by using the administration console or CLI, but have not yet deployed the modified configuration to its instances.

    You can rectify this out-of-sync situation by deploying the configuration as described in Deploying a Configuration.

  • You changed the configuration of an instance manually, by editing a configuration file directly in the instance's config directory.

If you change the configuration of an instance manually by editing a configuration file—server.xml or vs_name-obj.conf in the INSTANCE_HOME/net-config_name/config directory, the next time you log in to the administration console and view the configuration, the alert Instance Configuration Modified is displayed. The alert indicates that the configuration stored on the administration server is different from the current configuration settings of one or more instances. The alert continues to be displayed till you synchronize the configuration stored on the administration server with that of all its instances, by doing one of the following:

  • Pull the modified configuration from one of the modified instances back into the configuration store of the administration server.

  • Discard the instance-specific configurations by redeploying the configuration from the administration server to the modified instances.

You can synchronize a configuration on the administration server with its instances by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Synchronizing Configurations on the Administration Server and Administration Nodes Using the Administration Console

To synchronize a configuration stored on the administration server with that of its instances by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration for which one or more instances have been modified. You can identify the configuration from its status, which would be Instance Configuration Modified.

    The Instances page of the configuration is displayed, with the Instance Configuration Modified button at the top of the main pane.

  4. Click the Instance Configuration Modified button.

    The Deploy Configuration dialog box is displayed.

    • If you want to discard all of the instance-specific configurations and deploy the configuration that is currently stored on the administration server to all the instances, select the Discard Instance Changes option.

    • If you want to pull the configuration of a modified instance to the administration server, select Pull and Deploy Configuration from Node, and select the appropriate administration node.

      For each administration node, you can review the names of the configuration files that are different from the configuration store on the administration server, by clicking View Details.

  5. Click OK.

    A message is displayed confirming that the configuration was successfully deployed.

  6. Click Close.

Synchronizing Configurations on the Administration Server and Administration Nodes Using the CLI

To discard the instance-specific configurations and deploy the configuration that is currently stored on the administration server to all the instances, run the following command:

tadm> deploy-config -- force config_name

To pull configuration files from an instance to the configuration store on the administration server, run the following commands:

tadm> pull-config --config=config_name node

tadm> deploy-config config_name

For more information about the CLI commands mentioned in this section, see the Oracle Traffic Director Command-Line Reference or run the commands with the --help option.

Copying a Configuration

When you want to create a configuration that is similar to an existing configuration, you can copy the existing configuration and make the required changes later.

You can copy a configuration by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Copying a Configuration Using the Administration Console

To copy a configuration by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration that you want to copy.
  4. In the Common Tasks pane, click Duplicate Configuration.
  5. In the resulting dialog box, enter a name for the new configuration, and then click Duplicate

    A message is displayed confirming that the configuration was copied.

  6. Click Close.

Copying a Configuration Using the CLI

To copy a configuration, run the copy-config command.

For example, the following command copies the configuration soa.example.com to a new configuration named soa2.example.com.

tadm> copy-config --config=soa.example.com soa2.example.com
OTD-70201 Command 'copy-config' ran successfully.

For more information about copy-config, see the Oracle Traffic Director Command-Line Reference or run the command with the --help option.

Deleting a Configuration

You can delete a configuration by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Deleting a Configuration Using the Administration Console

To delete a configuration by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.

  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration that you want to delete.

  4. In the Common Tasks pane, click Delete Configuration.

    • If there are no instances of the configuration that you want to delete, a prompt to confirm deletion of the configuration is displayed.

      1. Click Delete.

        A message is displayed confirming that the configuration was deleted.

      2. Click Close.

    • If there are instances of the configuration that you want to delete, a dialog box is displayed listing the administration nodes on which the configuration is deployed. The list also indicates whether the instances are running.

      1. If you want to proceed with the deletion, you can choose to save the log files of the instances by selecting the Save Instance Logs check box.

        To confirm deletion, click Delete.

        A message is displayed confirming that the configuration and its instances were deleted.

      2. Click Close.

      Note:

      If you selected the Save Instance Logs check box, the server access and error logs for the instances that were deleted are retained in the INSTANCE_HOME/net-config_name/logs directory.

  5. Click the Delete button corresponding to the configuration that you want to delete.

Deleting a Configuration Using the CLI

Note:

You cannot delete a configuration by using the CLI if instances of the configuration are deployed to administration nodes, regardless of whether the instances are running or stopped.

To delete such a configuration by using the CLI, you must first delete all of its instances.

To delete a configuration, run the delete-config command, as shown in the following example:

tadm> delete-config --config=soa.example.com
OTD-70201 Command 'delete-config' ran successfully.

For more information about delete-config, see the Oracle Traffic Director Command-Line Reference or run the command with the --help option.

Viewing a List of Configuration Backups

When you redeploy a modified configuration to its instances, a backup of the previous configuration is stored in a zip file in the configuration store on the administration server.

You can view a list of the backups of a configuration by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Viewing a List of Configuration Backups Using the CLI

To view a list of the backups of a configuration by using the CLI, run the following command:

tadm> list-backups --config=config_name --verbose --all

The following is an example of the output of the list-backups command.

backup-id       backup-date
---------------------------
20110712_025354 "Jul 12, 2011 2:53:54 AM"
20110712_024410 "Jul 12, 2011 2:44:10 AM"
20110712_004743 "Jul 12, 2011 12:47:43 AM"
20110711_231826 "Jul 11, 2011 11:18:26 PM

As shown in the example output, each backup configuration has a unique ID, which is assigned automatically when it is created. The ID indicates the date and time when the backup was created.

Viewing a List of Configuration Backups Using the Administration Console

To view a list of the backups of a configuration by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration for which you want to view a list of backups.
  4. In the navigation pane, expand Configuration Settings, and select Backups.

    The Configuration Backups page is displayed. It lists the dates when backups of the configuration were created.

Restoring a Configuration from a Backup

When you redeploy a modified configuration to its instances, a backup of the previous configuration is created. For information about viewing a list of the available backups, see Viewing a List of Configuration Backups.

You can restore a configuration from a backup by using either the administration console or the CLI.

Note:

The CLI examples in this section are shown in shell mode (tadm>). For information about invoking the CLI shell, see Accessing the Command-Line Interface.

Restoring a Configuration from a Backup Using the Administration Console

To restore a configuration from a backup, by using the administration console, do the following:

  1. Log in to the administration console, as described in Accessing the Administration Console.
  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration for which you want to view a list of backups.
  4. In the navigation pane, select Advanced Settings.

    The Advanced Settings page is displayed.

  5. Scroll down to the Configuration Backups section of the page.
  6. Identify the backup that you want to restore, and click the icon displayed in the Restore column.

Restoring a Configuration from a Backup Using the CLI

To restore a configuration from a backup by using the CLI, run the following command:

tadm> restore-config --config=config_name --verbose --all