The script library provides Jython script procedures to assist in automating your environment. The script library includes help commands to list each available script library, display information for specific script libraries, and to display information for specific script procedures.
wsadmin>AdminServerManagement.createApplicationServer("myNode", "myServer", "default")
# # My Custom Jython Script - file.py # AdminServerManagement.createApplicationServer("myNode", "Server1", "default") AdminServerManagement.createApplicationServer("myNode", "Server2", "default") # Use one of them as the first member of a cluster AdminClusterManagement.createClusterWithFirstMember("myCluster", "APPLICATION_SERVER", "myNode", "Server1") # Add a second member to the cluster AdminClusterManagement.createClusterMember("myCluster", "myNode", "Server3") # Install an application AdminApplication.installAppWithClusterOption("DefaultApplication", "..\installableApps\DefaultApplication.ear", "myCluster") # Start all servers and applications on the node AdminServerManagement.startAllServers("myNode")
Save the custom script and run it from the command line, as the following syntax demonstrates:
bin>wsadmin -language jython -f path/to/your/jython/file.py
Use the AdminLibHelp script library to display general information about each script library, specific information about a specific script library, and information about specific scripts.
In this information ...Related tasks
Related reference
| IBM Redbooks, demos, education, and more(Index) |