Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Configure servers with scripting


Create a server using scripting


Overview

Use the commands in the ServerManagement command group or the AdminServerManagement script library to create a new application server, web server, proxy server, or generic server.

There are three ways to complete this task. This topic uses the AdminConfig object and the commands to create a new server configuration. Alternatively, you can use the scripts in the AdminServerManagement script library to create an application server, web server, proxy server, or generic server.


Procedure

  1. Start wsadmin.sh.

  2. Obtain the configuration ID of the node object.

      ### Jacl

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

      ### Jython

        node = AdminConfig.getid('/Node:node_name/')

      To display the configuration ID of the node object...

        print node

  3. Create the server.

    • Using AdminTask...

        ### Jacl

          $AdminTask createApplicationServer node_name {-name server_name

          –templateName template_name}

        ### Jython

          AdminTask.createApplicationServer('node_name', ['-name', 'server_name

          , '-templateName', 'template_name'])

    • Using AdminConfig

        ### Jacl

          $AdminConfig create Server $node {{name server_name

          }

        ### Jython

          AdminConfig.create('Server', node, ['name', 'server_name

          ])

  4. Save the configuration changes.

      AdminConfig.save()

  5. Synchronize the node.

    Using syncActiveNodes...

      AdminNodeManagement.syncActiveNodes()

    Using syncNode

      AdminNodeManagement.syncNode("myNode")


Synchronize nodes using wsadmin.sh
Create application servers using the administrative console
Create generic servers
Create proxy servers
Use the wsadmin scripting AdminConfig object for scripted administration


Related


Server configuration scripts
Server settings configuration scripts
Commands for the AdminConfig object using wsadmin.sh

+

Search Tips   |   Advanced Search