Deploy a Project

Deploying a project uploads compiled LU artifacts to a Fabric server, making them active and ready for use.

Deployment not performed from Fabric Studio can be done in two ways:

  • Build and deploy in one step using buildAndDeployArtifacts.sh — builds artifacts and deploys them in a single command.
  • Deploy pre-built artifacts using deploy-artifacts.sh — deploys artifacts that were previously built and stored, for example from a separate CI build stage.

You can also deploy a single LU directly on the Fabric server using the DEPLOY command, or remotely using the Fabric REST API.

All script-based methods support local and remote deployment:

  • Local deploy — connects to a running Fabric instance on the same machine via the Fabric CLI. Requires a local Fabric installation.
  • Remote deploy — uses the Fabric HTTP API (-r flag). Does not require a local Fabric installation.

Build and Deploy in One Step

buildAndDeployArtifacts.sh orchestrates the full pipeline: build → optionally deploy environment → deploy LU artifacts. It calls buildArtifacts.sh, deploy-environment.sh, and deploy-artifacts.sh internally, stopping if any step fails.

The script is located under $K2_HOME/fabric/scripts.

Usage:

./buildAndDeployArtifacts.sh -pd <PATH_TO_PROJECT> [options]

Options:

Option

Description

Mandatory

Default

-pd / --project-dir

Path to the project directory. Required unless -d (deploy-only) is set.

Conditional

-l / --lu-type-name

LU name(s) to build and deploy. Accepts a comma-separated list.

N

All LUs

-u / --username

Fabric username.

N

admin

-p / --password

Fabric password.

N

admin

-t / --token

API token for authentication. Takes precedence over username/password.

N

-host / --host

Fabric host (IP address or URL).

N

localhost

-port / --port

Fabric port.

N

5124 (when host is localhost)

-r / --remote-deploy

Enable remote deployment via HTTP API.

N

false

-d / --deploy-only

Skip the build step; deploy pre-built artifacts only.

N

false

-sd / --soft-deploy

Soft deploy: skip automatic processes (jobs, parsers, interface listeners, deploy.flow).

N

false

-s / --nosync

NoSync mode.

N

true

-ad / --artifact-dir

Path to the artifacts directory.

N

<project>/Implementation/LogicalUnits

-e / --environment

Environment name to activate after deployment.

N

-ef / --environment-file

Path to the environment XML file.

N

<project>/Implementation/SharedObjects/Environments/Environments.k2fabEnv.xml

-de / --deploy-environment

Deploy the environment file without setting it as active.

N

false

-v / --jdk-version

JDK version for compilation.

N

21

-a / --args

Additional arguments passed to broadway.flow.

N

-h / --help

Displays usage information.

N

Example — build and deploy to a remote server:

./buildAndDeployArtifacts.sh \
  -pd /opt/apps/MyProject \
  -host 10.0.0.5 \
  -u admin -p mypassword \
  -r

Example — deploy-only (pre-built artifacts) with environment activation:

./buildAndDeployArtifacts.sh \
  -pd /opt/apps/MyProject \
  -host 10.0.0.5 -r \
  -d \
  -de -e Production

Deploy Pre-Built Artifacts

deploy-artifacts.sh deploys LU artifacts that have already been built, for example using buildArtifacts.sh in a separate CI stage. The script is located under $K2_HOME/fabric/scripts.

Usage:

./deploy-artifacts.sh [options]

Options:

Option

Description

Mandatory

Default

-host / --host

Fabric host (IP address or URL).

N

localhost

-port / --port

Fabric port.

N

5124 (when host is localhost)

-u / --username

Fabric username.

N

admin

-p / --password

Fabric password.

N

admin

-t / --token

API token for authentication. Takes precedence over username/password.

N

-pd / --project-dir

Path to the project directory.

N

-ad / --artifact-dir

Path to the artifacts directory.

N

<project>/Implementation/LogicalUnits

-r / --remote-deploy

Enable remote deployment via HTTP API.

N

false

-sd / --soft-deploy

Soft deploy: skip automatic processes (jobs, parsers, interface listeners, deploy.flow).

N

false

-l / --lu-list

LU name(s) to deploy. Accepts a comma-separated list.

N

All LUs in the artifact directory

-h / --help

Displays usage information.

N

The script enforces a fixed deployment order: k2_ref is deployed first, all other LUs follow, and k2_ws (Web Services) is deployed last.

Example — deploy from a CI artifact store to a remote server:

