This chapter provides an overview of the general syntax, usage modes, WLST (WebLogic Scripting Tool) commands, common options, variables, security, and error messages that are relevant to Oracle Traffic Director.
This guide defines all the custom WLST commands supported for configuring and administering Oracle Traffic Director in Release 12.2.1.1.0. Starting with Release 12.2.1, Oracle Traffic Director administration is built on a Common Admin Model (CAM). CAM brings system components such as Oracle HTTP Server, and Oracle Traffic Director, into the WebLogic domain. Compared to Release 11g, there is no longer an Oracle Traffic Director Administration Server. CAM requires you to install Oracle WebLogic, create an Oracle WebLogic domain and use Oracle WebLogic Administration Server to manage Oracle Traffic Director.
Oracle Traffic Director exposes all the configuration tasks via configuration mbeans which will be used to manage Oracle Traffic Director configurations and instances. The custom WLST commands are wrappers which interact with these mbeans.
The command line interface in Oracle Traffic Director 12.2.1.1.0 is WLST (Weblogic Scripting Tool). The WLST scripting environment is based on Jython which is an implementation of the Python language for the Java platform. The tool can be used both online and offline. For more information on WLST and various online and offline commands, see Oracle WebLogic Scripting Tool. Oracle Traffic Director ships with custom WLST commands that you can run using WLST.
Note:
Oracle Traffic Director ships awlst.sh
wrapper <oracle_home>/otd/common/bin/wlst.sh
which initializes the required environment and libraries for Oracle Traffic Director commands. All Oracle Traffic Director custom commands can only be executed from this wlst.sh
.You can use the following techniques to invoke Oracle Traffic Director custom commands. For more information on using WLST in these modes, see Using the WebLogic Scripting Tool in Oracle WebLogic Scripting Tool.
In the interactive mode, the WLST scripting shell maintains a persistent connection with an instance of WebLogic Server. You can enter an Oracle Traffic Director command and view the response at the command line prompt.
# Launch wlst.sh <oracle_home>/otd/common/bin/wlst.sh # Connect to WLS admin server > connect('weblogic', 'welcome1',"t3://localhost:7001") # Execute an OTD command - list existing configurations > otd_listConfigurations() ['origin-server-1', 'test', 'origin-server-2', 'origin-server-3'] # Execute another command - get http properties of configuration 'test' > props={'configuration': 'test'} > ret = otd_getHttpProperties(props) > print ret {'ecid': 'true', 'unchunk-timeout': '60', 'discard-misquoted-cookies': 'true', 'max-request-headers': '64', 'favicon': 'true', 'request-body-timeout': '-1', 'request-header-buffer-size': '8192', 'etag': 'true', 'max-unchunk-size': '8192', 'io-timeout': '30', 'body-buffer-size': '1024', 'output-buffer-size': '8192', 'websocket-strict-upgrade': 'false', 'strict-request-headers': 'false', 'request-header-timeout': '30', 'server-header': None}
Scripts invoke a sequence of WLST commands without requiring interactive input, much like a shell script. Scripts contain WLST commands in a text file with a .py
file extension.
In embedded mode, the WLST interpreter can be instantiated in Java code and used to run WLST commands and scripts. To run Oracle Traffic Director commands in embedded mode, you must extend the environment to include Oracle Traffic Director commands and libraries as follows:
Extend the Java classpath to include <oracle_home>/otd/lib/admin.jar
.
Set the weblogic.wlstHome
Java system property to point to <oracle_home>/otd/common/wlst
.
For example, -Dweblogic.wlstHome=<oracle_home>/otd/common/wlst
Write a Java program to invoke Oracle Traffic Director commands:
package oracle.otd.wlst; import weblogic.management.scripting.utils.WLSTInterpreter; import org.python.util.InteractiveInterpreter; public class WLSTClient { public static void main(String[] args) { InteractiveInterpreter interpreter = new WLSTInterpreter(); interpreter.exec("connect('weblogic', 'weblogic1','t3://localhost:1894')"); interpreter.exec("print otd_listConfigurations()"); } }
Starting with Release 12.2.1, WLST is the equivalent of the Oracle Traffic Director tadm
command line in Release 11g. Unlike in Release 11g, you can only run the commands in script mode and not in standalone mode. The commands are implemented as WLST custom command functions, they are not hyphenated and follow the pattern 'otd_MixedCaseCommandName'. For example, the create-config
command in Release 11g is the otd_createConfiguration
command in Release 12.2.1. There are no operands in Release 12.2.1. All the options are passed to the command in a python dict as name-value pairs.
The following Oracle Traffic Director WLST commands can be executed in offline mode directly on the host where the Oracle Traffic Director instance/admin server is configured.
The following commands can be used for offline provisioning where we could create and delete Oracle Traffic Director configurations and instances on the admin server after creating and extending the domain with Oracle Traffic Director domain template. These commands does not require admin server to be running and should be executed directly on the host where the admin server resides.
As these are offline commands, you need not execute activate for changes to be applied. Ensure that there is no open edit session while running these commands as these would manipulate the config-store
directly and the changes will not be applied in the edit session unless the admin server is restarted.
Note:
You cannot invoke the above commands in offline mode until a domain has been read usingreadDomain
. Make sure to update the domain using updateDomain
after the command for changes to be applied.The following commands can be used for monitoring the statistics pertaining to an instance by executing the commands directly on the host where the OTD instance resides.
The following commands can be used to start/stop SNMP sub-agent by executing the commands directly on the host corresponding to the machine.
All OTD custom WLST commands are implemented as jython functions with options (if any) passed as function arguments.
Unless specified otherwise, the commands can only be executed online where the connection to a running server is needed. If mentioned as Offline, the command can be executed directly on the host where the Oracle Traffic Director instances are to be configured.
The commands either take no argument or a python dictionary as an argument. All the properties are passed to the command in python dictionary as name-value pairs with both name and the value being strings.
Unless specified otherwise, all the getter commands (otd_getX
) return a python dictionary with properties as name (string)-value (string) pairs, setters (otd_setX
) and create/delete do not return any value while list methods (otd_listX
) return a list of python dictionaries of name (string)-value (string) pairs
This section contains the functional list of WLST commands that are used in Oracle® Fusion Middleware. Using this section you can look for specific commands based on the functional role of Oracle® Fusion Middleware
Commands for provisioning a collocated or standalone domain.
Commands for configuration management.
Commands for management of virtual server configuration and properties.
Commands for server pool management.
Commands for managing listeners.
Commands for managing SSL.
The following are the ciphers supported by the server.
SSL_RSA_WITH_RC4_128_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_RC4_128_SHA
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Commands for rules management.
Commands for Web Application Firewall (WAF) management.
Commands for monitoring.
The following are failover management commands: