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 $FABRIC_HOME/fabric/scripts.

Usage:

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

Options:

The options are passed as command-line arguments. They can also be set as environment variables before running the script, although passing them as arguments is the recommended approach.

Option

Environment Variable

Description

Default

-pd / --project-dir

PROJ_DIR

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

-l / --lu-type-name

LUTNAME

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

All LUs

-u / --username

USERNAME

Fabric username.

admin

-p / --password

PASSWORD

Fabric password.

admin

-t / --token

TOKEN

Fabric API token, sent as a token URL parameter.

-b / --bearer

BEARER_TOKEN

Fabric API token, sent as an Authorization: Bearer header instead of a URL parameter. Available from Fabric 8.5.1.

-host / --host

HOST

Fabric host (IP address or URL).

localhost

-port / --port

PORT

Fabric port. See the note below the table.

5124

-r / --remote-deploy

Enable remote deployment via HTTP API.

false

-d / --deploy-only

DEPLOYONLY

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

false

-sd / --soft-deploy

SOFTDEPLOY

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

false

-s / --nosync

NOSYNC

NoSync mode.

true

-ad / --artifact-dir

ARTIFACT_DIR

Path to the artifacts directory.

<project>/Implementation/LogicalUnits

-e / --environment

ENVIRONMENT

Environment name to activate after deployment.

-ef / --environment-file

ENVIRONMENT_FILE

Path to the environment XML file.

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

-de / --deploy-environment

DEPLOY_ENVIRONMENT

Deploy the environment file without setting it as active.

false

-v / --jdk-version

JDK_VERSION

JDK version for compilation.

21

-a / --args

ARGS

Additional arguments passed to broadway.flow.

-h / --help

Displays usage information.

The port depends on the deploy mode. A local deploy connects to the Fabric JDBC endpoint, using the default port 5124. A remote deploy connects to the Fabric REST API endpoint, whose default port is 3213 — set it explicitly unless it is already part of the host URL.

Authentication: the script accepts -b / --bearer, -t / --token, or -u / --username with -p / --password. If more than one is set, --bearer is used first, then --token, then --username/--password.

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 $FABRIC_HOME/fabric/scripts.

Usage:

./deploy-artifacts.sh [options]

Options:

The options are passed as command-line arguments. They can also be set as environment variables before running the script, although passing them as arguments is the recommended approach.

Option

Environment Variable

Description

Default

-host / --host

HOST

Fabric host (IP address or URL).

localhost

-port / --port

PORT

Fabric port. See the note below the table.

5124

-u / --username

USERNAME

Fabric username.

admin

-p / --password

PASSWORD

Fabric password.

admin

-t / --token

TOKEN

Fabric API token, sent as a token URL parameter.

-b / --bearer

BEARER_TOKEN

Fabric API token, sent as an Authorization: Bearer header instead of a URL parameter. Available from Fabric 8.5.1.

-pd / --project-dir

PROJECT_DIR

Path to the project directory.

-ad / --artifact-dir

ARTIFACT_DIR

Path to the artifacts directory.

<project>/Implementation/LogicalUnits

-r / --remote-deploy

REMOTE_DEPLOY

Enable remote deployment via HTTP API.

false

-sd / --soft-deploy

SOFTDEPLOY

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

false

-l / --lu-list

LU_LIST

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

All LUs in the artifact directory

-h / --help

Displays usage information.

The port depends on the deploy mode. A local deploy connects to the Fabric JDBC endpoint, using the default port 5124. A remote deploy connects to the Fabric REST API endpoint, whose default port is 3213 — set it explicitly unless it is already part of the host URL.

Authentication: the script accepts -b / --bearer, -t / --token, or -u / --username with -p / --password. If more than one is set, --bearer is used first, then --token, then --username/--password.

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 $FABRIC_HOME/artifacts/MyProject \
  --remote-deploy \
  --host 10.0.0.5 \
  --port 3124 \
  -b $API_TOKEN

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

Authenticate with any one of the following.

Request header:

  • Authorization: Bearer <APIKEY> — available from Fabric 8.5.1.
  • Authorization: Basic <base64(user:password)>

URL parameters:

  • token=<APIKEY>
  • user=<USER-NAME>&password=<PASSWORD>

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 $FABRIC_HOME/fabric/scripts.

