Sun Java System Web Server 7.0 Update 4 Administrator's Guide

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 them 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.

A 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. The same instance can be deployed to multiple nodes and can be part of different clusters.

For management purposes, an instance can be started, stopped, restarted 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:

  1. Click theConfiguration tab. .

  2. Click theNew 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 enables you to set the generic information for the new configuration

Set the following parameters in the wizard page:

Step 2 — Create a Listener for the Configuration

This wizard page enables 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 enables you to configure properties related to Java/CGI and SHTML.

Set the following parameters in the wizard page:

Restore Configuration

The following steps enable you to restore a configuration that was previously deployed.


Note –

You can only restore the last seven configurations.


ProcedureTo Restore the Configuration

  1. Click the Configuration tab.

  2. Click the General sub tab > Restore sub tab.

    Select the configuration from the configuration backups list.

  3. Click the Restore button.

  4. Click the Deployment Pending Link on the top right of the Administration Console page to deploy the restored configuration.

    A pop-up windowappears.

  5. Click the Deploy button.

Step 4 — Create an Instance

This wizard page enables you to create an instance for the new Configuration.

Set the following parameters in the wizard page:


Note –

Using CLI

To create a configuration through CLI, execute the following command:


wadm> create-config --doc-root=[DOCROOT] --jdk-home=[JAVAHOME] 
--server-user=[SERVERUSER]  [--document-root=serverdocroot] [--platform=32|64] 
--http-port=port --server-name=servername CONFIGNAME

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:

  1. Click the Configuration tab..

  2. Select the configuration from the list.

  3. Click the Duplicate button..

  4. In the pop-up window, enter the new configuration name and click OK.


Note –

Using CLI

To perform 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.

To deploy an existing configuration, perform the following tasks:

  1. Click the Configurations tab.

  2. Identify the configuration by selecting the configuration checkbox.

  3. Click the Deploy button .

  4. A new window appears, click the Deploy button to deploy the configuration.

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 cannot delete the server configuration. Stop the running instances and undeploy them to delete the configuration.


For deleting a configuration, perform the following tasks:

  1. Click theConfigurations tab.

  2. Identify the configuration by selecting the configuration checkbox.

  3. Click the Delete button.

  4. A new window appears, click the OK button to delete the configuration.

Pulling Configuration Changes to the Administration Server

Whenever you make manual changes to the configuration, you should replicate the changes back into the Administration server repository as follows:

  1. Manually edit the server instance's configuration files as you would do with the earlier version of Web Server (Not recommended).

  2. Start the Administration Server.

  3. To pull the changes back to the Administration Server repository, execute the following command.


    wadm> pull-config --user=admin --config=CONFIG_NAME

Note –

The operation may take some time depending on the configuration.



Note –

Always use the Administration Console or the wadm CLI to edit the settings. When you invoke pull-config only the contents of the <instance_dir>/config directory will be pulled into the configuration store from Web Server .


Removing the Administration Node from the Server

ProcedureTo Remove the Administration Node from the Server

  1. Click the Nodes tab from the Common Tasks page.

  2. Select the Administration Node.

    Select the Administration Node from the list

  3. Click the Remove button.

Managing Server Instances

Creating a Server Instance

Before creating a new server instance, perform the following checks:

  1. Check whether you have created a configuration. Creating a new server instance requires an existing instance configuration to be specified.

  2. 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:

  1. Click the Configuration tab and click the configuration link that you want to create an instance.

  2. In the New Instance Wizard page, select the configuration for which you need to create an instance. Select the SMF Service if you want to create a service for this instanceand click theNext button.

  3. Select the nodes on which instances of the selected configuration [Step 2] should exist. Click the Next button.

  4. View the summary of your selection. Click the Next button to view the result of the operation.


Note –

Using CLI

To create 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

  1. Click theNodes tab to view the list of nodes configured in the server.

  2. Select the node by selecting the node name checkbox.

  3. Click theStart Instances button to open a page window, listing all the instances controlled by that node.

  4. Select the instance and click theStart Instances button to start the instance.

  5. Check if the status of the instance is Running and close the window.


Note –

Using CLI

To start 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

  1. Click theNodes tab to view the list of nodes configured in the server.

  2. Select the node by selecting the node name checkbox

  3. Click theStop Instances button to open a page window, listing all the instances controlled by that node.

  4. Select the instance and click theStop Instances button to stop the instance.

  5. Check if the status of the instance is Not Running and close the window.


Note –

Using CLI

To stop 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

  1. Click theNodes tab to view the list of nodes configured in the server.

  2. Select the node by selecting the node name checkbox.

  3. Click theRestart Instances button to open a page window, listing all the instances controlled by that node.

  4. Select the instance and click Restart Instances button to restart the instance.

  5. 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 always need to restart the instance. The 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.

For more information on reconfig command see, Dynamic Reconfiguration in Sun Java System Web Server 7.0 Update 4 Administrator’s Configuration File Reference.


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.


  1. Click the Nodes tab to view the list of nodes configured in the server.

  2. Select the node by selecting the node name checkbox.

  3. Click theReconfig Instances button to open a page window, listing all the instances deployed on that node.

  4. Select the instance and click the Reconfig Instances button to reconfigure the instance.

  5. Check if the status of the instance is Running and close the window.


