You are on page 1of 9

Phire 15.

1
Application Configuration
Copyright © 2020, Phire. All rights reserved.
The Programs (which include both the software and documentation) contain proprietary information; they
are provided under a license agreement containing restrictions on use and disclosure and are also protected
by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly,
or decompilation of the Programs, except to the extent required to obtain interoperability with other
independently created software or as specified by law, is prohibited. The information contained in this is
subject to change without notice. If you find any problems in the documentation, please report them to us
in writing. This is not warranted to be error-free. Unless permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose.

File Versioning and Migration


File objects are files that reside outside of PeopleTools tables and are commonly referred to as
external objects. Some examples of File Objects are SQR program files, Crystal Report files,
COBOL program files, Word documents, and Excel spreadsheets.

Phire enables the versioning of files and automates the migration of files from one environment
to another. This document describes how to configure Phire to enable these features and
identifies all the infrastructure requirements.

Copyright @ 2020 Phire Inc. All rights reserved. Page 1 of 9


File Versioning and Migration
Within the context of Phire, File Versioning is the process of copying files from a source location
into the Phire repository, which is a set of database tables. File Migration or Restore is the process
of copying the files from the Phire repository to the target location. Because the File Versioning
and Migration processes are tightly integrated with the operating system, there are some special
infrastructure requirements that need to be met to backup and migrate files using Phire. These
requirements apply to the application server for Phire and any servers that are defined as the
source (server where the file to be versioned resides) or target (server where the file is to be
restored or migrated).

Infrastructure Requirements on the Phire Application Server


1. A valid Working Directory must be created on the Phire application server. This directory is
used as a staging area to facilitate the transfer of files in and out of the Phire repository
database tables. The location of the Working Directory is configured from the Define Domain
page:

Phire > Administration > Define Domain (Domains Page)

2. You must be able to call the file transfer executable from the command line from the Phire
application server. The “ftp” client executable is normally delivered functionality on
Windows, UNIX, and Linux. The “xcopy” executable is only available on Windows. The
“sftp” executable is usually delivered as part of the Linux OS and may need to be separately
installed for Windows and UNIX OS. The “psftp” executable is packaged with Phire and can
be used to transfer files from Windows application server to UNIX/Linux servers.

Infrastructure Requirements on Source and Target Servers


FTP Option
1. If the FTP option is selected as the file transfer method, the FTP service must be installed and
running on each server that will be either the source or target for file versioning and
migrations. For Windows servers, this requires the installation of the FTP Window
Component. UNIX OS is usually delivered with the FTP service running by default. Linux is
usually installed with SSH service by default.

2. If the server is running Windows OS, the root directory of the FTP site should be defined at
least one level above the PS_HOME (e.g. if your PS_HOME is d:\psoft\fs92, the FTP root
directory should be set to “d:\psoft”).

3. The FTP login account must have write access to each directory defined in the File Directories
setup page (e.g. %PS_HOME%\sqr).

4. If the path to the FTP executable on the Phire application server is not part of the PATH
environment variable when the Phire application server is started, you need to update the
PHI_FTP or PHI_FTP_UNIX URL to fully qualify the path to the ftp executable. Navigate to:

Copyright @ 2020 Phire Inc. All rights reserved. Page 2 of 9


PeopleTools > Utilities > Administration > URLs

For PHI_FTP_UNIX example for UNIX, change:


ftp -s:<FILE> <SERVER>
To:
/usr/sbin/ftp -s:<FILE> <SERVER>
(Assuming ftp executable resides /usr/sbin)

SFTP Option
1. If the SFTP option is selected as the file transfer method, the SSH service must be installed
and running on each server that will serve as either the source or target for file migrations.
Linux is usually installed with SSH service by default.

2. You must configure public key authentication between the Phire application server and all
servers to which you plan to use sftp. For instructions on how to configure public key
authentication, refer to the document entitled
How_to_Configure_Secure_Shell_Public_Key_Authentication.pdf.

3. When generating the key, you must leave the passphrase empty.

4. If the path to the sftp executable on the Phire application server is not part of the PATH
environment variable when the Phire application server is started, you need to update the
PHI_SFTP URL to fully qualify the path to the sftp executable. Navigate to:

PeopleTools > Utilities > Administration > URLs

Change:
sftp -b <FILE> <USER>@<SERVER>
To:
/usr/sbin/sftp -b <FILE> <USER>@<SERVER>
(Assuming sftp executable resides on /usr/sbin)

