New or updated Fabric project implementations must be deployed to the server.
Deployment into non-development servers must be carefully performed, and the correct updates must be verified. Verification can be done using code reviews (a human process) and tools that perform 3rd-party dependency vulnerability checks and code analysis for quality and security.
Such deployment, not performed from Fabric Studio, is called an Offline Deploy. Fabric provides two primary ways to perform this:
These methods should be used only after the prebuilt project artifacts targetted for deployment have passed verifications. CI/CD tools used for the verification pipeline can also perform Offline Deploy actions.
There are two ways to perform an Offline Deployment:
CI/CD tools should be used to build artifacts on a server using a docker image containing Fabric. This way, Fabric is not required to run to build 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 on 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 deployed in 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, are 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 must be carefully performed, and the correct updates must be verified. Verification can be done using code reviews (a human process) and tools that perform 3rd-party dependency vulnerability checks and code analysis for quality and security.
Such deployment, not performed from Fabric Studio, is called an Offline Deploy. Fabric provides two primary ways to perform this:
These methods should be used only after the prebuilt project artifacts targetted for deployment have passed verifications. CI/CD tools used for the verification pipeline can also perform Offline Deploy actions.
There are two ways to perform an Offline Deployment:
CI/CD tools should be used to build artifacts on a server using a docker image containing Fabric. This way, Fabric is not required to run to build 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 on 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 deployed in 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, are 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 |