Chapter 2 Configuration, Instances, and
Nodes
The previous chapter introduced you to some of the new concepts
in Web Server 7.0. The primary task of an administrator is to configure and
manage the runtime services of the Server. This chapter describes the different
ways by which you can manage Configurations and how you can deploy your Configurations
to get an instance started on a node.
Overview
Instance refers to the environment of a web server daemon on a
given node, including its configuration, log files and other runtime artifacts
such as lock databases, caches and temporary files.
Node is a network resource, such as a server or a host. In
a typical data center, a network of nodes is called a server
farm. This section discusses how nodes can be configured using
the administration console GUI.
You can deploy one or many instances to a node. Also the same
instance can be deployed to multiple nodes and can form as a part of different
clusters.
For management purposes, an instance can be started, stopped,
started, or dynamically re-configured.
Managing Configurations
Creating a Configuration
In order to start using the web server, you need to create
a Configuration.
To create a new Configuration, perform the following tasks:
-
Click Configuration
tab .
-
Click New
button
The wizard guides you through the settings available for creating
a Configuration. The following sections provide a description of the fields
available in wizard pages:
Step 1 – Set Configuration
Information
This wizard page allows you to set the generic information
for the new configuration
Set the following parameters in the wizard page:
-
Configuration
Name — Add a new unique name for your configuration.
-
Server
Name — Add a server name for the new configuration. It can
be same as the configuration name.
-
Document
Root — Enter a valid document root, wherein all the deployed
web applications maintain their directories. The default value is ../docs
You can enter the path of any valid directory on the server
-
64 Bit —
Enable/Disable 64 bit support for the web server. Default is disable.
-
Server
User — If the server is running on a UNIX based system, provide
a valid user name for the server process. For example, root.
Step 2 — Create a Listener
for the Configuration
This wizard page allows you to set the HTTP listener properties
for the new Configuration
Set the following parameters in the wizard page:
Step 3 — Configure Java,
CGI and SHTML
This wizard page allows you to configure properties related
to Java/CGI and SHTML.
Set the following parameters in the wizard page:
-
Java — Enabled. By default Java is enabled.Warning: Do not disable Java if you need to deploy Java based web
applications using this configuration. Set the home for Java SE directory.
The default value is the directory pointing to the bundled Java SE directory.
You can select either the default Java SE directory or specify a new path.
-
CGI —
None (Disables CGI support), Enable as File Type (Enables CGI support) and
Directory (Specify the URI and path where the CGI documents will be stored).
-
SHTML —
By default SHTML is disabled.
Step 4 — Create an Instance
This wizard page allows you to create an instance for the
new Configuration.
Set the following parameters in the wizard page:
-
Configuration — Name of the new
Configuration.
-
Select Nodes — Select the nodes
for creating an instance of the new configuration. Select nodes from the
available list and click Add or Add All button to add the nodes.
Note –
Using CLI
For creating a configuration through CLI, execute the following
command:
wadm> create-config --user=admin --password-file=admin.pwd
--host=serverhost --port=8989 --http-port=8800 --server-user=user
--server-name=servername config1
|
config1 is the name of the new configuration.
See CLI Reference, create-config(1).
Duplicating a Server Configuration
You can copy a server configuration and create a new configuration.
The newly copied configuration is identical to the existing configuration.
However, the new configuration will not have any instance even though the
configuration from which it has been copied has instances.
To duplicate a configuration, perform the following tasks:
-
Click Configuration
tab.
-
Select the configuration from the list.
-
Click Copy
button.
-
In the pop-up window, enter the new configuration
name and click OK.
Note –
Using CLI
For performing the action through CLI, execute the following
command:
wadm> copy-config --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 copyconfig1
|
copyconfig1 is the name of the new configuration.
See CLI Reference, copy-config(1).
Deploying the Server Configuration
You need to create a configuration first to deploy on the
node.
For deploying an existing configuration, perform the following
tasks:
-
Click Configurations
tab
-
Identify the configuration by selecting
the configuration checkbox.
-
Select Deploy
Configuration from the configuration action list.
Deleting the Server Configuration
Note –
You cannot delete a configuration, if instances
of the configuration are deployed to nodes. Even if the instances are deployed
and not running, you are not allowed to delete the server configuration. Stop
the running instances and undeploy them to delete the configuration.
For deleting a configuration, perform the following tasks:
-
Click Configurations
tab
-
Identify the configuration by selecting
the configuration checkbox.
-
Select Delete
Configuration from the configuration action list.
Managing Server Instances
Creating a Server Instance
Before creating a new server instance, perform the following
checks:
-
Check whether you have created a configuration.
Creating a new server instance needs an existing instance configuration to
be specified.
-
Check if all the available nodes in the
Server Farm already have an instance of the required configuration. You can
not create duplicate instances.
Create a new server instance by performing the following tasks:
-
Click Configuration
tab and select New from
the action list.
-
In the New Instance Wizard page, select
the configuration for which you need to create an instance and click Next button.
-
Select the nodes on which instances of
the selected configuration [Step 2] should
exist. Click Next button.
-
View the summary of your selection. Click
Next button to view the result
of the operation.
Note –
Using CLI
For creating a server instance, execute the following command:
wadm> create-instance --user=admin --password-file=admin.pwd
--host=serverhost --port=8989 --config=config1 serverhost
|
See CLI Reference, create-instance(1).
Starting Server Instances
-
Click Nodes
tab to view the list of nodes configured in the server.
-
Select the node by selecting the node
name checkbox.
-
Click Start
Instances button to open a page window, listing all the instances
controlled by that node.
-
Select the instance and click Start Instances button to start the instance.
-
Check if the status of the instance is
Running and close the window.
Note –
Using CLI
For starting a server instance through CLI, execute the following
command:
wadm> start-instance --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 nodehost1
|
See CLI Reference, start-instance(1).
Stopping Server Instances
-
Click Nodes
tab to view the list of nodes configured in the server.
-
Select the node by selecting the node
name checkbox
-
Click Stop
Instances button to open a page window, listing all the instances
controlled by that node.
-
Select the instance and click Stop Instances button to stop the instance.
-
Check if the status of the instance is
Not Running and close the window.
Note –
Using CLI
For stopping a server instance through CLI, execute the following
command:
wadm> stop-instance --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 nodehost1
|
See CLI Reference, stop-instance(1).
Restarting Server Instances
-
Click Nodes
tab to view the list of nodes configured in the server.
-
Select the node by selecting the node
name checkbox
-
Click Restart
Instances button to open a page window, listing all the instances
controlled by that node.
-
Select the instance and click Restart Instances button to restart the
instance.
-
Check if the status of the instance is
Running and close the window.
Note –
Using CLI
wadm> restart-instance --user=admin --password-file=admin.pwd
--host=serverhost --port=8989 --config=config1 nodehost1
|
See CLI Reference, restart-instance(1).
Re-Configuring Server Instances
When you make changes to the Configuration, you do not need
to restart the instance for some cases. Administration Server supports re-configuring
the server instances to pull changes made to the configuration store. In this
Configuration changes are reflected on instances without a server restart.
Only dynamically re-configurable changes in the configuration will be affected.
Note –
Changes in the user, temp-path, log, thread-pool,
pkcs11, statistics, CGI, DNS, DNS-cache, file-cache, ACL-cache, SSL-session-cache,
access-log-buffer, and JVM (except log-level ) settings will not come in to
effect after a reconfiguration. Any such changes that require restart will
be logged when a reconfiguration is performed. Reconfiguring the file cache
requires a server restart.
-
Click Nodes
tab to view the list of nodes configured in the server.
-
Select the node by selecting the node
name checkbox
-
Click Reconfig
Instances button to open a page window, listing all the instances
deployed on that node.
-
Select the instance and click Reconfig Instances button to reconfigure
the instance.
-
Check if the status of the instance is
Running and close the window.
Note –
Using CLI
For re-configuring the server instance through CLI, execute
the following command:
wadm> reconfig-instance --user=admin --password-file=admin.pwd
--host=serverhost --port=8989 --config=config1 serverhost
|
See CLI Reference, reconfig-instance(1).
Deleting Server Instances
Note –
The server instance should not be running
for it to be deleted.
-
Click Configuration
tab to view the list of available configurations.
-
Select the configuration from the configurations
list.
-
Click Instances
sub tab.
-
Select the instance from the list of deployed
instances under the Nodes section.
-
Select Delete
Instances from the action drop-down list to delete the selected
instance.
Note –
Using CLI
For deleting a server instance through CLI, execute the following
command:
wadm> delete-instance --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 serverhost
|
See CLI Reference, delete-instance(1).
Automatically Configuring Instances
Instances can be re-configured or restarted based on scheduled
events. You can set a specific time and interval for scheduling automatic
instance reconfiguration.
For scheduling events, perform the following tasks:
-
Click Configuration
tab and select the configuration.
-
Click General
sub tab > Scheduled Events sub tab.
To Add a Scheduled Event
-
Select the configuration.
Select
the configuration from the list shown after clicking the Configuration tab.
-
Click General > Scheduled Events sub tab.
-
Click New button.
-
Configure the following properties:
Note –
Using CLI
For scheduling an event through CLI, execute the following
command:
wadm> create-event --user=admin --password-file=admin.pwd --host=serverhost
--port=8989 --config=config1 --time=10:10 --command=restart
|
See CLI Reference, create-event(1).
To Remove a Scheduled Event
-
Select the configuration.
Select
the configuration from the list shown after clicking the Configuration tab.
-
Click General > Scheduled Events sub tab.
-
Select the scheduled event and click Delete
button.