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 |
|
|
Disadvantages |
|
|
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 |
|
|
Disadvantages |
|
|
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:
-
Run the configuration wizard using
config.sh
located in the$FMW_HOME/oracle_common/common/bin
directory.The Create Domain screen appears.
-
Select the default values and click Next.
The Templates screen appears.
-
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.
-
Click Next.
The Application Location screen appears.
-
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.
-
Click Next.
The Domain Mode and JDK screen appears.
-
Choose the default Domain Mode, Development and Default for JDK
. Click NextThe Advanced Configuration screen appears.
-
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. -
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)
-
-
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
-
-
Click Next.
The Managed Servers screen appears. Do not add any managed servers.
-
Click Next.
The Clusters screen appears. Do not add any clusters.
-
Click Next.
The Server Templates screen appears.
-
Click Next.
The Coherence Clusters screen appears. Do not add any clusters.
-
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
-
-
Click Next.
The Assign Servers to Machines screen appears.
-
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.
-
Click Next.
The Partitions screen appears.
-
Click Next.
The Configuration Summary screen appears. If the message The Security configuration in your domain is invalid appears, you may ignore it.
-
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.
-
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.
-
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.
-
Choose Create a new domain, and enter the required domain home path.
-
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.
-
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.
-
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.
-
Click Next.
The Domain Mode and JDK screen appears. Choose the Domain Mode
Development
. Leave the default JDK selection as it appears. -
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
-
-
Click Get RCU Configuration. Wait for the verification process to complete.
-
Click Next.
The Component DataSources screen appears. Ensure that the hostname and port information is correct.
-
Click Next.
The Component JDBC Schema Test screen appears. Wait for the test to complete.
-
Click Next.
The Advanced Configuration screen appears. Select Admin Server, Managed Servers, Clusters and Coherence.
-
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)
-
-
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
-
-
Click Next.
The Managed Servers screen appears. Do not add any managed servers.
-
Click Next.
The Clusters screen appears. Do not add any clusters.
-
Click Next.
The Coherence Clusters screen appears. Do not add any clusters.
-
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
-
-
Click Next.
The Configuration Summary screen appears. If the message The Security configuration in your domain is invalid appears, you may ignore it.
-
Click Create.
The Configuration Progress screen appears.
-
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.
-
Run
$FMW_HOME/oracle_common/bin/rcu.sh
-
The Welcome page appears. Click Next.
-
The Create Repository page appears. Select CreateRepository, and System Load and Product Load (default). Click Next.
-
The Database Connection Details page appears. Enter the RCU DB connection information as shown in the screen below. Click Next.
-
The Checking Prerequisites box pops up. It shows the progress of prerequisites checking. When it is complete, click OK.
-
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.
-
The Checking Prerequisites box pops up. It shows the progress of prerequisites checking. When it is complete, click OK.
-
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.
-
The Map Tablespaces page appears. No action is required. Click Next.
-
A Repository Creation Utility box pops up, requiring your confirmation. Click OK.
-
A Creating Tablespaces pop up appears, showing the progress of tablespace creation. Click OK, then Next.
-
The Summary page appears, showing your actions and choices. Click Create.
-
A System Load progress box appears, showing progress.The box will disappear when complete.
-
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:
-
Start the administration server instance, by running the following command:
$DOMAIN_HOME/bin/startWebLogic.sh
-
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.
-
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.
-
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:
-
Log in to Fusion Middleware Control for Traffic Director, as described in Graphical User Interface-Fusion Middleware Control.
-
Click the WebLogic Domain button at the upper left corner of the page.
-
Select Administration > OTD Configurations.
-
In the Common Tasks pane select the Create button.
The Create Configuration wizard opens.
-
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
-
-
In the Deployment page, check the listed machine under the
Machine
list and click Next.The Create Configuration: Review page appears.
-
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.
-
Perform lifecycle tasks.
-
In the left panel, Target Navigation, click and expand Traffic Director.
The instances are listed under the configurations.
-
Click on the instance you want to start.
-
To start an instance.
-
Navigate to the resulting page on the right panel.
-
Click Start Up. The following message appears.
Start Operation on target /Domain_em_domain/em_domain/otd_hr-config_example.com. Completed Successfully
-
-
To stop an instance.
-
Click Shut Down.
-
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
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:
-
Run the installer.
$ORACLE_HOME/oracle_common/common/bin/config.sh -log=config.log
The Create Domain page appears.
- 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.
-
-
In the Available Templates section, choose Oracle Traffic Director - Standalone 12.2.1.x.0 [otd]and click Next.
The JDK Selection page appears
-
Retain the default JDK and click Next.
The System Components page appears.
-
Click Next.
The Node Manager page appears.
Note:
You need not create system component, as Oracle Traffic Director has commands for configuring system components.
-
Select the following options.
-
Node Manager Type: default/Per Domain Default Location
-
User Name:
USERNAME
-
Password:
PASSWORD
-
Confirm Password:
PASSWORD
-
-
Click Next
The Configuration Summary page appears.
-
Click Create.
The Configuration Progress page appears. This shows the progress of the configuration.
-
After the standalone domain is created successfully, click Next.
The Configuration Success page appears.
-
Click Finish.
Creating a Standalone Domain Using Offline WLST Commands
To create a standalone domain using offline WLST commands, do the following tasks:
-
Launch the WLST command shell.
$ORACLE_HOME/oracle_common/common/bin/wlst.sh
-
Run the
otd_createStandaloneDomain
command to create an Oracle Traffic Director standalone domain. Seeotd_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
-
Launch the WLST command shell.
$ORACLE_HOME/oracle_common/common/bin/wlst.sh
-
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)
-
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
-
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.