3 Setting up an Administration Domain

Setting up an Oracle Traffic Director domain starts with creating an administration domain, either managed or standalone. It also includes creating a repository and creating a load balancer.

This chapter includes the following sections:

Types of Administration Domain

You need to create an administration domain for managing Oracle Traffic Director instances. The administration domain can either be managed or standalone.

This section describes the various domain types supported in Oracle Traffic Director.

Managed Domain

A managed domain includes a special WebLogic Server instance, Administration Server, the central point from where all Oracle Traffic Director instances in the domain are configured and managed. This consists of:

  • A node where Oracle Traffic Director is installed collocated with WebLogic Administration Server within an Oracle Fusion Middleware Infrastructure Oracle home.

  • Zero or more remote nodes managed by the administration server.

A managed domain allows you to use Fusion Middleware Control or custom WLST commands for administering Oracle Traffic Director.

Standalone Domain

This is a single node installation where Oracle Traffic Director is installed in standalone mode. There is no administration support for standalone domains and the custom WLST commands for administering Oracle Traffic Director cannot be used in a standalone domain.

Choosing Between Managed Domain and Standalone Domain

Table 3-1 Managed Domain vs Standalone Domain

Advantages/Disadvantages Managed Domain Standalone Domain

Advantages

  • Oracle Traffic Director Administration support including support for SSL and HA.

  • Farm wide deployment with minimum overhead.

  • Monitoring / Server Lifecycle on multiple machines through Node manager.

  • Sandbox Environment with complete Isolation.

  • No JRE or WebLogic Server dependency.

Disadvantages

  • Requires Node Manager to communicate with Administration Server.

  • JRE and Node manager are needed for Oracle Traffic Director administration. These can be shutdown post provisioning.

  • No Oracle Traffic Director administration support other than Oracle Traffic Director instance creation/deletion.

  • Monitoring/Server Lifecycle management is limited to the local Oracle Traffic Director instance.

Note:

An Oracle Traffic Director instance can be deployed in a DMZ environment by making it a part of a managed Oracle Traffic Director domain. The administration server on a remote node can be used to manage the same through the Node manager. If you do not want to run the Node manager in DMZ environment, Oracle Traffic Director can be deployed in a standalone domain.

Creating a Managed Domain

After installing Oracle Traffic Director collocated with WebLogic Server, you can create an Oracle Traffic Director managed domain. The Oracle Traffic Director managed domain is created from an Oracle Traffic Director domain template. An Oracle Traffic Director domain can either be created using restricted JRF template or a full JRF template.

Restricted JRF is the recommended template for creating an Oracle Traffic Director domain. The restricted JRF mode creates a WebLogic Server runtime without a data source connection. Hence, there is no need for a running Oracle database to create the domain. You should use full JRF template if Oracle Traffic Director and SOA must be in the same domain.

Choosing Between Restricted JRF and Full JRF

Table 3-2 Restricted JRF vs Full JRF

Advantages/Disadvantages Restricted JRF Template Full JRF Template

Advantages

  • Recommended mode of creating an Oracle Traffic Director domain.

  • Does not need a data-source connection.

  • Domain supports various components/scenarios such as CCWS, OPSS support for partitions, OPSS support for up-stack components of WebLogic and so on.

  • ADF applications and Oracle Fusion Middleware products such as SOA and WebCenter depend on Full JRF Template.

  • Supports cross-component wiring.

Disadvantages

  • You cannot migrate the domain to a full JRF domain later.

  • ADF applications and Oracle Fusion Middleware products such as SOA and WebCenter does not support this template.

  • Does not support cross-component wiring.

  • You require an Oracle database to create a domain using full JRF template.

Creating a Managed Domain Using Restricted JRF Template

The restricted JRF mode creates a WebLogic Server runtime without a data source connection. Hence, one does not need a running Oracle database to create the domain.

