Consultor Eletrônico



Kbase 225: Deployment from FULL to QUERY/RUNTIME with TOOLKIT
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
SUMMARY:

This solution offers an overview of how to deploy Progress
applications from a full Progress development environment to a query or runtime non-development environment (distribute applications from your development source machine to an application target machine).

It explains how to use the Progress Toolkit to encrypt source code in the development environment, and how to compile the encrypted source code in the non-development environment. This is the method used to release an application to a hardware/operating system environment
for production that does not match that of development.

EXPLANATION:

Beginning with Version 5, the Progress Toolkit allows you to encrypt source code (.p) on the source machine for distribution to an application target machine that runs Progress QUERY/RUNTIME, QUERY/REPORT, or RUNTIME. You can then compile the encrypted code in the target environment using the encrypted source compiler (proxcom) that is included with every Version 5.x query or runtime product.

If you are deploying to a target machine that has the same operating system as your development machine, you can optionally compile the source code on the source machine and distribute the compiled code (.r) to the target environment (bypassing the encryption and compilation steps mentioned in the preceding paragraph).

SOLUTION:

On the development machine:

- Dump the database by following these steps:

1) Dump the data definitions (.df file) using the Data
Dictionary "Dump Data Definitions" option.

2) Create database dump and load procedures by executing
Toolkit "mkdump" as follows:

UNIX: $DLCTK/mkdump <dbname>

DOS,OS2: C:\DLCTK\MKDUMP <dbname>

VMS: PROGRESS/MKDUMP <dbname>

BTOS: Progress Single-user
Database name: <dbname>
Startup Procedure: mkdumpld.p
Process in Background?: Yes

This creates and compiles two procedures (filedump.p
and fileload.p). The filedump.p procedure dumps the
database and fileload.p reloads it.

The mkdump utility also creates two subdirectories
(dmpprocs and ldprocs). The dmprocs subdirectory stores
source and compiled code for dumping, and ldprocs
stores source and compiled code for loading.

3) Dump the database data (.d) files by executing the
filedump.p procedure.

Enter the following:

UNIX: $DLC/pro dbname -1 -p filedump.p

- Encrypt the source code by following these steps:

1) Create a directory structure that parallels the current
application directory structure.

This is where the encrypted source (.p) files and
include (.i) files are later stored.

2) Move to the top level directory of your unencrypted
application.

3) Encrypt your source code procedures (including the mkdump
procedures) using the TOOLKIT xcode utility.

The xcode command syntax is:

UNIX: $DLCTK/xcode [ -k key ] -d directory <files>

DOS,OS2: C:\DLCTK\xcode [ -k key] -d directory <files>

VMS: PROGRESS/XCODE/options

-k represents your encryption key if you opt
to use one.

-d represents the target directory where
encrypted source is written. This should
be the top level directory of the new
structure you created.

The <files> notation represents the
filename(s) to be encrypted. If you like, you
can supply the relative path reference to the
files to maintain the directory hierarchy.

You might also supply the wild card "*" to
mean all files that begin with a certain set
of characters. Be sure to also excrypt the
include files that are called by these
procedures.

- Create a program that can be used in the target environment to
compile the encrypted source code by following these steps:

1) Create a procedure that contains the statements necessary
to compile your entire application.

The core of this procedure is one or more COMPILE
statements with the XCODE option (if you supply an
encryption key). Name the procedure whatever you like.
(For this example, call it compiler.p.)

2) Encrypt the procedure created in step 1.

3) Once complete, transfer the data definitions (.df) file,
the data (.d) files, and all encrypted source to the
target machine.

On the target machine:

Create a basic database on the target machine, following these
steps:

1) Create an empty Progress database.

UNIX: prodb <newdb> empty.

DOS,OS2: PRODB <NEWDB> empty.

VMS: PROGRESS/CREATE <NEWDB> empty.

BTOS: Progress Create Database
New Database Name: <NEWDB>
Copy From Database Name: empty

2) Load the data definitions (.df) files by entering the new
empty database with the proxcom command and choosing the
option to "Load Data Definitions" from the Data
Dictionary.

Version 6.x Query/Run-time, Query/Report, and runtime
users have an option to start Progress in Encrypted
Compiler Mode (-rx). The option permits you to load
data definitions with the Data Dictionary and to
compile encrypted source code.

Compile your application on the target machine by following these
steps:

1) Compile the procedure you created to compile the entire
application (compiler.p above) using the COMPILE SAVE
statement after you start Progress with the proxcom
command.

2) Compile your encrypted application (including the mkdump
procedures) by starting Progress with the proxcom command
and running your compilation procedure (compiler.p) as
follows:

UNIX: $DLC/proxcom dbname -1 [Version 5]
UNIX:$DLC/pro dbname -1 -rx [Version 6]

RUN compiler.p.

3) Load your application data on the target machine.

Load the database data (.d) files by executing the
newly created compiled fileload.p procedure using the
Progress product that you have:

NIX: $DLC/pro dbname -1 -p fileload.p

This completes all the steps necessary to deploy an encrypted application.


Reference to Written Documentation:

Using the Developer's Toolkit, Chapter 9.3.