./deploy-artifacts.sh \
  -ad /artifacts/MyProject \
  -host 10.0.0.5 \
  -t $API_TOKEN \
  -r

Deploy using the Fabric DEPLOY Command

On the Fabric server, deploy a single LU directly using the DEPLOY command. Copy the ludb.jar and ludbXMLs.zip files to the target server, then run:

DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip_path'> [WS_METHODS <'string'>] NOSYNC <Boolean>;

Options:

Option

Description

LUT

Logical Unit Type name.

JAR

Mandatory. Path to the JAR file, relative to USER_DIR.

ZIP_FILE

Path to the ZIP file, relative to USER_DIR.

NOSYNC

TRUE — only schema changes trigger a sync after deploy. FALSE — any deploy triggers a sync on the first instance access. Note that NOSYNC FALSE is equivalent to checking the Force Upgrade Post Deploy checkbox in the Server Configuration window.

SOFT_DEPLOY

Default: FALSE. When TRUE, skips automatic processes: jobs, parsers, interface listeners, and deploy.flow.

WS_METHODS

When LUT = k2_ws (Web Services), specify which methods to deploy, separated by ",". Empty or omitted = all methods.

Example:

DEPLOY k2_ws WITH JAR '/home/k2view/project/k2_ws/ludb.jar' ZIP_FILE '/home/k2view/project/k2_ws/ludbXMLs.zip' WS_METHODS 'dbQueryOnAnyDB' NOSYNC true;

Deploy using API Calls

Use the Fabric REST API to deploy remotely without a local Fabric installation.

Request URL Format

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>]

Parameters

Parameter

Description

Mandatory

Default

luName

The name of the LUT to deploy. Each call deploys a single LUT.

Y

noSync

When true, only schema changes trigger a sync after deploy.

N

false

softDeploy

When true, skips automatic processes after deploy.

N

false

methodList

When luName=k2_ws (Web Services), specifies which methods to deploy. Comma-separated. Empty or omitted = all methods.

N

Authentication & Authorization

  • Use either user + password parameters, or a token (API key).
  • The caller must hold deploy permissions. See Fabric Credentials.

Request Body

Send with Content-Type: 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 are deployed.

N

Previous

Deploy a Project

Deploying a project uploads compiled LU artifacts to a Fabric server, making them active and ready for use.

Deployment not performed from Fabric Studio can be done in two ways:

  • Build and deploy in one step using buildAndDeployArtifacts.sh — builds artifacts and deploys them in a single command.
  • Deploy pre-built artifacts using deploy-artifacts.sh — deploys artifacts that were previously built and stored, for example from a separate CI build stage.

You can also deploy a single LU directly on the Fabric server using the DEPLOY command, or remotely using the Fabric REST API.

All script-based methods support local and remote deployment:

  • Local deploy — connects to a running Fabric instance on the same machine via the Fabric CLI. Requires a local Fabric installation.
  • Remote deploy — uses the Fabric HTTP API (-r flag). Does not require a local Fabric installation.

Build and Deploy in One Step

buildAndDeployArtifacts.sh orchestrates the full pipeline: build → optionally deploy environment → deploy LU artifacts. It calls buildArtifacts.sh, deploy-environment.sh, and deploy-artifacts.sh internally, stopping if any step fails.

The script is located under $K2_HOME/fabric/scripts.

Usage:

./buildAndDeployArtifacts.sh -pd <PATH_TO_PROJECT> [options]

Options:

Option

Description

Mandatory

Default

-pd / --project-dir

Path to the project directory. Required unless -d (deploy-only) is set.

Conditional

-l / --lu-type-name

LU name(s) to build and deploy. Accepts a comma-separated list.

N

All LUs

-u / --username

Fabric username.

N

admin

-p / --password

Fabric password.

N

admin

-t / --token

API token for authentication. Takes precedence over username/password.

N

-host / --host

Fabric host (IP address or URL).

N

localhost

-port / --port

Fabric port.

N

5124 (when host is localhost)

-r / --remote-deploy

Enable remote deployment via HTTP API.

N

false

-d / --deploy-only

Skip the build step; deploy pre-built artifacts only.

N

false

-sd / --soft-deploy

Soft deploy: skip automatic processes (jobs, parsers, interface listeners, deploy.flow).

N

false

-s / --nosync

NoSync mode.

N

true

-ad / --artifact-dir

Path to the artifacts directory.

N

<project>/Implementation/LogicalUnits

-e / --environment