Follow these steps to create the Oracle Traffic Director domain using Restricted JRF Template:

  1. Run the configuration wizard using config.sh located in the$FMW_HOME/oracle_common/common/bin directory.

    The Create Domain screen appears.

  2. Select the default values and click Next.

    The Templates screen appears.

  3. Select Create Domain Using Product Templates. In the Available Templates section, choose Oracle Traffic Director - Restricted JRF [otd].

    Oracle Enterprise Manager - Restricted JRF, Oracle Restricted JRF and Weblogic Coherence Cluster Extension are automatically selected. Retain the selection.

  4. Click Next.

    The Application Location screen appears.

  5. Retain the default value for Application location and click Next.

    The Administrator Account screen appears. Enter the WebLogic Domain administration user name and password. This information is needed to access WebLogic Server Control and Fusion Middleware Control.

  6. Click Next.

    The Domain Mode and JDK screen appears.

  7. Choose the default Domain Mode, Development and Default for JDK

    . Click Next

    The Advanced Configuration screen appears.

  8. Select 'Admin Server', 'Node Manager', 'Topology'.

    Note:

    Select 'Managed Server' to configure a 'Machine'. The screen for Machine is visible only if 'Managed Servers ' option is selected.
  9. Click Next.

    The Administration Server screen appears. Enter the following:

    • Server Name: Use default (AdminServer)

    • Listen Address: Use default (All local Addresses)

    • Listen Port: $WLS_ADMIN_PORT

    • Enable SSL: Use default (unchecked)

    • SSL Port: Use default (disabled)

    • Server Groups: Use default (unspecified)

  10. Click Next.

    The Node Manager screen appears. Use the default values (default: Per Domain). For Node Manager Credentials, enter the following:

    • User Name: $NM_USER

    • Password: $NM_PASSWORD

    • Confirm password: $NM_PASSWORD

  11. Click Next.

    The Managed Servers screen appears. Do not add any managed servers.

  12. Click Next.

    The Clusters screen appears. Do not add any clusters.

  13. Click Next.

    The Server Templates screen appears.

  14. Click Next.

    The Coherence Clusters screen appears. Do not add any clusters.

  15. Click Next.

    The Machines screen appears. Click Add and enter the following information:

    • Name: $MACHINE_NAME

    • Node Manager Listen Address: Use default (localhost)

    • Node Manager Listen Port: $NM_PORT

  16. Click Next.

    The Assign Servers to Machines screen appears.

  17. Select one or more servers in the left pane and one machine in the right pane. Then use the right arrow button (>) to assign the server or servers to the machine. Select 'Admin Server', 'new_ManagedServer_1','new_Machine_1'. Click Next.

    The Virtual Targets screen appears. Do not add any virtual targets.

  18. Click Next.

    The Partitions screen appears.

  19. Click Next.

    The Configuration Summary screen appears. If the message The Security configuration in your domain is invalid appears, you may ignore it.

  20. Click Create.

    The Configuration Progress screen appears, which indicates the progress of the Configuration. After successful completion of the configuration process, the Domain Created Successfully message appears.

  21. Click Next.

    Wait for this part of the configuration to complete. Depending on the location and performance of the Repository database, this process may take a few minutes. Click Finish. The End of Configuration screen appears.

Creating a Domain using Full JRF Template

Follow these steps to create the Oracle Traffic Director domain using the Full JRF Template:

Note:

You require an Oracle database to create a domain using full JRF template.

  1. Run the configuration wizard using config.sh located in the $FMW_HOME/oracle_common/common/bin directory.

    The first screen in the Config Wizard, Create Domain appears.

  2. Choose Create a new domain, and enter the required domain home path.

  3. Click Next.

    The dependent templates are automatically selected. The dependent templates are Oracle Enterprise Manager Plug-in for OTD - 12.2.1.x.0 [em] and Oracle JRF screen appears.

  4. In the Available Templates section, choose Oracle Traffic Director - 12.2.1.2.0 [otd] and click Next.

    The Application Location screen appears. Keep the default value for Application location.

  5. Click Next.

    The Administrator Account screen appears. Enter the WebLogic Domain administration username and password. This information is needed to access WebLogic Server Control and Fusion Middleware Control.

  6. Click Next.

    The Domain Mode and JDK screen appears. Choose the Domain Mode Development. Leave the default JDK selection as it appears.

  7. Click Next.

    The Database Configuration Typescreen appears. Enter the RCU DB connection information. Enter the following:

    • Auto Configuration Option: RCU Data

    • Vendor: Oracle

    • Driver: Oracle's Driver (Thin) for Service connection; Version:9.0.1 and later

    • DBMS/Service - $SERVICE_ID (xe for Oracle XE)

    • Port: $DB_PORT (default is 1521)

    • Schema owner - ${SCHEMA_PREFIX}_STB

    • Passwd - $DB_PASSWORD

  8. Click Get RCU Configuration. Wait for the verification process to complete.

  9. Click Next.

    The Component DataSources screen appears. Ensure that the hostname and port information is correct.

  10. Click Next.

    The Component JDBC Schema Test screen appears. Wait for the test to complete.

  11. Click Next.

    The Advanced Configuration screen appears. Select Admin Server, Managed Servers, Clusters and Coherence.

  12. Click Next.

    The Administration Server screen appears. Enter the following:

    • Server Name: Use default (AdminServer)

    • Listen Address: Use default (All local Addresses)

    • Listen Port: $WLS_ADMIN_PORT

    • Enable SSL: Use default (unchecked)

    • SSL Port: Use default (disabled)

    • Server Groups: Use default (unspecified)

  13. Click Next.

    The Node Manager screen appears. Do not add any nodes. Use defaults (default: Per Domain). For Node Manager Credentials, enter the following and click Next.

    • User Name: $NM_USER

    • Password: $NM_PASSWORD

    • Confirm password: $NM_PASSWORD

  14. Click Next.

    The Managed Servers screen appears. Do not add any managed servers.

  15. Click Next.

    The Clusters screen appears. Do not add any clusters.

  16. Click Next.

    The Coherence Clusters screen appears. Do not add any clusters.

  17. Click Next.

    The Machines screen appears. Click Add and enter the following information:

    • Name: $MACHINE_NAME

    • Node Manager Listen Address: Use default (localhost)

    • Node Manager Listen Port: $NM_PORT

  18. Click Next.

    The Configuration Summary screen appears. If the message The Security configuration in your domain is invalid appears, you may ignore it.

  19. Click Create.

    The Configuration Progress screen appears.

  20. Click Next.

    Wait for this part of the configuration to complete. Depending on the location and performance of the Repository database, this process may take a few minutes. Click Finish. The End of Configuration screen appears.

Note:

The creation of Oracle Traffic Director configuration/instance is not supported using configuration wizard, the system component screen in the configuration wizard should be ignored while configuring Oracle Traffic Director. For creating Oracle Traffic Director configurations/instances, use either Oracle Traffic Director custom WLST commands or Fusion Middleware Control.

Creating a Repository using Repository Creation Utility in Graphical Mode

Before proceeding to the next tasks, use the Repository Creation Utility (RCU). RCU is available with the Oracle Fusion Middleware Infrastructure distribution. Follow these steps.

  1. Run $FMW_HOME/oracle_common/bin/rcu.sh

  2. The Welcome page appears. Click Next.

  3. The Create Repository page appears. Select CreateRepository, and System Load and Product Load (default). Click Next.

  4. The Database Connection Details page appears. Enter the RCU DB connection information as shown in the screen below. Click Next.

  5. The Checking Prerequisites box pops up. It shows the progress of prerequisites checking. When it is complete, click OK.

  6. The Select Components page appears. Select the Create newprefix radio button and provide a schema prefix (such as DEMO). Select the following components: Oracle Platform Security Services, Audit Services, Audit Services Append and Audit Services Viewer. Click Next.

  7. The Checking Prerequisites box pops up. It shows the progress of prerequisites checking. When it is complete, click OK.

  8. The Schema Passwords page appears.Leave the default Use same passwords for all schemas radio button selected, and enter the password in the Password field. Click Next.

  9. The Map Tablespaces page appears. No action is required. Click Next.

  10. A Repository Creation Utility box pops up, requiring your confirmation. Click OK.

  11. A Creating Tablespaces pop up appears, showing the progress of tablespace creation. Click OK, then Next.

  12. The Summary page appears, showing your actions and choices. Click Create.

  13. A System Load progress box appears, showing progress.The box will disappear when complete.

  14. Click Close.

