Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleContents

Table of Contents
indent15px
maxLevel5
stylenone

Command Line Interface (CLI) tool provides functions for manipulating application and services in Fiorano Enterprise Server (FES). It is a command line interface to FES. Most of the functions that CLI offers can be done with eStudio tool but there can be situations where using a command line interface is convenient or there could be no support for a Graphical User Interface like eStudio. 

Anchor
_Toc382333675
_Toc382333675
Location

The tool is available as a batch/script file (cli.bat/cli.sh) in CLI_HOME ( FIORANO_HOME/esb/tools/cli.)

Note
titlePrerequisites

FES needs to be running for the scripts to work.

Anchor
_Toc382333677
_Toc382333677
Property Files

Since the interface is command line, options for every target are included in the properties file.

PropertyDescription

connection.properties

Enterprise server connection configuration. Internally CLI uses either RMI or RTL connection; mention appropriate URL in this file

nStudio.properties

Options while operating with nStudio applications. Used when CLI uses RTL connection

eStudio.properties

Options while operating with eStudio applications. Used when CLI uses RMI connection

svn.properties

SVN credentials and SVN path. Used in functions involving SVN

Info

All the examples in the below sections will be using RMI connections and hence the property file will be eStudio.properties.

Anchor
_Toc382333678
_Toc382333678
Functions Supported

Launch Application

launchEStudioApps target has to be used to launch Event Processes whose description is as below.

Sample configuration to launch EAI Demo sample is shown below. The user needs to take care of populating required variables mentioned in the readme file. Batch scripts can also be used to provide these values which is discussed at the end of the section.

When the command is executed, the task prompts for the username and password and launches the Event Process(es). The password can also be provided in connection.properties to avoid the prompt or it can also be provided directly in batch files.

