6 Managing Instances

An instance is an Oracle Traffic Director server running on a Node Manager, or on the server, and listening on one or more ports for requests from clients.

This chapter contains the following sections:

Creating Oracle Traffic Director Instances

After creating a configuration, you can create Oracle Traffic Director server instances by deploying the configuration on one or more hosts.

Topics

You can create Oracle Traffic Director instances of a configuration by using either Fusion Middleware Control or the WLST as described in the following topics:

Note:

Ensure that you have defined a configuration before you create an instance. See Creating an Oracle Traffic Director Configuration

Creating Oracle Traffic Director Instances Using Fusion Middleware Control

To create Oracle Traffic Director instances of a configuration by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control for Traffic Director, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to create an instance.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances.
    The Instances page is displayed
  7. In the Common Tasks pane, click Create.
    The New Instance wizard is displayed.
  8. Select the check boxes corresponding to the administration nodes on which you want to create instances of the configuration. Then, click OK.
    A message is displayed confirming the successful creation of the instance. The Instances page is displayed, showing the instance that you just created.

Creating Oracle Traffic Director Instance Using WLST

To create one or more Oracle Traffic Director instances, run the otd_createInstance command. You can run the command in online and offline modes.

Note:

On Microsoft Windows, only a single domain with Oracle Traffic Director instance is allowed. However, there can be multiple domains without Oracle Traffic Director instances.

In the examples, the otd_createInstance creates an instance of the configuration named foo on machine machine1.

# Online
props = {}
props['configuration'] = 'foo'
props['machine'] = 'machine1'
otd_createInstance(props)
# Offline
readDomain('/export/2110_12c/iplanet/ias/server/work/TD_Linux2.6_DBG.OBJ/domains/otd_domain')
props = {}
props['configuration'] = 'foo'
props['machine'] = 'machine1'
otd_createInstance(props)
updateDomain()
closeDomain()

Viewing a List of Oracle Traffic Director Instances

After creating Oracle Traffic Director server instances, you can view the current state of each instance. To view a list of the Oracle Traffic Director instances of a configuration, run the otd_listInstances command.

You can view a list of Oracle Traffic Director instances by using either Fusion Middleware Control or the WLST as described in the following topics:

Viewing a List of Oracle Traffic Director Instances Using Fusion Middleware Control

To view a list of the Oracle Traffic Director instances of a configuration by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control for Traffic Director, as described in Graphical User Interface-Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to view instance.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances.
    The Instances page is displayed, showing the instances of the configuration.

You can view the properties of an instance by clicking on its name.

Viewing a List of Oracle Traffic Director Instances Using WLST

To view a list of the Oracle Traffic Director instances of a configuration, run the otd_listInstances command, as shown in the following example. You can run this command in online and offline modes.

# Online
props = {}
props['configuration'] = 'foo'
otd_listInstances(props)
# Offline
readDomain('/export/2110_12c/iplanet/ias/server/work/TD_Linux2.6_DBG.OBJ/domains/otd_domain')
props = {}
props['configuration'] = 'foo'
otd_listInstances(props)
closeDomain()

Starting, Stopping, and Restarting Oracle Traffic Director Instances

After creating a configuration, you can create start or stop them. To start, stop, or restart one or more Oracle Traffic Director instances of a configuration, run the start, shutdown, or softRestart command.

You can start, stop or restart configurations by using either Fusion Middleware Control or WLST as described in the following topics:

Starting, Stopping, and Restarting Oracle Traffic Director Instances Using Fusion Middleware Control

To start, stop, or restart Oracle Traffic Director instances by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control for Traffic Director, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to start, stop, or restart instances.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances.
    The Instances page is displayed
  7. Select on the list of instances available.
    Click the Start Instances, Stop Instances, or Restart Instances button, as required, for the instance that you want to start, stop, or restart.

Starting, Stopping, and Restarting Oracle Traffic Director Instances Using WLST

To start, stop, or restart one or more Oracle Traffic Director instances of a configuration, run the start, shutdown, or softRestart command.

For example, the following three commands start, restart, and stop the instance the instance on the machine otd_foo_machine1.

start('otd_foo_machine1')

shutdown('otd_foo_machine1')

softRestart('otd_foo_machine1')

Updating Oracle Traffic Director Instances Without Restarting

When you make changes to some configuration parameters, the running Oracle Traffic Director instances of the configuration need not be restarted for the changes in the configuration to take effect. You can dynamically reconfigure the Oracle Traffic Director instances to reflect the new configuration.

Only dynamically reconfigurable changes in the configuration take effect. Changes in the user, temp-path, log, thread-pool, pkcs11, stats, dns, dns-cache, ssl-session-cache, and access-log-buffer settings remain the same after a reconfiguration procedure is completed. A restart-required exception is thrown if there are any such changes that require restart when a reconfiguration is done.

For a list of the parameters that support dynamic reconfiguration, see Dynamic Reconfiguration in the Configuration File Reference for Oracle Traffic Director .