Usage:

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

Options:

The options are passed as command-line arguments. They can also be set as environment variables before running the script, although passing them as arguments is the recommended approach.

Option

Environment Variable

Description

Default

-pd / --project-dir

PROJ_DIR

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

-l / --lu-type-name

LUTNAME

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

All LUs

-u / --username

USERNAME

Fabric username.

admin

-p / --password

PASSWORD

Fabric password.

admin

-t / --token

TOKEN

Fabric API token, sent as a token URL parameter.

-b / --bearer

BEARER_TOKEN

Fabric API token, sent as an Authorization: Bearer header instead of a URL parameter. Available from Fabric 8.5.1.

-host / --host

HOST

Fabric host (IP address or URL).

localhost

-port / --port

PORT

Fabric port. See the note below the table.

5124

-r / --remote-deploy

Enable remote deployment via HTTP API.

false

-d / --deploy-only

DEPLOYONLY

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

false

-sd / --soft-deploy

SOFTDEPLOY

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

false

-s / --nosync

NOSYNC

NoSync mode.

true

-ad / --artifact-dir

ARTIFACT_DIR

Path to the artifacts directory.

<project>/Implementation/LogicalUnits

-e / --environment

ENVIRONMENT

Environment name to activate after deployment.

-ef / --environment-file

ENVIRONMENT_FILE

Path to the environment XML file.

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

-de / --deploy-environment

DEPLOY_ENVIRONMENT

Deploy the environment file without setting it as active.

false

-v / --jdk-version

JDK_VERSION

JDK version for compilation.

21

-a / --args

ARGS

Additional arguments passed to broadway.flow.

-h / --help

Displays usage information.

The port depends on the deploy mode. A local deploy connects to the Fabric JDBC endpoint, using the default port 5124. A remote deploy connects to the Fabric REST API endpoint, whose default port is 3213 — set it explicitly unless it is already part of the host URL.

Authentication: the script accepts -b / --bearer, -t / --token, or -u / --username with -p / --password. If more than one is set, --bearer is used first, then --token, then --username/--password.

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 $FABRIC_HOME/fabric/scripts.

Usage:

./deploy-artifacts.sh [options]

Options:

The options are passed as command-line arguments. They can also be set as environment variables before running the script, although passing them as arguments is the recommended approach.

Option

Environment Variable

Description

Default

-host / --host

HOST

Fabric host (IP address or URL).

localhost

-port / --port

PORT

Fabric port. See the note below the table.

5124

-u / --username

USERNAME

Fabric username.

admin

-p / --password

PASSWORD

Fabric password.

admin

-t / --token

TOKEN

Fabric API token, sent as a token URL parameter.

-b / --bearer

BEARER_TOKEN

Fabric API token, sent as an Authorization: Bearer header instead of a URL parameter. Available from Fabric 8.5.1.

-pd / --project-dir

PROJECT_DIR

Path to the project directory.

-ad / --artifact-dir

ARTIFACT_DIR

Path to the artifacts directory.

<project>/Implementation/LogicalUnits

-r / --remote-deploy

REMOTE_DEPLOY

Enable remote deployment via HTTP API.

false

-sd / --soft-deploy

SOFTDEPLOY

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

false

-l / --lu-list

LU_LIST

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

All LUs in the artifact directory

-h / --help

Displays usage information.

The port depends on the deploy mode. A local deploy connects to the Fabric JDBC endpoint, using the default port 5124. A remote deploy connects to the Fabric REST API endpoint, whose default port is 3213 — set it explicitly unless it is already part of the host URL.

Authentication: the script accepts -b / --bearer, -t / --token, or -u / --username with -p / --password. If more than one is set, --bearer is used first, then --token, then --username/--password.

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 $FABRIC_HOME/artifacts/MyProject \
  --remote-deploy \
  --host 10.0.0.5 \
  --port 3124 \
  -b $API_TOKEN

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

Authenticate with any one of the following.

Request header:

  • Authorization: Bearer <APIKEY> — available from Fabric 8.5.1.
  • Authorization: Basic <base64(user:password)>

URL parameters:

  • token=<APIKEY>
  • user=<USER-NAME>&password=<PASSWORD>

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