Creating a Repository in Silent Mode

When you install Oracle Traffic Director in a managed domain, the recommended configuration is to use the Restricted JRF domain template. In that configuration a database is not required, and you do not have to create a repository. However, in the case where you did not use the Restricted JRF domain template in the managed domain, you will require a database and a repository with schema space for the domain. To create a repository, run the repository creation.

$ORACLE_HOME/oracle_common/bin/rcu -silent -createRepository -connectString $DB_HOST:$DB_PORT:$SERVICE_ID 
-dbUser $DB_USER -dbRole $DB_ROLE -schemaPrefix $SCHEMA_PREFIX -useSamePasswordForAllSchemaUsers true 
-selectDependentsForComponents true -component OPSS -component IAU -f < <path_to_password_file>

The contents of the password file should appear as follows:

Password1
Password1
Password1
Password1
Password1
Password1

Example:

$ORACLE_HOME/oracle_common/bin/rcu -silent -createRepository -connectString ${DB_HOST}:1521:xe 
-dbUser sys -dbRole SYSDBA -schemaPrefix $SCHEMA_PREFIX -useSamePasswordForAllSchemaUsers true -selectDependentsForComponents true
-component OPSS -component IAU -f < /tmp/pass.txt
 
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
The database you are connecting is not a supported version. Refer to the certification matrix for supported DB versions.
...
Repository Creation Utility - Create : Operation Completed

Logging to the Administration Console

After installing Oracle Traffic Director, you can verify the installation by trying to log in to the administration console of the Oracle Traffic Director administration server, by performing the following steps:

  1. Start the administration server instance, by running the following command:

    $DOMAIN_HOME/bin/startWebLogic.sh
    
  2. In your web browser, enter the URL that you noted in the previous step.

    https://bin.example.com:1895/em

    An error message about a problem with the server's security certificate is displayed. The text of the message varies depending on the browser you use. The error message is displayed because the Oracle Traffic Director administration server uses a self-signed certificate, rather than a certificate issued by a trusted certificate authority.

  3. Proceed to the log-in page of the administration console by choosing to trust the certificate.

    The steps to be performed to trust a certificate vary depending on the browser you use. As an example, in Mozilla Firefox 4.0, click on the I Understand the Risks link on the error page, then click the Add Exception button, and finally, on the result page, click the Confirm Security Exception button.

  4. Log in using the administrator user name and password that you specified while creating the administration server instance.

Creating the Load Balancer for a Managed Domain

You can create a load balancer after deploying Oracle Traffic Director in a managed domain by using either Fusion Middleware Control or the WLST as described in the following topics.

Using Fusion Middleware Control

To create a load balancer by using 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.

  4. In the Common Tasks pane select the Create button.

    The Create Configuration wizard opens.

  5. Follow the on-screen prompts to complete creation of the configuration by using the details as specified below.

    • Name: hr-config

    • (Listener) Port number: 1905

    • IP Address: default

    • Server Name: default

    • Origin Server Name: hr-apps.example.com

    • Origin Server Port Number: 80

  6. In the Deployment page, check the listed machine under the Machine list and click Next.

    The Create Configuration: Review page appears.

  7. Click Create Configuration.

    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.

  8. Perform lifecycle tasks.

    1. In the left panel, Target Navigation, click and expand Traffic Director.

      The instances are listed under the configurations.

    2. Click on the instance you want to start.

    3. To start an instance.

      1. Navigate to the resulting page on the right panel.

      2. Click Start Up. The following message appears. 

        Start Operation on target /Domain_em_domain/em_domain/otd_hr-config_example.com. Completed Successfully

    4. To stop an instance.

      1. Click Shut Down.

      2. Provide your confirmation in the resulting confirmation dialogue box. The following message appears.

        Shutdown Operation on target /Domain_em_domain/em_domain/otd_hr-config_example.com completed successfully.

