Version 2.3.1.18
 —  SAP R/3 Gateway Documentation  —

Deploy Kernels

The normal way of working within a programming project is to maintain different environments, to allow for development and testing without impacting production. Development with SAP R/3 Gateway allows for development, integration (or quality-testing) and production environments. First, the generated applications are tested in the development environment. After passing the tests, the kernels must be copied to the integration environment and so on. This process of copying from one environment to another is called deployment.


Default Deployment in the File System

The SAP R/3 Gateway supports the following default deployment process. Each environment has its own directory in the file system, depending on kernel type.

Directory Environment Script
<kernel type>/dev Compile and Link  
<kernel type>/run/dev Development deployFrom copy from compile and link.
<kernel type>/run/int Integration (Quality) deployFrom copy from development.
<kernel type>/run/dev Production deployFrom copy from integration.

The deployFrom scripts copy the executables and IDL files from one environment to the next using operating-system commands. The IDL files are copied for documentation reasons. To search for differences in the environments, the IDL files can be compared.

All of the deployment steps can be started from the Deployment page of the Tools menu or by using the URI http://YourGateway:8080/sapr3gateway/manager/dep.

graphics/depPage.png

Choose the link to start the deployment process. A job is started with a batch file (on Windows) or a shell script (on UNIX) and the resulting output is displayed on an HTML page. You will see the copied files or an error message. The error message may indicate that it is not possible to overwrite executables if they are already running.

In this case, stop the Running Task (on the Runnings Tasks page of the Worker menu) or use the URI http://YourGateway:8080/sapr3gateway/manager/run and repeat the deployment step.

It is, of course, possible to change the default deployFrom scripts if you are working in a distributed environment of SAP R/3 Gateway instances. In this case, the file copy statements must be changed, for example to an FTP command. The list of all the scripts is on the Parameter page of the Configuration menu or can be viewed using the URI http://YourGateway:8080/sapr3gateway/manager/parameter. The link Startup script starts an editor on the same page.

Top of page

Smart Deployment

There is a new deployment page (since 2.3.1.04) from which a number of steps are performed automatically. This page is callable by http://YourGateway:8080/sapr3gateway/manager/deployRunningTask. After the first call by URI, this page is appended to the end of the Tools menu with the item name Smart Deployment. You must first select the running task.

graphics/depPage2.png

Start of instruction setDeployment contains the following steps, which will be performed in a single submit.

  1. The selected task and all running tasks in the same directory are stopped. All running tasks which use the directory are evaluated by the current configuration.

  2. If the shutdown command is available for the selected task, it is called to release the resources from EntireX Broker.

  3. The associated deployment script (copy DLLs or shared libraries) is called.

  4. The selected task is started.

Top of page

Package Builder

The package builder supports the deployment process between different application server instances. As protocol, an HTTP connection is used. The package builder creates a ZIP file (the package) and transports it (with HTTP) to the target application server. The Upload feature is called at the receiver (target). For example, the Rpc2Rfc kernel production environment runs on another application server. The executable files must copied between two machines.

graphics/packageDep.png

This page can be called with http://YourGateway:8080/sapr3gateway/manager/packageBuilder. After the first call, the Package and Deployment menu item is created in the Tools menu. After the second request, you will see the menu item.

The initiator of a deployment process is the target system. If, for example, you want to copy the executable files from the integration to the production environment, the production system is the target and the initiator. The integration system is the source.

To define a package process deployment, the following parameters are needed:

Parameter Description
Name Name of the deployment process.
Source URL Defines the URL of the source system. This source system builds the package for the target. Call the manager of SAP R/3 Gateway in the source system. The URL looks like this: http://integrationNode:8080/sapr3gateway/manager/xml. Replace integrationNode with the IP or DNS name.

Tip:
Use Check Connection to check the HTTP connection with URL, user ID and password. The next page shows the result of the HTTP request.

The source system must be implemented by the PackageBuilder resource. Check Connection checks this, too. If there is an error message, see how to install the Package Builder resource
Source User ID Connect with the user ID to the source system. The HTTP Basic Authentication method is used.
Source User Password Identify the user with this password in the source system.
Source Directory Define the subdirectory where the package is built. The link Source Directory shows the contents of the file system on the next page. This directory is a subdirectory of $SM_HOME.
Selection Select the files in the source directory. The wildcard character* is supported. Separate multiple selections with the ; character. For example: *.idl; *.dll.
Target Directory Define the subdirectory in the target system. The link Target Directory shows the contents of the file system on the next page. This directory is a subdirectory of $SM_HOME.
Target URL Define the receiver of the package. The sender (this is the source system) of the package must call the Upload and Setup component. The URL looks like this: http://productionNode:8080/sapr3gateway/setup/xml.

Note:
The source system is the sender of the package. Therefore, the sender must have the IP or DNS name of the target system. (localhost does not work in this case.)

Tip:
Use Check Connection to check the HTTP connection with URL, user ID and password. The next page shows the result of the HTTP request.

Target User ID Connect with the user ID to the target system. The HTTP Basic Authentication method is used.
Target Password Identify the user with this password in the target system.
Backup The value true creates a backup ZIP file with the old files before they are overwritten by the new ones.
Smart Deployment enabled The value true enables this package definition for Smart Deployment.

Tip:
Save the settings before a link for checking or directory listing is used.

The following operations are available for the list:

Operation Description
Deploy Start package processing and deployment. The result of the process is displayed on the next page.
Copy to Copy this package process definition and add the new one to the end of the list.
Delete Delete this package process definition from the list.
Up Set this before the previous one.
Down Set this after the next one.

If you start the package and deployment process with the Deploy button, the next page shows the result of updated or created files.

graphics/packageDepResult.png

Top of page

How to enable Package Builder for Smart Deployment

Smart deployment can start the package builder. In this case, the local default deployment is switched off. In smart deployment you can select the replaced running task, the associated package is built in the source environment and deployed in the target environment. The following output shows the result of package builder during smart deployment. The running task Rpc2RfcServerProd is selected for deployment and the package Copy Rpc2Rfc DLLs from Int to Prod is processed.

graphics/depSmart4PackageResult.png

Start of instruction setHow the system works

  1. Smart Deployment searches the package in the configuration environment.

  2. The directory of the selected running task (e.g. Rpc2Rfc kernel) must be the same as the Target Directory of the package.

  3. The flag for Smart Deployment enabled must also be enabled.

  4. Now Smart Deployment calls the Package Builder instead of the local default deployment.

Top of page

How to install the Package Builder

Every source system that builds a package for deployment must configure the Package Builder resource. As default, the package builder is not installed. Perform the following steps only for a source system. The target system, the receiver of packages, does not need the package builder.

Start of instruction setAdd Package Builder as Resource

  1. Call the resource administrator page http://YourGateway:8080/sapr3gateway/manager/resourceAdmin on the source system.

  2. Create and add a new resource, if the class PackageBuilder is not available.

    graphics/resourceAdmin.png

  3. Save the changes.

  4. Restart the SAP R/3 Gateway web application. For example, use the Tomcat Manager.

  5. After restart, check whether the System Log has loaded the PackageBuilder resource.

Top of page