6 Managing Instances

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

This chapter contains the following sections:

Creating Oracle Traffic Director Instances

You can create Oracle Traffic Director instances of a configuration by using either Fusion Middleware Control or the WLST.

Note:

To be able to create an instance, you should have defined a configuration. For more information, see Creating a Configuration

Creating Oracle Traffic Director Instances Using the 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.
  9. A message is displayed confirming the successful creation of the instance.
  10. The Instances page is displayed, showing the instance that you just created.

Creating an Oracle Traffic Director Instance Using WLST

To create one or more Oracle Traffic Director instances, run the otd_createInstance command.

For example, the following command creates an instance of the configuration named foo on the 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()

Note:

On Microsoft Windows, at any point, only one domain with OTD instances is allowed. However, there can be multiple domains without Oracle Traffic Director instances.

For more information, see otd_createInstance command in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

For more information on the offline mode, see Offline Commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

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

You can view a list of Oracle Traffic Director instances by using either Fusion Middleware Control or the WLST.

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 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 view instance.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Instances.
  7. The Instances page is displayed, showing the instances of the configuration, as shown below.

    Figure 6-1 List of Instances

    Description of Figure 6-1 follows
    Description of "Figure 6-1 List of Instances"

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:

# 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()

For more information, see the otd_listInstances in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

For more information on the offline mode, see Offline Commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

Starting, Stopping, and Restarting Oracle Traffic Director Instances

You can start, stop, and restart Oracle Traffic Director instances by using either Fusion Middleware Control or the WLST.

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')

For more information about the WLST commands mentioned in this section, see WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

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.

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 as follows:

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

For more information, see the softrestart command in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

Deleting Oracle Traffic Director Instances

You can delete instances of a configuration by using either Fusion Middleware Control or the WLST.

Deleting an Oracle Traffic Director Instance Using Fusion Middleware Control

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.

    Note:

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

    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.

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()

For more information, see otd_deleteInstance command in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

For more information on the offline mode, see Offline Commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

Controlling Oracle Traffic Director Instances Through Scheduled Events

As an administrator, if you have to manage a large number of Oracle Traffic Director configurations and their instances, repetitive tasks such as restarting and reconfiguring instances of each configuration individually can become tedious. You can schedule events for administrative tasks to be performed automatically at defined intervals, or on specific days of the week, times of the day, or dates of the month.

You can create and manage events by using either Fusion Middleware Control or the WLST.

Managing Events Using Fusion Middleware Control

  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.

    It lists events that are currently scheduled for the configuration.

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

      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 Activate 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)
    

For more information about the WLST commands mentioned in this section, see WebLogic Scripting Tool Command Reference for Oracle Traffic Director.