Environment name to activate after deployment.

N

-ef / --environment-file

Path to the environment XML file.

N

<project>/Implementation/SharedObjects/Environments/Environments.k2fabEnv.xml

-de / --deploy-environment

Deploy the environment file without setting it as active.

N

false

-v / --jdk-version

JDK version for compilation.

N

21

-a / --args

Additional arguments passed to broadway.flow.

N

-h / --help

Displays usage information.

N

Example — build and deploy to a remote server:

./buildAndDeployArtifacts.sh \
  -pd /opt/apps/MyProject \
  -host 10.0.0.5 \
  -u admin -p mypassword \
  -r

Example — deploy-only (pre-built artifacts) with environment activation:

./buildAndDeployArtifacts.sh \
  -pd /opt/apps/MyProject \
  -host 10.0.0.5 -r \
  -d \
  -de -e Production

Deploy Pre-Built Artifacts

deploy-artifacts.sh deploys LU artifacts that have already been built, for example using buildArtifacts.sh in a separate CI stage. The script is located under $K2_HOME/fabric/scripts.

Usage:

./deploy-artifacts.sh [options]

Options:

Option

Description

Mandatory

Default

-host / --host

Fabric host (IP address or URL).

N

localhost

-port / --port

Fabric port.

N

5124 (when host is localhost)

-u / --username

Fabric username.

N

admin

-p / --password

Fabric password.

N

admin

-t / --token

API token for authentication. Takes precedence over username/password.

N

-pd / --project-dir

Path to the project directory.

N

-ad / --artifact-dir

Path to the artifacts directory.

N

<project>/Implementation/LogicalUnits

-r / --remote-deploy

Enable remote deployment via HTTP API.

N

false

-sd / --soft-deploy

Soft deploy: skip automatic processes (jobs, parsers, interface listeners, deploy.flow).

N

false

-l / --lu-list

LU name(s) to deploy. Accepts a comma-separated list.

N

All LUs in the artifact directory

-h / --help

Displays usage information.

N

The script enforces a fixed deployment order: k2_ref is deployed first, all other LUs follow, and k2_ws (Web Services) is deployed last.

Example — deploy from a CI artifact store to a remote server:

./deploy-artifacts.sh \
  -ad /artifacts/MyProject \
  -host 10.0.0.5 \
  -t $API_TOKEN \
  -r

Deploy using the Fabric DEPLOY Command

On the Fabric server, deploy a single LU directly using the DEPLOY command. Copy the ludb.jar and ludbXMLs.zip files to the target server, then run:

DEPLOY <LUT> WITH JAR <'jar_path'> ZIP_FILE <'zip_path'> [WS_METHODS <'string'>] NOSYNC <Boolean>;

Options:

Option

Description

LUT

Logical Unit Type name.

JAR

Mandatory. Path to the JAR file, relative to USER_DIR.

ZIP_FILE

Path to the ZIP file, relative to USER_DIR.

NOSYNC

TRUE — only schema changes trigger a sync after deploy. FALSE — any deploy triggers a sync on the first instance access. Note that NOSYNC FALSE is equivalent to checking the Force Upgrade Post Deploy checkbox in the Server Configuration window.

SOFT_DEPLOY

Default: FALSE. When TRUE, skips automatic processes: jobs, parsers, interface listeners, and deploy.flow.

WS_METHODS

When LUT = k2_ws (Web Services), specify which methods to deploy, separated by ",". Empty or omitted = all methods.

Example:

DEPLOY k2_ws WITH JAR '/home/k2view/project/k2_ws/ludb.jar' ZIP_FILE '/home/k2view/project/k2_ws/ludbXMLs.zip' WS_METHODS 'dbQueryOnAnyDB' NOSYNC true;

Deploy using API Calls

Use the Fabric REST API to deploy remotely without a local Fabric installation.

Request URL Format

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>]

Parameters

Parameter

Description

Mandatory

Default

luName

The name of the LUT to deploy. Each call deploys a single LUT.

Y

noSync

When true, only schema changes trigger a sync after deploy.

N

false

softDeploy

When true, skips automatic processes after deploy.

N

false

methodList

When luName=k2_ws (Web Services), specifies which methods to deploy. Comma-separated. Empty or omitted = all methods.

N

Authentication & Authorization

  • Use either user + password parameters, or a token (API key).
  • The caller must hold deploy permissions. See Fabric Credentials.

Request Body

Send with Content-Type: 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 are deployed.

N

Previous