Creating a server using scripting

You can use scripting to create an application server.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Creating an application server involves a configuration command. Complete the following steps to create a server.

Procedure

  1. Obtain the configuration ID of the node object.

    [Updated in July 2011] The following examples obtain the configuration ID of the node object and assign it to the node variable In these examples, node_name is the name of the node to which you are adding the new server, server_name is the name of the server you are creating, template_name is the name of the template you want used to create the server. The AdminTask.createApplicationServer() command requires you to specify a node name. The node name must be enclosed within single quotation marks. The AdminConfig.create() command requires you to specify the configuration ID of the node object. If you do not know the configuration ID, issue the AdminConfig.getid('/Node:node_name/') command to obtain that information. [Updated in July 2011]

    jul2011

    Using Jacl:

    set node [$AdminConfig getid /Node:node_name/]

    Using Jython:

    node = AdminConfig.getid('/Node:node_name/')
    [Updated in July 2011] If you want to display the configuration ID of the node object, issue the following command:
    print node
    [Updated in July 2011]
    jul2011
  2. Create the server using the node that you specified in the first step. [Updated in July 2011]
    • The following example uses the commands for the AdminTask object to create a server:
      Using the AdminTask object:
      • Using Jacl:

        $AdminTask createApplicationServer node_name 
        {-name server_name –templateName template_name}
      • Using Jython:

        AdminTask.createApplicationServer('node_name', 
        ['-name', 'server_name', '-templateName', 'tempate_name'])
    • [Updated in July 2011] The following example uses the AdminConfig object to create a server. In these examples node is the node variable to which the configuration ID of the node object is assigned.
      Using the AdminConfig object:
      • Using Jacl:

        [Updated in August 2011]
        $AdminConfig create Server $node {{name server_name}}
        [Updated in August 2011]
        aug2011
      • Using Jython:

        AdminConfig.create('Server', node, ['name', 'server_name']
      [Updated in July 2011]
      jul2011
    [Updated in July 2011]
    jul2011
  3. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.
  4. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 12:02:36 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-zos&topic=txml_createserver
File name: txml_createserver.html