Using WLST Commands

To create a load balancer using offline WLST commands, do the following tasks:
  1. Launch WLST command and connect to the Administration server.
    $ORACLE_HOME$/oracle_common/common/bin/wlst.sh
    > connect("$WLS_ADMIN_USER", "$WLS_ADMIN_PASSWORD","t3://localhost:${WLS_ADMIN_PORT}")
  2. Start an edit session.
    > editCustom()
    > startEdit()
  3. Create a configuration hr-config using the otd_createConfiguration WLST command.
    props = {}
    props['configuration'] = 'hr-config'
    props['listener-port'] = '1905'
    props['server-name'] = 'hr-apps.example.com'
    props['origin-server'] = 'hr-1.example.com:80,hr-2.example.com:80'
    otd_createConfiguration(props)
  4. Create an instance of the configuration hr-config by running the otd_createInstance WLST command. Specify the machine as the name you specified when creating the machine in Fusion Middleware Control, corresponding to the host name of the machine on which the Oracle Traffic Director instance is running.
    props = {}
    props['configuration'] = 'hr-config'
    props['machine'] = 'machine1'
    otd_createInstance(props)
  5. Activate the changes. This propagates the changes to each instance of the configuration and creates it only if it currently does not exist.
    activate()
  6. Once the command runs successfully, check if the instance directory is created from the system command line.
    ls $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr-config_machine1
  7. Perform lifecycle tasks.
    > start("hr-config_machine1", 'SystemComponent')
    Starting system component "hr-config_machine1" ....
    System component with name "hr-config_machine1" started successfully
    [Handle the machine-name as we do in schema-prefix]
     
    > state("hr-config_machine1")
    Current state of "hr-config_machine1" : RUNNING
     
    > softRestart("hr-config_machine1")
    Restarting the system component with name "hr-config_machine1" ....
    System component with name "hr-config_machine1" restarted successfully
     
    > shutdown("hr-config_machine1")
    Shutting down the system component with name "hr-config_machine1" ....
    System component with name "hr-config_machine1" shutdown successfully
     
    > state("hr-config_machine1")
    Current state of "hr-config_machine1" : SHUTDOWN

We have now successfully created an Oracle Traffic Director configuration, and started the instance.

Creating a Standalone Domain

Learn how to create Oracle Traffic Director on a standalone domain using Oracle Traffic Director standalone template.

You can create a standalone domain by using either Coonfiguration Wizard or WLST as described in the following topics:

Creating a Standalone Domain using the Configuration Wizard

To create a standalone domain using Configuration Wizard, do the following tasks:

  1. Run the installer.

    $ORACLE_HOME/oracle_common/common/bin/config.sh -log=config.log

    The Create Domain page appears.

  2. Use the default values and click Next.

    The Templates page appears.

    Note:

    • The Basic Standalone System Component Domain - 12.2.1.x.0 [wlserver] is selected by default.

    • The other Oracle Traffic Director templates, Oracle Traffic Director - 12.2.1.x.0 [otd] and Oracle Traffic Director - Restricted JRF - 12.2.1.x.0 [otd] are not applicable for standalone domain.

  3. In the Available Templates section, choose Oracle Traffic Director - Standalone 12.2.1.x.0 [otd]and click Next.

    The JDK Selection page appears

  4. Retain the default JDK and click Next.

    The System Components page appears.

  5. Click Next.

    The Node Manager page appears.

    Note:

    You need not create system component, as Oracle Traffic Director has commands for configuring system components.

  6. Select the following options.

    • Node Manager Type: default/Per Domain Default Location

    • User Name: USERNAME

    • Password: PASSWORD

    • Confirm Password: PASSWORD

  7. Click Next

    The Configuration Summary page appears.

  8. Click Create.

    The Configuration Progress page appears. This shows the progress of the configuration.

  9. After the standalone domain is created successfully, click Next.

    The Configuration Success page appears.

  10. Click Finish.

Creating a Standalone Domain Using Offline WLST Commands

To create a standalone domain using offline WLST commands, do the following tasks:

  1. Launch the WLST command shell.

    $ORACLE_HOME/oracle_common/common/bin/wlst.sh

  2. Run the otd_createStandaloneDomain command to create an Oracle Traffic Director standalone domain. See otd_createStandaloneDomain command in WebLogic Scripting Tool Command Reference for Oracle Traffic Director.

    > props = {'domain-home': '$DOMAIN_HOME'}
    > otd_createStandaloneDomain(props)
    

Creating the Load Balancer for a Standalone Domain

The following section describes creating a load balancer after deploying Oracle Traffic Director in standalone mode and creating a standalone domain as shown above. There is no Fusion Middleware Control in standalone domain. You should use Oracle Traffic Director offline WLST commands for creating the load balancer.

The topology is based on the following configuration:

  • Oracle Traffic Director to receive requests from clients: hr-apps.example.com:1905

  • Host and port of origin servers (web servers in this example):

    • hr-1.example.com:80

    • hr-2.example.com:80

    In the real world, both origin servers would serve identical content. But for this example, to be able to see load balancing in action, we will set up the index.html page to show slightly different content, as follows:

    • For hr-1.example.com:80: "Page served from origin-server 1"

    • For hr-2.example.com:80: "Page served from origin-server 2"

  • Load-balancing method is seat as Round robin.

Note:

The custom WLST commands for administering Oracle Traffic Director cannot be used in a standalone domain. 

Using Offline WLST Commands

  1. Launch the WLST command shell.

    $ORACLE_HOME/oracle_common/common/bin/wlst.sh
  2. Create an Oracle Traffic Director instance.

    > props = {'domain-home': '$DOMAIN_HOME', 'origin-server': 'hr-1.example.com:80,hr-2.example.com:80', 'listener-port': '1905', 'instance': 'hr', 'server-name': 'hr-apps.example.com'}
    
    > otd_createStandaloneInstance(props)
  3. Once the command runs successfully, check if the instance directory is created from the system command line.

    ls $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr
  4. Perform instance management tasks.

    • Start

      $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr/bin/startserv
    • Stop

      $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr/bin/stop
    • Restart

      $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr/bin/restart
    • Reconfigure

      $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr/bin/reconfig
    • Rotate log files

      $DOMAIN_HOME/config/fmwconfig/components/OTD/instances/hr/bin/rotate

Verifying the Load-Balancing Behavior of the Oracle Traffic Director Instance

You can verify the load-balancing behavior of the Oracle Traffic Director instance by using your browser. The Oracle Traffic Director instance that we created and started earlier is now listening for HTTP requests at the URL http://hr-apps.example.com:1905.

Ensure that the web servers hr-1.example.com:80 and hr-2.example.com:80 are running. If necessary, update the /etc/hosts file on the host from which you are going to access the Oracle Traffic Director virtual server, to make sure that the browser can resolve hr-apps.example.com to the correct IP address.

  1. Enter the URL http://hr-apps.example.com:1905 in your browser.

    A page with the following text is displayed:

    "Page served from origin-server 1"

    This indicates that the Oracle Traffic Director instance running on the apps.example.com Node Manager received the HTTP request that you sent from the browser, and forwarded it to the origin server hr-1.example.com:80.

  2. Send another HTTP request to http://hr-apps.example.com:1905 by refreshing the browser window.

    A page with the following text is displayed:

    "Page served from origin-server 2"

    This indicates that Oracle Traffic Director sent the second request to the origin server hr-2.example.com:80

  3. Send a third HTTP request to http://hr-apps.example.com:1905 by refreshing the browser window again.

    A page with the following text is displayed:

    "Page served from origin-server 1"

    This indicates that Oracle Traffic Director used the simple round-robin load-distribution method to send the third HTTP request to the origin server hr-1.example.com:80.