Fabric Basics - Getting Started

Start and Stop Fabric Commands

Run the following commands through the Fabric server command line:

Command Name

Command Description

k2fabric start

Start the Fabric node. Fabric displays notifications when local files are in conflict with the installed release (private files). Always start the seed nodes before other nodes in the Fabric cluster.

k2fabric stop

Stop the Fabric node.

k2fabric restart

Restart (stop and start) the Fabric node.

Get Fabric Version

Run the k2fabric -version script through the Fabric server command line to get the version of Fabric installed on your server. Note that you can check the Fabric version of your server in Fabric using the VERSION INFO Fabric command.

Login Fabric

Enter Fabric From the Fabric Server

Type fabric in the Fabric server command line.

Enter the Fabric Debug Server

Fabric Studio Debug Panel can be used to start, stop and open the Fabric Console of the Fabric debug server.

Reset Fabric

The Fabric reset.sh script cleans Fabric and deletes (drops) all data from Fabric and Cassandra. The reset.sh script is located under $K2_HOME/fabric/scripts and is used mainly:

  • In a Test environment to delete the current data and to restart the testing process from scratch.

  • In a Production environment. Note that the DROP LUTYPE command and the reset.sh script are rarely used in a Production environment. A possible scenario for using these processes is to clean an environment after a soft launch prior to starting an actual Production run.

Unlike the drop LU (DROP LUTYPE) command which drops a specific LU, the reset.sh script performs a full Fabric initialization, including deleting users, tokens, metadata, data and also deletes the data from Cassandra.

The Drop process must be followed by the re-creation of Fabric credentials and redeployment of the project implementation into the Fabric server and an initial load of LUI into the re-deployed LUs.

Note that the Windows version of the $K2_HOME/fabric/scripts Reset script is reset.bat.

Run the script from $K2_HOME/fabric/scripts directory:

  • ./reset.sh <mode><black_list><path of config.ini file>

Reset.sh Parameters

Parameter Name

Mandatory

Description

Mode

Yes

Reset mode. The following modes are supported:

  • drop, removes Fabric storage from the local Fabric node, Kafka topics, and all Cassandra Fabric-related keyspaces except for keyspaces set in the black-list parameter if set.
  • drop_all, removes Fabric storage on the local Fabric node, Kafka topics, and all Cassandra Fabric-related keyspaces except the keyspaces set in the black-list parameter and system keyspaces.
  • drop_local, removes Fabric storage on the local Fabric node only. For example, remove /dev/shm/ directory on the local node.

Black-list

No

List of Cassandra Fabric-related keyspaces or Kafka topic names that must be excluded from the drop.

The names have double quotes and are separated by a space.

Path

No

Config.ini file path.

 

Run Reset.sh On a Fabric Cluster

When a Fabric cluster clean-up is required, it is recommended to execute the reset.sh script in the following order:

  • Run on one node, ./reset.sh drop_all; - cleans Fabric storage on the local Fabric node and removes Cassandra keyspaces and Kafka topics. Removing Cassandra keyspaces and Kafka topics impacts the entire Fabric cluster.

  • Run on all other nodes, ./reset.sh drop_local; - cleans Fabric storage on the local Fabric node. To reset the Fabric cluster correctly, execute the reset.sh script on all fabric nodes, and only then start each Fabric node individually.

Reset Fabric - Remove Fabric Directories

The reset.sh script gets the list of the Fabric directories to be removed from the config.ini configuration file. The following parameters are checked to get the list of removed Fabric directories:

Parameter Name

Parameter Description

Default Value

MDB_COMMONS_PATH

Common (reference) tables storage directory.

${FABRIC_HOME}/storage/common

STORAGE_DIR

Fabric storage directory.

${FABRIC_HOME}/storage

MDB_DEFAULT_CACHE_PATH

Directory holding cached database files of LU Instances.

/dev/shm/fdb_cache

WEBSERVER_DIR

Home directory of the Fabric Web Admin. Can also contain manipulations (rewrites) on the URL when invoking Fabric Web Services.

${FABRIC_HOME}/webserver

Previous