PSFTP Option
1. PSFTP option is only available if the Phire application server is running on Windows and you
want to transfer files to UNIX/Linux servers running the SSH service.

2. You must configure public key authentication between the Phire application server and all
the servers to which you plan to use psftp. For detailed instructions on how to configure
public key authentication between a windows and UNIX/Linux servers for psftp, refer to the
document entitled How_to_Configure_PSFTP_File_Transfer.pdf.

3. When generating the key, you must leave the passphrase empty.

4. Copy all the psftp executable files in the “psftp” directory in the release package to the
working directory defined in the Domain Setup page.

Phire > Administration > Define Domain (Domains Page)

Copyright @ 2020 Phire Inc. All rights reserved. Page 3 of 9


(Copy all the exe files to the directory specified in the “Working Dir:” field)

XCOPY Option
1. The XCOPY option is only available for Windows OS. If the XCOPY option is selected as
the file transfer method, you must create a share on the target server.

2. If no user account is provided in the setup, then the user account used to start the Phire
application server will be used and it must exist on all the target servers, with the same
password, and have write access to the share.

Configuration
How to Configure Phire to Enable File Versioning

1. Specify the Working Directory

Phire uses the Working Directory on the application server for the Phire application as a
temporary staging area to perform file manipulations. The File Versioning and Migration
processes create a temporary directory in the Working Directory that is specified in the Domain
Setup page. For each request to version or migrate a file, a set of batch script files and the log files
are generated and executed from the Working Directory. After the completion of the file transfer
request, the temporary directories are automatically deleted.

1.1 Navigate to: Phire > Administration > Define Domain

1.2 Select the domain

1.3 Select the “Domains” tab and enter the name of a directory into the “Working Dir”
field. The below example is a path for a Windows application server.

Copyright @ 2020 Phire Inc. All rights reserved. Page 4 of 9


Note. To debug issues with file versioning or restore, you can prevent the automatic
deletion of the temporary working directories. Navigate to:
Phire > Administration > License Code
Select the “Retain Working Dir Folders” field.
The temporary directories created in the Working Directory will no longer be
removed.

2. Define Servers and Specify File Transfer Method

File transfer method options are: MVS FTP, SFTP Pubkey Auth, Standard FTP, Windows PSFTP
(Pubkey Auth or Password Auth), and Windows XCOPY. The FTP option is supported on all OS
and requires the FTP service to be running on each target server. The SFTP and PSFTP options
require SSH service to be running on each target server. XCOPY requires a Windows OS for both
the target and source server.

2.1 Navigate to: Phire > Administration > Define Domain

2.2 Select the domain.

Copyright @ 2020 Phire Inc. All rights reserved. Page 5 of 9


2.3 From the “Servers” tab, click the “+” button to add a new server definition.

2.4 Enter the name of the server that will be either the source or target for file versioning in
the “Server Name” field.

2.5 Select the “Servers” tab, choose the “File Transfer Method” next to each server. Valid
values are: MVS FTP, SFTP Pubkey Auth, Standard FTP, Windows PSFTP (Pubkey Auth
or Password Auth), and Windows XCOPY.

2.6 For the transfer methods that allow for a user account, enter that information in the “User
Account” field and the Password in the “Password” field.

2.7 Repeat steps 2.3 through 2.6 for each server that is either a source or target for file
versioning.

3. Define File Types

Define each file type to be versioned and migrated by Phire. Phire supports any file types. The
actual code value you assign for the file type does not have to match the file extension. For
example, you can define a file type of “MYS” to designate files with *.sqr extensions.

3.1 Navigate to: Phire > Administration > Application Codes (choose File Type)

3.2 Click the “+” button to add a new File Type.

3.3 Input the “Code Value” and “Code Description”

Copyright @ 2020 Phire Inc. All rights reserved. Page 6 of 9


Note. If the “Convert Name to Lower Case” is selected, the file name will be converted
to lowercase when added to the Object List in the Change Request. Selecting this
option is useful if you want the filenames to be consistent (all lowercase no matter what
was specified by the developer). This option should not be selected for file types that
need to be mixed case or upper case in operating systems like UNIX and Linux.

4. Define File Directories

