Administration Guide
Overview Guide
Installation Guide
Previous Next Contents



Deploying an Application
Deploying an application to a Netscape Application Server installs all the application's files and registers all its components on that server. These are pre-requisites to using an application.

When you deploy an application, decide whether or not you will implement load balancing. For more information about making this decision, see

There are two ways to deploy an application in Netscape Application Server:

Choosing a Deployment Method
Decide how you want to deploy applications. There are differences between the two methods, so choose the one that best meets your deployment needs. Both methods allow you to partition the application after deployment, using the Netscape Application Server Administrator.

Deploying with the kdeploy command
Use the kdeploy command to deploy applications for the first time, or to deploy from a machine where Netscape Application Builder is not installed.

Thekdeploy command lets you deploy the entire project (.gxm) file, including the application's related Web server files. By using one command, all the files in a project are automatically deployed to their appropriate directories on one or more servers.

Files that are part of a project, such as Java files, computational files, and query files, are automatically deployed to your Netscape Application Server applications directory. For example:

NAS install directory/APPS/project directory NAS install directory is where the Netscape Application Server is installed; APPS is the applications directory; project directory is the directory where the given project is deployed. Each project is stored in its own directory.

At the same time that you deploy application files, Web server files, such as HTML template files, are automatically deployed to a user defined directory on your Web server. For example:

/netscape/suitespot/docs/user defined directory The netscape/suitespot/docs directory is the web server docs directory and user defined directory is the directory where the web server files are deployed. Usually, this directory’s name corresponds to the project name.

Note that if your web server resides on a different machine than the Netscape Application Server, the kdeploy command does not automatically deploy web server-related files to that web server. It only deploys the application files to their appropriate directory. In this case, you must copy each web server file manually to the correct location on your web server machine.

In addition, the HTML template files that reside on the Netscape Application Server, as opposed to those that reside on the web server, are deployed automatically to their proper directory when you use kdeploy. These are deployed to the project directory of the project they belong to, in the templates directory (each project directory has a directory called templates, where the HTML template files for a given project are stored). For example:

NAS install directory/APPS/project directory/templates

NAS install directory/APPS/project directory is the project directory for the project; templates is the templates directory for the HTML template files of that project that reside on the Netscape Application Server, as opposed to those that reside on the web server.

When you deploy using the kdeploy command, the requests for the deployed AppLogics can be load balanced across the servers you are deploying to, excluding the one you are deploying from.

Deploying with Netscape Application Server Administrator
Deploying applications with Netscape Application Server Administrator works similarly to using the kdeploy command, with a few differences.

Use Netscape Application Server Administrator to redeploy applications from one Netscape Application Server to another. Do not use Netscape Application Server Administrator to deploy an application for the first time.

If you elect to do load balancing when you deploy using Netscape Application Server Administrator, the load balancing will be shared across all servers, including the one you are deploying from. Keep this in mind, especially when redeploying from a staging or testing environment to a production environment.

Using the kdeploy Command to Deploy a Project
The kdeploy command is located in the following directory:

NAS installation directory\bin To deploy a project using the kdeploy command, type kdeploy at the command line, followed by several arguments. There are two version of the command line syntax. The following syntax enables you to deploy an application to a single host:

kdeploy -[arg1] -[arg2 and arg3] [deployment path] [server usename password]

The following syntax enables you to deploy an application to multiple servers listed in a separate text file:

kdeploy -[arg1] -[arg2 and arg3] [deployment path] --hosts [ serverfile]

For example:

kdeploy -t2 -bk /usr/user1/nas/apps/myproj/ --hosts server.text

The following table explains the arguments used in this example of a deployment command:

Argument
Acceptable Values
Description
arg1

t2, t3, t4, and so on.
(Optional) Indicates the amount of time that the deployment engine waits for a response from the server where the application is being deployed to, before assuming that the server is inaccessible. After the time-out period has passed, if the server has not responded, the deployment command assumes that the server cannot be accessed and therefore terminates the deployment process.

