Environment's Offline Deployment

An environment's offline deployment is used for deploying environments to a server not from Studio.

Offline Deployment using Scripts

Perform the following actions:

  1. Connect to a server using the Fabric Console.

  2. Copy the Environments.k2fabEnv.XML file from the following Windows location - [Fabric Project's Directory]\[Project Name]\Implementation\SharedObjects\Environments - or manually edit the existing XML file.

  3. Deploy the environments file using the following command:

   Deploy environments from file ‘{filename}’

where {filename} includes the file's path and name on the server.

Fabric encrypts the passwords in the file (if they are not already encrypted) and saves the XML file with the encrypted passwords.

Note that deploying an XML file overrides all existing environments - except for _dev - which is the default environment. If the environment exists in Fabric, but not in the deployed XML file, it is removed from Fabric.

Offline Deployment using API calls

Request URL Format

POST https://<FABRIC-IP>:<FABRIC-PORT>/deployEnvironment?[token=<APIKEY>][user=<USER-NAME>&password=<PASSWORD>][&environment=<ENVIRONMENT-TO-SET>]

Parameters

Parameter

Description

Mandatory

environment

When sent, the target Fabric server sets this environment to be active, similar to running "SET_GLOBAL ENVIRONMENT" command.

N

Authentication & Authorization

  • Authentication is done by either user and password (user & password parameters) or by an API Key (token parameter), that shall be sent as parameters.
  • The request caller shall be authorized with the right permissions to perform the deploy (granted with "DEPLOY_ENVIRONMENTS" permission). See here for more information.

Request Body

Body parameters, along with the deployment files, to be sent with ContentType header = multipart/form-data.

Parameter

Description

Mandatory

file

Path to the Environments XML file

Y

Previous

Environment's Offline Deployment

An environment's offline deployment is used for deploying environments to a server not from Studio.

Offline Deployment using Scripts

Perform the following actions:

  1. Connect to a server using the Fabric Console.

  2. Copy the Environments.k2fabEnv.XML file from the following Windows location - [Fabric Project's Directory]\[Project Name]\Implementation\SharedObjects\Environments - or manually edit the existing XML file.

  3. Deploy the environments file using the following command:

   Deploy environments from file ‘{filename}’

where {filename} includes the file's path and name on the server.

Fabric encrypts the passwords in the file (if they are not already encrypted) and saves the XML file with the encrypted passwords.

Note that deploying an XML file overrides all existing environments - except for _dev - which is the default environment. If the environment exists in Fabric, but not in the deployed XML file, it is removed from Fabric.

Offline Deployment using API calls

Request URL Format

POST https://<FABRIC-IP>:<FABRIC-PORT>/deployEnvironment?[token=<APIKEY>][user=<USER-NAME>&password=<PASSWORD>][&environment=<ENVIRONMENT-TO-SET>]

Parameters

Parameter

Description

Mandatory

environment

When sent, the target Fabric server sets this environment to be active, similar to running "SET_GLOBAL ENVIRONMENT" command.

N

Authentication & Authorization

  • Authentication is done by either user and password (user & password parameters) or by an API Key (token parameter), that shall be sent as parameters.
  • The request caller shall be authorized with the right permissions to perform the deploy (granted with "DEPLOY_ENVIRONMENTS" permission). See here for more information.

Request Body

Body parameters, along with the deployment files, to be sent with ContentType header = multipart/form-data.

Parameter

Description

Mandatory

file

Path to the Environments XML file

Y

Previous