You can dynamically reconfigure the running instances of a configuration by using either Fusion Middleware Control or the WLST as described in the following topics:

Reconfiguring an Oracle Traffic Director Instance Using Fusion Middleware Control

To reconfigure an Oracle Traffic Director instance by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control for Traffic Director, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations. A list of the available configurations is displayed.
  4. Select the configuration for which you want to reconfigure instances.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances. The Instances page is displayed
  7. Select the Instance from the list available.
  8. Click the Reconfigure button for the instance that you want to update dynamically.

    A message is displayed in the Console Messages pane confirming that the instance was reconfigured.

Reconfiguring Oracle Traffic Director Instances Using WLST

To reconfigure instances of a configuration using WLST, run the softrestart command.

For example, the softrestart command reconfigures the instance on the machine otd_foo_machine1.

props = java.util.Properties()
props.setProperty("MODE", "RECONFIG")
softRestart('otd_foo_machine1', props=props)

Deleting Oracle Traffic Director Instances

You can delete Oracle Traffic Director instances that are no longer required. To delete Oracle Traffic Director instances of a configuration, run the otd_deleteInstance command

Topics

You can delete instances of a configuration by using either Fusion Middleware Control or the WLST as described in the following topics:

Deleting Oracle Traffic Director Instances Using Fusion Middleware Control

Note:

To delete an instance that is part of a failover group, you should first remove the instance from the failover group. See Managing Failover Groups.

To delete an Oracle Traffic Director instance by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control for Traffic Director, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to delete instances.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances.
    The Instances page is displayed.
  7. Select the Instance from the list available.
  8. Click the Delete button for the instance that you want to delete.
    A message is displayed in the Console Messages pane confirming that the instance was deleted.

Deleting Oracle Traffic Director Instances Using WLST

To delete Oracle Traffic Director instances of a configuration, run the otd_deleteInstance command. You can run this command in online and offline modes.

For example, the following command deletes the instance of the configuration:

# Online
props = {}
props['configuration'] = 'foo'
props['instance'] = 'otd_foo_machine1'
otd_deleteInstance(props)
# Offline
readDomain('/export/2110_12c/iplanet/ias/server/work/TD_Linux2.6_DBG.OBJ/domains/otd_domain')
props = {}
props['configuration'] = 'foo'
props['instance'] = 'otd_foo_machine1'
otd_deleteInstance(props)
updateDomain()
closeDomain()

Controlling Oracle Traffic Director Instances Through Scheduled Events

If you have to manage a large number of configurations and their instances you can schedule events for  tasks to be performed automatically at defined intervals; or on specific days of the week, times of the day, or dates of the month.

Topics

You can create and manage events by using either Fusion Middleware Control or the WLST as described in the following topics:

Managing Events Using Fusion Middleware Control

To create and manage events by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Graphical User Interface-Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations. A list of the available configurations is displayed.
  4. Select the configuration for which you want to do schedule events.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Advanced Configurations > Scheduled Events.

    The Scheduled Events page is displayed.

  7. Scroll down to the Scheduled Events section of the page.

    The events that are currently scheduled for the configuration are listed.

    • To enable or disable an event, select the Enable/Disable check box.

    • To delete an event, click the Delete icon.

    • To create an event, click New Event.

      The New Configuration Event dialog box is displayed.

  8. Select the event that you want to schedule, and specify the interval or time at which the event should be performed, and then click OK.
    A message, confirming the change, 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 Activating Configuration Changes.

Managing Events Using WLST

  • Creating an event

    To create an event, run the otd_createEvent command, as shown in the following examples.

    props = {}
    props['configuration'] = 'foo'
    props['event'] = 'event-1'
    props['command'] = 'bar'
    props['time'] = '12:00'
    otd_createEvent(props)
    

    The first command schedules an event to perform the command 'bar' at 12:00pm.

    Note:

    For the scheduled events to take effect, you should redeploy the configuration.

  • Viewing a list of events

    To view a list of scheduled events, run the otd_listEvents command.

    For example, to display the events scheduled for instances of the configuration:

    props = {}
    props['configuration'] = 'foo'
    otd_listEvents(props)
    
  • Disabling an event

    When you create an event, it is enabled automatically:

    The command 'otd_setEventProperties' with 'enabled' as 'false' can be used to disable the event

    To disable an event, set the enabled property to false:

    props = {}
    props['configuration'] = 'foo'
    props['event'] = 'bar'
    props['enabled'] = 'false'
    otd_setEventProperties(props)
    
  • Enabling an event

    The command 'otd_setEventProperties' with 'enabled' as 'true' must be used to enable the event

    To enable an event, set the enabled property to true:

    props = {}
    props['configuration'] = 'foo'
    props['event'] = 'event-1'
    props['enabled'] = 'true'
    otd_setEventProperties(props)
    
    
  • Deleting an event

    To delete an event, run the otd_deleteEvent command:

    props = {}
    props['configuration'] = 'foo'
    props['event'] = 'event-1'
    otd_deleteEvent(props)