The amount of time normally allowed for a time-out is determined dynamically, based on the number of files in the project you are deploying. A value of t2 doubles the normal amount of time allowed. A value of t3 triples the time-out, and so on. Time-outs apply to all servers specified in the command.

arg2

b or s

(Optional) Indicates how load balancing is handled. If no value is specified, then requests for the AppLogics being deployed are not load balanced across the destination servers.

A value of b indicates that requests for the AppLogics being deployed are load balanced across the destination servers. Note that this does not allow joint load-balancing with the server from which the kdeploy command is being executed.

A value of s indicates that requests for the AppLogics being deployed are sticky load balanced. See "About Session (Sticky) Load Balancing" in Chapter 11, "Balancing User-Request Loads," for more information.

arg3

k or q
(Optional) A value of k indicates that error messages must be suppressed but that the command should continue to process.

A value of q indicates that error messages must be suppressed and the command must be aborted.

If you don't specify q or k in the command line and an error is encountered, the error message is displayed and you are asked if you want to continue processing the deployment command.

deployment path

A valid directory path
(Required) Indicates the current path from where you are deploying the AppLogic project. Specify an absolute path on your development machine.

Specify one of the following:

--hosts
--hosts
(Optional) Indicates that the file name used in the next argument contains the list of servers where the project will be deployed.

If you do not include this argument, you must specify, directly in the command line, the name of the server to which you are deploying the project. See ""Specifying the Server" on page 163" for information about the command line syntax for the server name.

server file

A valid file name
(Required if you use the --hosts argument) The name of the file that lists one or more servers where you are deploying the project. You can specify an unlimited number of servers in the file.

See ""Specifying the Server" on page 163" for information about the syntax provided in this file.

server username password

A valid server, user name and password
(Required if you do not use the --hosts argument) Specifies the server, user name, and password to use for deployment.

If you do not include this argument, you must specify, directly in the command line, the --hosts argument, followed by the name of a text file that lists one or more servers, user names, and passwords to use for deployment. See "“Specifying the Server” on page 163" for information about the command line syntax for the server name.

Specifying the Server
When you deploy to or download from a Netscape Application Server, you can specify the server either directly in the command line, or, particularly if you want to deploy to multiple servers, you can specify the server or servers in a file whose name you provide in the command line.

In the following example, the server name (fermat) and port number (1200) of the Netscape Application Server machine are specified in the command line, after the path:

kdeploy -t2 -bk /usr/user1/nas/apps/myproj/ fermat:12000

You can use the IP address of the Netscape Application Server machine, instead of the server name.

You can also specify multiple servers to deploy the project to. In the following example, the multiple servers are specified in the file referenced after the hosts argument:

kdeploy -t2 -bk /usr/user1/nas/apps/myproj/ --hosts server.text

For each server listed in server.text, provide the following information:

A project is always deployed in the apps and user defined document directory on the server.

Using Netscape Application Server Administrator to Deploy an Application

  1. Open the Application tool of the Netscape Application Server Administrator.
  2. In the Enterprise window, double-click the server from which you want to deploy.
  3. Select the group of AppLogic objects you want to deploy.
  4. In the Information window, click Deploy Application Group.
  5. The Deploy to Servers dialog box appears and a deployment log window opens. The log window keeps track of everything that happens during the deployment and allows you to verify the deployment after completion.

  6. Select the server or servers to which you want to deploy and click Deploy.
  7. The Deploy dialog box appears.

  8. Under load balancing, select the option for how you want to implement load balancing.
  9. For more information about load balancing choices, see "About Hosting and Deploying Applications for Load Balancing."

  10. If the destination servers have custom application directories, uncheck the Use default directories check box.
  11. With this option turned off (unchecked), a Deployment Directories dialog box appears and allows you to specify the application directories for each of the servers to which you are deploying. For more information about application directories, see "About Application Root Directories."

  12. Click OK.
  13. The files are deployed and, when finished, the Deploy dialog box shows a log of the deployment.

  14. When finished verifying the deployment log file, click Close.
 

© Copyright 1998 Netscape Communications Corporation