The file directories configuration is used to determine which server and directory will be accessed
during a request to version or migrate a file. When a request is made to backup a file, the
requester specifies the name of the file, file type, and the source database. Phire uses this
information to query the configuration data in the File Directories page to determine the server
and directory name where the file resides. The server name is then used to query against the
Server Definition to determine the file transfer method and the login credentials.

4.1 Navigate to: Phire > Administration > File Directories

4.2 Add a New Value (Specify Domain ID and File Type (SQR, CRW, etc.).

4.3 Click the “+” button to add a new File Directory data.

4.4 Select the “Database ID” from the drop-down list box.

4.5 Enter the name of the server for the file type and for that database in the “Server” field.

4.6 In the “Directory” field, specify the name of the directory where the file type resides.

4.7 Check the “Source” field if this server/directory will be the source for all backup
requests for the associated Database ID. You can only have one source checked for a
Database ID.

4.8 Check the “Target” field if you want the file to be migrated or restored to the specified
server/directory for the associated Database ID. You can have multiple entries defined
as a target for a Database ID.

4.9 Check the “Preserve Case” checkbox to force the case of the filename to be identical to
the name added to the Phire Change Request. If not selected, file names will be converted
to lowercase for FTP and SFTP file transfer methods. This option should be selected for
file types on Operating Systems such as UNIX and Linux, which have case sensitive file
names.

4.10 If using FTP, specify the FTP Transfer Type (Default, Ascii, or Binary).

Copyright @ 2020 Phire Inc. All rights reserved. Page 7 of 9


Note. For FTP on UNIX/Linux server, specify the full path of the directory name with
forward slashes (/apps/psoft/sqr/). The terminating slash is required.

For FTP on Windows server, the first directory name must reside directly under the root
directory of the FTP site and the directory name must be specified with forward slashes
(psoft/sqr/), without a starting slash. The terminating slash is required.

Example: If the SQR directory location for your Windows server is d:\apps\psoft\sqr,
then the root directory of the IIS FTP site needs to be defined as either “d:\” or
“d:\apps”. If root directory is defined as “d:\”, then the directory in Phire needs to be
entered as “apps/psoft/sqr/”. If the root directory is defined as “d:\apps”, then specify
the directory in Phire as “psoft/sqr/”.

For SFTP or PSFTP to UNIX/Linux server, specify the full path of the directory name
with forward slashes (/apps/psoft/sqr/). The terminating slash is required.

For XCOPY on Windows server, the first directory name must be the name of the share
and the Directory Name must be specified with backward slashes (psoft\sqr), without
a starting slash. The terminating slash is required. Phire will automatically prepend
the server name to the directory name specified (i.e. \\myserverdb01\psoft\sqr.).

Note. If you want to set up a staging directory for developers to upload files, you have
the option to embed %%oprid%% meta variable in the Directory field to create
subdirectories that correspond to each developer’s oprid to better organize the directory
structure.

%%oprid%% resolves to the user profile that is performing the File Object versioning or
migration.

For example, you can create the following directory structure on the Phire App Server:
c:\phire\JSMITH\sqr
c:\phire\JDOE\sqr

To implement the example above, if you set up the root FTP directory to c:\, then the value
you need to enter into the “Directory” field is:
phire/%%oprid%%/sqr/

Test Communication Button

Copyright @ 2020 Phire Inc. All rights reserved. Page 8 of 9


This button will produce a small test file and attempt to transfer it to the target server and
directory specified using the given server transfer method. Use this button to easily test the
configuration without creating an entire Change Request to test the migration. Immediate
feedback will be returned in a pop-up message indicating success, failure or unknown results.
If it does not work, and you need to analyze the results closer, refer to the datetime-stamped
working directory created on the application server machine for the files associated with the
attempt.

4.11 Pre- and Post-Line Statements


The additional tab in the grid contains fields to set up the pre- and post-line statements. This
setup is used for all transfer methods except XCOPY. The values entered will be written into
the generated script file for execution. This feature is intended to offer a method of setting
permissions or other environment variables immediately before or after the “put” command
to place the file into the target location.

The following replacement tags are available:

<FILENAME> = The file name just processed


<PATHFILENAME> = The full path and file name just processed

An example of this feature might be a Post-Line statement to set the Linux/Unix file
permissions on a file following the migration:

!chmod 777 <PATHFILENAME> (0,626)

These values are not written when using the Test button described above.

Copyright @ 2020 Phire Inc. All rights reserved. Page 9 of 9

You might also like