Sample screenshot is shown below for launchEStudioApps. During the first run it has prompted for the password and in the second run the password is picked up from connection.properties file (CONNECTION_STRING=tsp_tcp://localhost:1947;admin;passwd).

 

Stop Application

Same as startEStudioApps, but the following properties have to be provided in eStudio.properties file.

Sample scripts are provided below.

Warning
It is the users' responsibility to develop and maintain these scripts and Fiorano will not assist in developing these unless it is a part of a consulting assignment.
Code Block
titleFiorano Import.bat - Script to import applications
languagepowershell
::Variable Declaration
@ECHO OFF 
SET cliPath=%ANT_HOME%
SET drive=%cliPath:~0,2%
set stagingfolder=%~dp0
set appzips="eventprocess1-1.0@EnterpriseServer.zip,[ |mailto: eventprocess2-1.0@EnterpriseServer.zip]eventprocess2-1.0@EnterpriseServer.zip (mailto: eventprocess2-1.0@EnterpriseServer.zip)"
set deploymentEnvironment=Testing

%drive%
cd %cliPath%
cd..
cd esb\Tools\cli
call ant importEStudioApps -D_ESTUDIO_IMPORT_APPLICATION_LIST=%appzips% -D_ESTUDIO_APPLICATION_IMPORT_DIR=%stagingfolder% -D_ESTUDIO_TARGET_APPLICATION_LABEL=%deploymentEnvironment% -D_ESTUDIO_OVER_WRITE_REFERRED_APP=true -D_ESTUDIO_IMPORT_WHOLE_APPLICATION_CHAIN=false
PAUSE
Code Block
titleFiorano Launch.bat -Script to launch Applications
@ECHO OFF 
SET cliPath=%ANT_HOME%
SET drive=%cliPath:~0,2%
set appguids=" EVENTPROCESS1, EVENTPROCESS2, EVENTPROCESS3"
%drive%
cd %cliPath%
cd..
cd esb\Tools\cli
call ant launchEStudioApps -D_ESTUDIO_LAUNCH_APPLICATION_LIST=%appguids%
Pause

Start and stop a component in an Application

From Fiorano 10 (recommended)

Code Block
titleFioranoStartComponent.bat
languagepowershell
@ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET complist=Feeder1 
SET appname=EVENT_PROCESS1 
SET appversion=1.0 
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant startEStudioServices -D_ESTUDIO_START_SERVICES_LIST=%complist% -D_ESTUDIO_START_SERVICES_OF_APPLICATION=%appname% -D_ESTUDIO_APPLICATION_VERSION=%appversion% 
Pause 
Code Block
titleFioranoStopComponent.bat
languagepowershell
@ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET complist=Feeder1 
SET appname=EVENT_PROCESS1 
SET appversion=1.0 
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant stopEStudioServices -D_ESTUDIO_STOP_SERVICES_LIST=%complist% -D_ESTUDIO_STOP_SERVICES_OF_APPLICATION=%appname% -D_ESTUDIO_APPLICATION_VERSION=%appversion% 
Pause 

Before Fiorano 10

 

Code Block
titleFioranoRTLStartComponent.bat
linenumberstrue
languagepowershell
 @ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET complist=Feeder1 
SET appname=EVENT_PROCESS1 
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant startServices -DSTART_SERVICES_LIST=%complist% -DSTART_SERVICES_OF_APPLICATION=%appname%
Pause 
Code Block
titleFioranoRTLStopComponent.bat
languagepowershell
@ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET complist=Feeder1 
SET appname=EVENT_PROCESS1 
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant stopServices -DSTOP_SERVICES_LIST=%complist% -DSTOP_SERVICES_OF_APPLICATION%appname%
Pause 

Anchor
Export Application
Export Application
Export Application

Exports the application in the FES repository to the local disk as a Zip file. To export, perform the following actions:

  1. Run FES server necessary for export application process.
  2. Set properties directory to which application zip files are to be exported and the list of applications to be exported in eStudio.properties file:
    _ESTUDIO_APPLICATION_EXPORT_DIR=/temp/import_ESTUDIO_EXPORT_APPLICATION_LIST=SIMPLECHAT:1.0,EVENT_PROCESS1:3.0

    Info

    If the mentioned directory does not exist, the function creates it.

  3. Run command "ant exportEStudioApps" in CLI_HOME. Refer Figure below for sample output.


    Sample output for export Applications

Following is the script to export the given application.

Code Block
titleFioranoExportApplication.bat
languagepowershell
 @ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET applist=EVENT_PROCESS1
SET appversion=1.0 
SET destinationFolder=/root/import
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant exportEStudioApps -D_ESTUDIO_APPLICATION_EXPORT_DIR=%destinationFolder% -D_ESTUDIO_EXPORT_APPLICATION_LIST=%applist% -D_ESTUDIO_APPLICATION_VERSION=%appversion% 

pause

Anchor
Import Application
Import Application
Import Application

Imports FIorano Application from exported application Zip File.

Info

Applications exported from previous versions of Fiorano tools (CLI/eStudio) also can be imported with this function

To import, perform the following actions:

  1. Run FES server necessary for import application process and have the application zip file to be imported in the local disk.
  2. Set properties, directory from which application zips should be taken and the zip file names in eStudio.properties file:
    _ESTUDIO_APPLICATION_IMPORT_DIR=/root/import/ _ESTUDIO_IMPORT_APPLICATION_LIST=SIMPLECHAT_1.0.zip,WORKLIST_MANAGER_1.0.zip

  3. Run command "ant importEStudioApps" in CLI_HOME. Refer Figure below for sample output.


Sample output for import Applications

Following is the script to import the given application

Code Block
titleFioranoImportApplciation.bat
languagepowershell
 @ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET applist=EVENT_PROCESS1_1.0.zip,EVENT_PROCESS2_1.0.zip
SET destinationFolder=/root/import
::Set true to overwrite the zip file
SET overwriteFile=true 
::Set true to overwrite the configurations in the Repository
SET overWriteNamedConfig=true 

%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 

call ant importEStudioApps -D_ESTUDIO_APPLICATION_IMPORT_DIR=%destinationFolder% -D_ESTUDIO_IMPORT_APPLICATION_LIST=%applist% -D_ESTUDIO_OVERWRITE=%overwriteFile% -D_ESTUDIO_OVER_WRITE_NAMED_CONFIG=%overWriteNamedConfig%

pause

 

Anchor
_Toc382333683
_Toc382333683
Export Application with Libraries

While exporting an application, if the libraries for the application also need to be exported, then use this function.

  1. Set properties export directory, applications to be exported in eStudio.properties file.
    _ESTUDIO_EXPORT_APPLICATION_LIB_LIST=SIMPLECHAT:1.0,EVENT_PROCESS1:3.0_ESTUDIO_APPLICATION_EXPORT_DIR_LIB=/temp/import
  2. Run command "ant exportEStudioAppsWithLibs" in CLI_HOME. Refer the below figure for sample output.


    Sample output for exporting Applications with Libraries

Anchor
_Toc382333684
_Toc382333684
Import Application with Libraries

In this function only those Zip files which are exported from the above function can be imported.

  1. Set properties import directory and the files to be imported in the directory:
    _ESTUDIO_APPLICATION_IMPORT_DIR_LIB=/temp/import_ESTUDIO_IMPORT_APPLICATION_LIB_LIST=SIMPLECHAT_1.0.zip,EVENT_PROCESS1_3.0.zip
  2. Run command "ant importEStudioAppsWithLibs" in CLI_HOME. Refer Figure below for sample output.


    Sample output for importing Applications with Libraries

Anchor
_Toc382333685
_Toc382333685
Import Application from SVN

If the application folder is in SVN repository then this function can be used to import the application directly into the repository.

  1. Set properties for single application folder name, svn revision (HEAD indicates latest version), a temporary directory to which application is checked-out in eStudio.properties (also set SVN details in svn.properties):
    svn.username=usersvn.password=passsvn.repository=/trunk/application_ESTUDIO_SVN_IMPORT_APPLICATION=event_process10-1.0_ESTUDIO_SVN_IMPORT_APPLICATION_REVISION=HEAD_ESTUDIO_APPLICATION_IMPORT_DIR=/temp
  2. Run command "ant importApplicationFromSVN" in CLI_HOME. Refer the figure below for sample output.


    Sample output for importing Applications from SVN

Change Environment of an Application

Once the event process is set up for both environments with respective peer servers (Refer Configure Peer Server to Environment), by changing the Environment of the Event Process, the peer in which all the components are deployed can also be changed. Below script helps to change the Environment from CLI tool. 

Code Block
titleFioranoChangeEnvironment.bat
languagepowershell
::Below scripts changes the environment
@ECHO OFF 
SET cliPath=%ANT_HOME% 
SET drive=%cliPath:~0,2% 
SET applist=" EVENT_PROCESS1"
SET appversion=1.0 
SET deploymentEnvironment=Production
%drive% 
cd %cliPath% 
cd.. 
cd esb\tools\cli 
call ant migrateEventProcessEnvironment
-D_ESTUDIO_MIGRATE_APPLICATION_LIST=%applist%
-D_ESTUDIO_APPLICATION_VERSION=%appversion%
-D_ESTUDIO_TARGET_ENVIRONMENT=%deploymentEnvironment%
-D_ESTUDIO_OVER_WRITE_NAMED_CONFIG=true
-D_ESTUDIO_MIGRATE_COPY_NAMED_CONFIGS=true
pause

Environment Migration

Prerequisite

This operation primarily requires configuring peer server for components, attaching them to the specific environments, as explained below using eStudio tool. 

Info

In this example, fpsQA corresponds to Testing environment and fpsProd to Production environment.

Configuring fpsQA peer to Testing Environment
Change the Event Process to required Environment
  1. Open the required application. 
  2. Goto Properties > Environment Properties
  3. Select the required Testing Environment.

Set the required peer. 
  1. Select all the components.
  2. Go to Properties > Deployment > Nodes
  3. Set the peer name to fpsQA

    Info

    Multiple peer names can be specified as comma separated values like fpsProd, fpsProd_BackUp

  4. Save the Event Process. Once the Event Process is saved, notice the peer names being reflected in the Environment Properties of the Application as highlighted in the below image.

Configuring fpsProd peer to Production Environment

Configure the peer server with name 'fpsProd' similar to the steps described above.

Info
titleAvailability of Production Peer in QA

It is likely that the Production Peer is not available when logged into QA Enterprise server. However, the name can be provided manually with the environment set as Production.

Anchor
_Toc382333686
_Toc382333686
Procedure Available from Fiorano 10.1

This function imports applications from one FES to another FES (Both Fiorano versions must be same). For example from Testing FES to Production FES.

With Configure Peer Server to Environment is done, execute the below function for all the components to be deployed in fpsProd, since Event Process is moved to Production Environment. If you do not want to change the peer deployment, then ignore Configure Peer Server to Environment and _ESTUDIO_TARGET_APPLICATION_LABEL in the below function.

Note

In the below example, the given source machine is the same one which is using the CLI function; a third machine can also use this CLI function to migrate the environment.
Location: CLI_HOME/EnvironmentMigration.

  1. Set properties application to import, components to import, source FES and target FES connection details in file environmentMigration.properties file:
    _ESTUDIO_IMPORT_APPLICATION_LIST=EVENT_PROCESS4:1.0,EVENT_PROCESS5:2.0_ESTUDIO_IMPORT_SERVICES_LIST=Feeder:4.0,Display:4.0,JmsIn:5.0SOURCE_RMI_CONNECTION_STRING=rmi://192.168.1.76:2047TARGET_RMI_CONNECTION_STRING=rmi://localhost:2047 _ESTUDIO_TARGET_APPLICATION_LABEL=Production
  2. Run command ant EnvironmentMigration in CLI_HOME/EnvironmetMigration. Refer the figure below for sample output.


    Sample output for importing Applications from remote FES

For elaborate descriptions of the targets and the usage of other targets, go through CLI Readme file (CLI_HOME/Readme.txt).

To use these functions in the previous version of Fiorano Refer Environment Migration (Before Fiorano 10.1), follow the steps mentioned below.

Procedure Before Fiorano 10.1

Note

First and last steps can be ignored if you do not want to deploy Event Process into different Peer after moving into Production Enterprise server.

  1. Refer Configure Peer Server to Environment to configure the Environment to a peer server.
  2. Export the required application from Testing Enterprise Server.
  3. Copy the exported zip file to the local disk of the Production Enterprise Server machine.
  4. Import the application to Production Enterprise Server.
  5. Refer the Change Environment Of the Event Process From CLI to change the Environment to Production also deploys components into fpsProd

Anchor
_Toc382333682
_Toc382333682
Replace Property

After exporting an Event Process zip file, if any property needs to be changed before using it again, use this function.

  1. In the above SIMPLECHAT_1.0.zip exported, all the components are deployed in peer 'fps' by default, to deploy that peer to 'mypeer' when imported.
  2. Create a file with any name, for example, 'replace.properties' with content: <string to be replaced>=<replacement string>. In this example, content is: fps=mypeer
  3. Set the properties for necessary options such as input zipfile, output zip file and properties in eStudio.properties file:
    _ESTUDIO_INPUT_ZIP_FILE=/temp/import/SIMPLECHAT_1.0.zip_ESTUDIO_OUTPUT_ZIP_FILE=/temp/import/SIMPLECHAT_1.0_MYPEER.zip_ESTUDIO_PROPERTIES_FILE_ZIP=/temp/import/replace.properties
  4. Run command "ant replaceInZip" in CLI_HOME. Refer the below figure for sample output.

 

Adaptavist ThemeBuilder EngineAtlassian Confluence