Fabric Basics - Getting Started

Start and Stop Fabric Commands

Run the following commands through the Fabric server command line:

Command Name

Command Description

k2fabric start

Start the Fabric node. Fabric displays notifications when local files are in conflict with the installed release (private files). Always start the seed nodes before other nodes in the Fabric cluster.

k2fabric stop

Stop the Fabric node.

k2fabric restart

Restart (stop and start) the Fabric node.

Get Fabric Version

Run the k2fabric -version script through the Fabric server command line to get the version of Fabric installed on your server. Note that you can check the Fabric version of your server in Fabric using the VERSION INFO Fabric command.

Login Fabric

Enter Fabric From the Fabric Server

Type fabric in the Fabric server command line.

Enter the Fabric Debug Server

Fabric Studio Debug Panel can be used to start, stop and open the Fabric Console of the Fabric debug server.

Reset Fabric

The Fabric reset.sh script cleans Fabric and deletes (drops) all data from Fabric and Cassandra. The reset.sh script is located under $K2_HOME/fabric/scripts and is used mainly:

  • In a Test environment to delete the current data and to restart the testing process from scratch.

  • In a Production environment. Note that the DROP LUTYPE command and the reset.sh script are rarely used in a Production environment. A possible scenario for using these processes is to clean an environment after a soft launch prior to starting an actual Production run.

Unlike the drop LU (DROP LUTYPE) command which drops a specific LU, the reset.sh script performs a full Fabric initialization, including deleting users, tokens, metadata, data and also deletes the data from Cassandra.

The Drop process must be followed by the re-creation of Fabric credentials and redeployment of the project implementation into the Fabric server and an initial load of LUI into the re-deployed LUs.

Note that the Windows version of the $K2_HOME/fabric/scripts Reset script is reset.bat.

Run the script from $K2_HOME/fabric/scripts directory:

  • ./reset.sh <mode><black_list><path of config.ini file>

Reset.sh Parameters

Parameter Name

Mandatory

Description

Mode

Yes

Reset mode. The following modes are supported:

  • drop, removes Fabric storage from the local Fabric node, Kafka topics, and all Cassandra Fabric-related keyspaces except for keyspaces set in the black-list parameter if set.
  • drop_all, removes Fabric storage on the local Fabric node, Kafka topics, and all Cassandra Fabric-related keyspaces except the keyspaces set in the black-list parameter and system keyspaces.
  • drop_local, removes Fabric storage on the local Fabric node only. For example, remove /dev/shm/ directory on the local node.

Black-list

No

List of Cassandra Fabric-related keyspaces or Kafka topic names that must be excluded from the drop.

The names have double quotes and are separated by a space.

Path

No

Config.ini file path.

 

Run Reset.sh On a Fabric Cluster

When a Fabric cluster clean-up is required, it is recommended to execute the reset.sh script in the following order:

  • Run on one node, ./reset.sh drop_all; - cleans Fabric storage on the local Fabric node and removes Cassandra keyspaces and Kafka topics. Removing Cassandra keyspaces and Kafka topics impacts the entire Fabric cluster.

  • Run on all other nodes, ./reset.sh drop_local; - cleans Fabric storage on the local Fabric node. To reset the Fabric cluster correctly, execute the reset.sh script on all fabric nodes, and only then start each Fabric node individually.

Reset Fabric - Remove Fabric Directories

The reset.sh script gets the list of the Fabric directories to be removed from the config.ini configuration file. The following parameters are checked to get the list of removed Fabric directories:

Parameter Name

Parameter Description

Default Value

MDB_COMMONS_PATH

Common (reference) tables storage directory.

${FABRIC_HOME}/storage/common

STORAGE_DIR

Fabric storage directory.

${FABRIC_HOME}/storage

MDB_DEFAULT_CACHE_PATH

Directory holding cached database files of LU Instances.

/dev/shm/fdb_cache

WEBSERVER_DIR

Home directory of the Fabric Web Admin. Can also contain manipulations (rewrites) on the URL when invoking Fabric Web Services.

${FABRIC_HOME}/webserver

Previous