Note –

Using CLI

To re-configure 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 in order for it to be deleted.


  1. Click theConfiguration tab to view the list of available configurations.

  2. Select the configuration from the configurations list.

  3. Click theInstances sub tab.

  4. Select the instance from the list of deployed instances under the Nodes section.

  5. Select Delete Instances from the action drop-down list to delete the selected instance.


Note –

Using CLI

To delete 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:

  1. Click theConfiguration tab and select the configuration.

  2. Click theGeneral sub tab > Scheduled Events sub tab.

ProcedureTo Add a Scheduled Event

  1. Click the configuration tab and then select the configuration from the list that appears.

  2. Click General > Scheduled Events sub tab.

  3. Click the New button.

  4. Configure the following properties:

    • Event

      • Restart Instances — This scheduled event will restart all the deployed and running instances for the configuration.

      • Reconfig Instances — This scheduled event will re—configure all the deployed and running instances for the configuration.

      • Custom Command Line — Provide the absolute path to a file that will be executed.

    • Schedule

      The configured time when the event will start. Select the hour and minutes value from the drop-down box.

      • Every Day — Starts the event specified every day at the specified time.

      • Specific Days — Starts the event specified at specific days.

        1. Days — Specify any day from Sunday to Saturday.

        2. Dates — Specify any day of the month from 1 to 31 as comma separated entries. E.g. 4,23,9

      • Specific Months — Starts the event specified at the specific time and month. Specify month from January to December.

      • Interval

        Start the specified event after this time period.

        1. Every Hours — Select the number of hours from the drop-down box.

        2. Every Seconds — Enter the number of seconds in the text field.


    Note –

    Using CLI

    To schedule 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).


ProcedureTo Remove a Scheduled Event

  1. Click the configuration tab and then select the configuration from the list that appears.

  2. Click General > Scheduled Events sub tab.

  3. Select the scheduled event and click the Delete button.

Configuring LDAP Authentication for Administration Server

The Administration Server enables only one predefined administrator login and does not allow user group management. Hence, if multiple users have to login to the Administration Server, LDAP authentication is used. You can login to the Administration Server by using your LDAP userid and password through Administration Console or CLI.


Note –

The Administration server by default enables only users belonging to the group wsadmin to login. Thus, while enabling LDAP authentication, the administrator can define a list of groups, other than wsadmin whose members will be allowed to login.


The LDAP auth-db can also be manually configured to allow the Administration Server to authenticate with LDAP as shown below:


<default-auth-db-name>ldap</default-auth-db-name>

<auth-db>
<name>ldap</name>
<url>ldap://ooooxxxxooooo.india.sun.com:389/dc963dindia,dc963dsun,dc963dcom</url>
<property>
<name>bindpw</name>
<value>YWRtaW5hZG1pbg==</value>
<encoded>true</encoded>
</property>
<property>
<name>binddn</name>
<value>cn=Directory Manager</value>
</property>
</auth-db>

ProcedureTo Configure LDAP Authentication

  1. Login to Administration Console.

  2. Click the Nodes tab to view a list of nodes configured in the server.

  3. Click the Administration Node from the list.

  4. Select Authentication from Administration Server - General Settings page.

  5. Select the Use LDAP Authentication button.


    Note –

    The Use LDAP Authentication is enabled only for Administration Server.


  6. Enter LDAP authentication information.

    By entering the user groups in the Allowed Groups text field, the administrator enables or disables LDAP authentication to the group.

  7. Click the Save button.


    Note –

    Using CLI

    • To enable the Administration Server to authenticate against LDAP server, execute the following command.


      wadm enable-admin-ldap-auth --user=admin --host=serverhost 
      --password-file=../admin.passwd --port=8989 --ssl=true --no-prompt rcfile=null 
      --ldap-url=ldap://serverhost.com:3950/dc=xyz,dc=xyz,dc=xyz 
      --bind-dn=cn="Directory Manager"
      

      wadm enable-admin-ldap-auth --user=admin --host=serverhost 
      --password-file=../admin.passwd --port=8989 --ssl=true 
      --ldap-url=ldap://serverhost:port/dc=acme,dc=com 
      --allow-group="group1,group2,group3"
      

      See CLI Reference, enable-admin-ldap-auth(1)

    • To disable the Administration authentication to LDAP server execute the following command.


      wadm disable-admin-ldap-auth --user=admin --host=serverhost 
      --password-file=../admin.passwd --port=8989 --ssl=true --no-prompt --rcfile=null
      

      See CLI Reference, disable-admin-ldap-auth(1)

    • To display the Administration LDAP authentication properties execute the following command.


      wadm get-admin-ldap-auth-prop --user=admin --host=serverhost 
      --password-file=../admin.passwd --port=8989 --ssl=true --no-prompt rcfile=null
      

      wadm get-admin-ldap-auth-prop --user=admin 
      --host=serverhost --password-file=../admin.passwd --port=8989 --ssl=true 
      --no-prompt rcfile=null allow-group
      

      See CLI Reference, get-admin-ldap-auth-prop(1)