New or updated Fabric project implementations must be deployed to the server.
Deployment into non-development servers shall be carefully done, verifying that the right changes will be applied. Verification can be done by code-reviews (a human process), as well as by tools that perform 3rd-party dependency vulnerability checks and code analysis for quality & security.
Such deployment, which is not done from the Fabric Studio, is called an Offline Deploy, and Fabric provides 2 main methods for performing it:
These methods should be used only after the prebuilt project artifacts - aimed for deployment - have passed verifications. Moreover, your CI/CD tools responsible for the verification pipeline, can performs the Offline Deploy actions.
There are 2 ways to perform this Offline Deployment method:
Building artifacts in a server is aimed to be done by CI/CD tool, using a docker image that contains Fabric in it. This way, Fabric is not required to run for building the artifacts.
To build the artifacts in the Fabric Studio:
Right-click the same object and select Open Folder. The Windows Explorer opens in the following location: [Your PC Folder]\K2View Fabric Studio\Projects\[Project Name]\Implementation\LogicalUnits\[LU Name].
Look for the ludb.JAR and ludbXMLs.ZIP files.
To build the artifacts in a server, run the buildArtifacts.sh script.
Copy the ludb.JAR and ludbXMLs.ZIP files of the relevant LUs into the target Fabric server, and run the Fabric Deploy command using the following syntax:
DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip path'> [WS_METHODS <'string'>] NOSYNC <Boolean>.
Note that if the LUT parameter is populated by k2_ws (the Web Services LU Type), you can populate the WS_METHODS using the list of web services to be deployed. If this parameter is not populated or is skipped, the whole Web Services LU Type, with all web services it contains, will be eployed into the Fabric server.
Example:
DEPLOY k2_ws WITH JAR '/home/k2view/AutoTests/Data/StudioProject/QA/Implementation/LogicalUnits/k2_ws/ludb.jar' ZIP_FILE '/home/k2view/AutoTests/Data/StudioProject/QA/Implementation/LogicalUnits/k2_ws/ludbXMLs.zip' WS_METHODS 'dbQueryOnAnyDB' NOSYNC true;
To build the artifacts and the deployment together, in one step, from the server, run the buildAndDeployArtifacts script.
The following table describes the syntax and the mandatory/optional parameters for calling the deployment scripts. The scripts are located under $K2_HOME/fabric/scripts in the Fabric server.
The following table describes the syntax and the mandatory/optional parameters when invoking the deploy command on the Fabric server. Note that for deployment, you can also run the buildAndDeployArtifacts script, using the DEPLOYONLY flag.
DEPLOY |
Usage: DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip path'> [WS_METHODS <'string'>] NOSYNC <Boolean>. Options:
|
POST https://<FABRIC-IP>:<FABRIC-PORT>/deploy?luName=<LUT-NAME>[&noSync=true|false][&softDeploy=true|false][&methodList=<LIST-OF-METHODS>]&[token=<APIKEY>][user=<USER-NAME>&password=<PASSWORD>]
Body parameters, along with the deployment files, to be sent with ContentType header = multipart/form-data.
Parameter |
Description |
Mandatory |
jar |
Path to the JAR file |
Y |
projectXmlData |
Path to the ludbXMLs ZIP file. When not specified, only Java files will be deployed. |
N |
New or updated Fabric project implementations must be deployed to the server.
Deployment into non-development servers shall be carefully done, verifying that the right changes will be applied. Verification can be done by code-reviews (a human process), as well as by tools that perform 3rd-party dependency vulnerability checks and code analysis for quality & security.
Such deployment, which is not done from the Fabric Studio, is called an Offline Deploy, and Fabric provides 2 main methods for performing it:
These methods should be used only after the prebuilt project artifacts - aimed for deployment - have passed verifications. Moreover, your CI/CD tools responsible for the verification pipeline, can performs the Offline Deploy actions.
There are 2 ways to perform this Offline Deployment method:
Building artifacts in a server is aimed to be done by CI/CD tool, using a docker image that contains Fabric in it. This way, Fabric is not required to run for building the artifacts.
To build the artifacts in the Fabric Studio:
Right-click the same object and select Open Folder. The Windows Explorer opens in the following location: [Your PC Folder]\K2View Fabric Studio\Projects\[Project Name]\Implementation\LogicalUnits\[LU Name].
Look for the ludb.JAR and ludbXMLs.ZIP files.
To build the artifacts in a server, run the buildArtifacts.sh script.
Copy the ludb.JAR and ludbXMLs.ZIP files of the relevant LUs into the target Fabric server, and run the Fabric Deploy command using the following syntax:
DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip path'> [WS_METHODS <'string'>] NOSYNC <Boolean>.
Note that if the LUT parameter is populated by k2_ws (the Web Services LU Type), you can populate the WS_METHODS using the list of web services to be deployed. If this parameter is not populated or is skipped, the whole Web Services LU Type, with all web services it contains, will be eployed into the Fabric server.
Example:
DEPLOY k2_ws WITH JAR '/home/k2view/AutoTests/Data/StudioProject/QA/Implementation/LogicalUnits/k2_ws/ludb.jar' ZIP_FILE '/home/k2view/AutoTests/Data/StudioProject/QA/Implementation/LogicalUnits/k2_ws/ludbXMLs.zip' WS_METHODS 'dbQueryOnAnyDB' NOSYNC true;
To build the artifacts and the deployment together, in one step, from the server, run the buildAndDeployArtifacts script.
The following table describes the syntax and the mandatory/optional parameters for calling the deployment scripts. The scripts are located under $K2_HOME/fabric/scripts in the Fabric server.
The following table describes the syntax and the mandatory/optional parameters when invoking the deploy command on the Fabric server. Note that for deployment, you can also run the buildAndDeployArtifacts script, using the DEPLOYONLY flag.
DEPLOY |
Usage: DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip path'> [WS_METHODS <'string'>] NOSYNC <Boolean>. Options:
|
POST https://<FABRIC-IP>:<FABRIC-PORT>/deploy?luName=<LUT-NAME>[&noSync=true|false][&softDeploy=true|false][&methodList=<LIST-OF-METHODS>]&[token=<APIKEY>][user=<USER-NAME>&password=<PASSWORD>]
Body parameters, along with the deployment files, to be sent with ContentType header = multipart/form-data.
Parameter |
Description |
Mandatory |
jar |
Path to the JAR file |
Y |
projectXmlData |
Path to the ludbXMLs ZIP file. When not specified, only Java files will be deployed. |
N |