-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
282 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
--- | ||
title: Writing sample for a product without a graphical interface (CLI) | ||
linktitle: CLI documentation | ||
type: docs | ||
weight: 500 | ||
--- | ||
|
||
|
||
## The Command Line Interface (CLI) | ||
|
||
The Anonymizer Command Line Interface executes predefined anonymization processes from the command line. Use the CLI to: | ||
|
||
- list the rules, engines or anonymization projects defined on your Anonymizer Server, | ||
- executes anonymization projects on either a Design Server or a Production Server, | ||
- display the status of project executions. | ||
|
||
>Important! | ||
The CLI launches processes from the Anonymizer Server using the login of a defined user. That user must have all the rights required to run the processes called by the CLI. | ||
|
||
The DOT Anonymizer CLI is distributed as a zip file. Extract the content into the folder of your choice. Go to the */bin* folder to launch the CLI. | ||
|
||
>Note | ||
The CLI needs to have access to a Java 8 Runtime Environment that needs to be installed and accessible from anywhere in a command line terminal (run *\<code\>java -version \</code\>* to find the current accessible Java version). | ||
To call any action using the CLI, the following syntax is used: `anonymizer` *\<subcommand\> \<parameters\>*. | ||
|
||
Support of the commands from the previous versions of Anonymizer CLI is maintained. Refer to the command **alias** to know the previous name of a command. | ||
|
||
### Common parameters | ||
|
||
The following parameters are common to all CLI commands. | ||
|
||
`-H`, `--help` | ||
Display the help message for the command. | ||
|
||
`-S`, `--server` | ||
*\[Required\]* The URL of the Anonymizer Server to which to connect. | ||
|
||
`-U`, `--user` | ||
*\[Required\]* The user used to connect to the Anonymizer Server. | ||
|
||
`-P`, `--password` | ||
*\[Required\]* The password used to connect to the Anonymizer Server. | ||
|
||
`-C`, `--crypted` | ||
Required if the password is Base64 encrypted. | ||
|
||
`-L`, `--log-file` | ||
The path to the file where the logs will be written. | ||
|
||
`-V`, `--verbose` | ||
Enable debug and trace log levels. | ||
|
||
### project | ||
|
||
Alias: `anyListProject` | ||
|
||
This command sends a request to list all the existing anonymization projects or get information about a specific project on an Anonymizer Server. | ||
|
||
Usage: `anonymizer project [-CHV] -P[=<password>] [-P[=<password>]]... [-L=<logFile>] [-n=<name>] -S=<serverURL> -U=<user>`. | ||
|
||
`-n`, `--name` | ||
The name of the project. | ||
|
||
### rule | ||
|
||
Alias: `anyRuleList` | ||
|
||
This command sends a request to list all the existing project rules or get information about a specific rule on an Anonymizer Server. | ||
|
||
Usage: `anonymizer rule [-CHV] -P[=<password>] [-P[=<password>]]...[-L=<logFile>] [-n=<name>] -S=<serverURL> -U=<user>` | ||
|
||
`-n`, `--name` | ||
The name of the rule. | ||
|
||
### engine | ||
|
||
Alias: `anyEngineList` | ||
|
||
This command sends a request to list all the existing project engines or get information about a specific engine on an Anonymizer Server. | ||
|
||
Usage: `anonymizer engine [-CHV] -P[=<password>] [-P[=<password>]]...[-L=<logFile>] [-n=<name>] -S=<serverURL> -U=<user>` | ||
|
||
`-n`, `--name` | ||
The name of the engine. | ||
|
||
### status | ||
|
||
This command sends a request to list the statuses of all the existing project executions or get details of about the status of a specific project. | ||
|
||
Usage: `anonymizer status [-CHV] -P[=<password>] [-P[=<password>]]...[-L=<logFile>] [-n=<name>] -S=<serverURL> -U=<user>` | ||
|
||
`-n`, `--name` | ||
The execution session name to get the status. | ||
|
||
### executeProject | ||
|
||
Alias: `anyAnonymizeProject` | ||
|
||
This command sends a request to execute a predefined anonymization project. | ||
|
||
Usage: `anonymizer executeProject [-CHV] [-e[=<execute>]] [-w[=<wait>]] -P[=<password>] [-P[=<password>]]...[-L=<logFile>] [--parameters=<parameters>][-pc=<projectCode>] -S=<serverURL> [-sn=<sessionName>] -U=<user> [-sp=<sessionProperties>[,<sessionProperties>...]]...` | ||
|
||
`-pc`, `--projectCode` | ||
The code of the project to execute. | ||
|
||
Alias: `-any.projectcode` | ||
|
||
`-sn`, `--sessionName` | ||
The name/ID of the execution instance to run. | ||
|
||
Alias: `-any.execname` | ||
|
||
`-sp`, `--sessionProperties` | ||
This parameter is used to declare the parameters of the execution session. | ||
|
||
`-w`, `--wait` | ||
When this option is defined, the command waits for the end of the anonymization project and for the project to return to a simple status (for example: `Anonymization Project Status : OK` or `Anonymization Project Status : ERROR`). | ||
|
||
By default, this option is activated and set to true. | ||
|
||
Alias: `-any.wait` | ||
|
||
`-e`, `--execute` | ||
Create and run an execution instance. By default, this option is activated and set to true. | ||
|
||
`--parameters` | ||
The project's execution parameters. Add the project parameter values in JSON format. | ||
`{"$param_schema":"schema",` | ||
`"$server":"server"}` | ||
|
||
In parameters, avoid characters that can be interpreted as a JSON separator; for example for *server:port* in connection URL, use two parameters. | ||
|
||
Alias: `-any.parameters` | ||
|
||
### executeProductionProject | ||
|
||
Alias: `anyProdAnonymizeProject` | ||
|
||
This command sends a request to execute a predefined anonymization project, from the production server. Additional parameters also allow the modification of data sources. | ||
|
||
Usage: `anonymizer executeProductionProject [-CHV] [-e[=<execute>]] [-w[=<wait>]] -P[=<password>] [-P[=<password>]]... [-dsp=<datasourcePass>][-dsu=<datasourceUser>] [-dsurl=<datasourceUrl>] [-L=<logFile>][--parameters=<parameters>] -pc=<projectCode> -pv=<projectVersion>-S=<serverURL> [-sn=<sessionName>] -U=<user> [-sp=<sessionProperties>[,<sessionProperties>...]]...` | ||
|
||
`-dsp`, `--datasourcePassword` | ||
Makes it possible to override the data source password. | ||
|
||
Alias: -any.datasource.pass | ||
|
||
`-dsu`, `--datasourceUser` | ||
Makes it possible to override the data source user. | ||
|
||
Alias: `-any.datasource.user` | ||
|
||
`-dsurl`, `--datasourceUrl` | ||
Makes it possible to override the data source URL. | ||
|
||
Alias: `-any.datasource.url` | ||
|
||
`-pc`, `--projectCode` | ||
The code of the project. | ||
|
||
Alias: `-any.projectcode` | ||
|
||
`-pv`, `--version` | ||
The version of the project to execute. | ||
|
||
Alias: `-any.projectversion` | ||
|
||
`-sn`, `--sessionName` | ||
The name of the execution. | ||
|
||
Alias: `-any.execname` | ||
|
||
`-sp`, `--sessionProperties` | ||
Makes it possible to declare the parameters of the execution session. | ||
|
||
`-umv`, `--useMainVersion` | ||
This parameter is used to execute the main version of the project package, if it is defined. | ||
|
||
`-w`, `--wait` | ||
Makes it possible to wait for the end of the anonymization process. By default, this option is activated and set to true. | ||
|
||
`-e`, `--execute` | ||
Create and execute an execution session. By default, this option is activated and set to true. | ||
|
||
`--parameters` | ||
The project's execution parameters. Add the project parameter values in JSON format. | ||
`{"$param_schema":"schema",` | ||
`"$server":"server"}` | ||
|
||
In parameters, avoid characters that can be interpreted as a JSON separator; for example for *server:port* in connection URL, use two parameters. | ||
|
||
Alias: `-any.parameters` | ||
|
||
### productionProjectPackage | ||
|
||
This command sends a request to list all the Project Packages on a Production Server. | ||
|
||
Usage: `anonymizer productionProjectPackage [-CHV] -P[=<password>] [-P[=<password>]]... [-L=<logFile>] -S=<serverURL> -U=<user>` | ||
|
||
### productionStatus | ||
|
||
This command sends a request to list the statuses of all the existing project executions or get details of about the status of a specific project on a Production Server. | ||
|
||
Usage: `anonymizer productionStatus [-CHV] -P[=<password>] [-P[=<password>]]...[-L=<logFile>] [-n=<name>] -S=<serverURL>-U=<user>` | ||
|
||
`-n`, `--name` | ||
The name of the execution session to get the status. | ||
|
||
|
||
|
||
## live documentation | ||
|
||
Click the link to see the [live documentation](https://help-dot-anonymizer.arcadsoftware.com/en-us/Topics/Tools/Anonymizer-CLI.htm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Writing sample for a troubleshooting article | ||
linktitle: Troubleshooting | ||
type: docs | ||
weight: 400 | ||
--- | ||
|
||
|
||
## An error is thrown when launching a command through the CLI to anonymize a project \[Linux\] | ||
|
||
When executing a command to anonymize a project on a Linux operating system (Ubuntu or CentOS) via the command line interface (CLI), the following error may occur: | ||
|
||
*Error: Could not find main class cache2k-core-1.6.0.Final.jar* | ||
|
||
This error occurs even if the necessary library exists in the /libs folder. | ||
|
||
To resolve this issue, certain Linux distributions such as CentOS, Ubuntu, and Debian, require the classpath to be enclosed in double quotes. Here is the corrected command format for CentOS: | ||
|
||
``` | ||
// CentOS Command | ||
java -cp "../libs/*" com.redacted.tools.anonymizer.cli.CLI List | ||
``` |