Run the following commands through the Fabric server command line:
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.
Type fabric in the Fabric server command line.
Fabric Studio Debug Panel can be used to start, stop and open the Fabric Console of the Fabric debug server.
The Fabric reset.sh script cleans Fabric and deletes (drops) all data from Fabric and the Storage DB. 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 the Storage DB.
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:
Parameter Name |
Mandatory |
Description |
Mode |
Yes |
Reset mode. The following modes are supported:
|
Black-list |
No |
List of Storage DB schemas 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. |
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 the storage schemas and Kafka topics. Removing the storage schemas 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.
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:
The Fabric watchdog.sh script is used to keep a specific command alive. The script is located under $K2_HOME/fabric/scripts.
Script flow:
1. Execute the command that is input to the function. Watchdog will run on Fabric by default if a specific command is not provided.
2. Restart the command upon failure automatically according to the number of retries, during the grace period. The number of retries and the grace period are configurable.
Note: watchdog script can monitor only commands that are not running in the background.
Script syntax:
./watchdog.sh
WATCHDOG_MAX_RETRIES [optional (default=3)]: The watchdog will try to execute the provided command upon failure, up to this number of attempts. This parameter is configured using the -r option or as an environment variable.
WATCHDOG_VERIFICATION_GRACE_SEC [optional (default=60)]: A verification grace period (in seconds) during which the service tries to execute the provided command. It tries to do this WATCHDOG_MAX_TRIES attempts . If, by the time the grace period expires, the executed command has failed, the counter is reset. This parameter is configured using the -g option or as an environment variable.
Example
./watchdog.sh 'cassandra.sh -f' -r=4 -g=80
run a watchdog on Cassandra. During a grace period of 80 seconds, try to run cassandra.sh 4 times.
The Fabric watchdog-kill.sh script is used kill (stop) a watchdog process and its child processes. The script is located under $K2_HOME/fabric/scripts.
Script flow:
1. Kill the watchdog and child process.
Script syntax:
./watchdog-kill.sh [pid]
[pid] - the ID of the watchdog (and its child processes) that should be killed
Example
./watchdog-kill.sh 1234
Kill the process ID 1234, which can be either the watchdog process ID or the child process ID. Both processes will be killed.
Run the following commands through the Fabric server command line:
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.
Type fabric in the Fabric server command line.
Fabric Studio Debug Panel can be used to start, stop and open the Fabric Console of the Fabric debug server.
The Fabric reset.sh script cleans Fabric and deletes (drops) all data from Fabric and the Storage DB. 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 the Storage DB.
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:
Parameter Name |
Mandatory |
Description |
Mode |
Yes |
Reset mode. The following modes are supported:
|
Black-list |
No |
List of Storage DB schemas 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. |
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 the storage schemas and Kafka topics. Removing the storage schemas 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.
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:
The Fabric watchdog.sh script is used to keep a specific command alive. The script is located under $K2_HOME/fabric/scripts.
Script flow:
1. Execute the command that is input to the function. Watchdog will run on Fabric by default if a specific command is not provided.
2. Restart the command upon failure automatically according to the number of retries, during the grace period. The number of retries and the grace period are configurable.
Note: watchdog script can monitor only commands that are not running in the background.
Script syntax:
./watchdog.sh
WATCHDOG_MAX_RETRIES [optional (default=3)]: The watchdog will try to execute the provided command upon failure, up to this number of attempts. This parameter is configured using the -r option or as an environment variable.
WATCHDOG_VERIFICATION_GRACE_SEC [optional (default=60)]: A verification grace period (in seconds) during which the service tries to execute the provided command. It tries to do this WATCHDOG_MAX_TRIES attempts . If, by the time the grace period expires, the executed command has failed, the counter is reset. This parameter is configured using the -g option or as an environment variable.
Example
./watchdog.sh 'cassandra.sh -f' -r=4 -g=80
run a watchdog on Cassandra. During a grace period of 80 seconds, try to run cassandra.sh 4 times.
The Fabric watchdog-kill.sh script is used kill (stop) a watchdog process and its child processes. The script is located under $K2_HOME/fabric/scripts.
Script flow:
1. Kill the watchdog and child process.
Script syntax:
./watchdog-kill.sh [pid]
[pid] - the ID of the watchdog (and its child processes) that should be killed
Example
./watchdog-kill.sh 1234
Kill the process ID 1234, which can be either the watchdog process ID or the child process ID. Both processes will be killed.