A server template is used to define the configuration settings
for a new application server. When you create a new application server,
you either select the default server template or a template you previously
created, that is based on another, already existing application server.
The default template is used if you do not specify a different template
when you create the server.
About this task
You can also use the createApplicationServerTemplate command
for the AdminTask object to create a server template.
Procedure
- In the administrative console, click , and then click Templates.
- On the Server templates page, click New.
- From the list of servers, select the server that you want
to use to create the new template, and then click OK.
- Enter the name of the new template and, optionally, a description
of that template that distinguishes it from your other templates.
- click OK.
Results
Your new template is on the list of server templates that
you can use to create a new application server or cluster member.
What to do next
- You can perform one of the following actions to display a list
of all of the server templates that are available on your system:
- In the administrative console, click , and then click Templates.
- Issue the listServerTemplates wsadmin command.
- Move the application server template to another system.
There
is no direct way to export or import an application server template.
To move a copy of an application server template to another system,
complete the following procedure.
- Use the following AdminTask.createApplicationServerCreate wsadmin
command to create an application server from the template that you
want to move to another system.
AdminTask.createApplicationServer('node_name>', '[-name server_name -templateName template_name ]')
where node_name> is
the node to which you are adding the new application server, server_name is
the name of the application server you are creating, and template_name is
the name of the server template you are using to create the new application
server.
- Use the following AdminTask.exportServer wsadmin command to export
the new server.
AdminTask.exportServer('[-archive c:/temp/templateExport.car -nodeName node_name> -serverName server_name]')
-
- Use the AdminTask.importServerdelete wsadmin command to delete
the server you just created, or exit from the wsadmin tool without
saving.
- Move the templateExport.car file, that was created when you issued
the AdminTask.exportServer, to the target system.
- Start the wsadmin tool on the target system, and use the following
AdminTask.importServer wsadmin command to import the templateExport.car
file.
AdminTask.importServer('[-archive c:/temp/templateExport.car -nodeName node_name> -serverInArchive server_name]')
The
server server_name now resides on the target system
with unique ports. If you need to change the assigned ports, in the
administrative console, click , and then click Communications > ports.
- Use either the adminstrative console, or with the AdminTask.createApplicationServerTemplate
wsadmin command to create a new template from the server_name application
server. Then, delete the intermediate server_name application
server if you no longer need this application server.