The commandline client is a commandline tool for using the reference clients.
It currently supports the operations GetFile, GetFileIDs, GetChecksums, PutFile, and DeleteFile.
Installation
Download the chosen version of the bitrepository-command-line-XXX-distributed.zip from here (XXX refers to the version):
Unzip the file in any wanted location.
It requires a 'conf' sub-directory to the installation which contain all the settings, etc. for the setup of the collection. This can be done in either of the two ways:
- Create the 'conf' directory and copy all the settings file into it.
- Make a symbolic link to the 'conf' directory for the webclient or the services in the collection (e.g. 'ln -s /my/bitrepository/services/conf).
Execute
Scripts have been made for easily running the commandline commands.
The following parameters for the commandline client is set by these scripts:
- -s The path to the directory with the settings files for the client
-k The path to the file containing the private key
If the commandline client is wanted to be used without the scripts, then these arguments are mandatory.
Execute the different commands in the following way:
GetFile
Perform the GetFile by running the 'GetFile.sh' script. It takes the following arguments:
[MANDATORY] -f The id for the file to retrieve.
[OPTIONAL] -p The id of the pillar where the file should be retrieved from. If no argument, then the file will be retrieved from the fastest pillars.
[OPTIONAL] -l The location where the file should be placed (either total path or directory). If no argument, then in the directory where the script is located.
GetFileIDs
Perform the GetFileIDs by running the 'GetFileIDs.sh' script. It takes the following arguments:
[OPTIONAL] -f The id of the file to retrieve. If no such argument, then the id of all files are retrieved.
- [OPTIONAL] -p The id of the pillar where the id should be retrieved.
GetChecksum
Perform the GetChecksum by running the 'GetChecksum.sh' script. It takes the following arguments:
[OPTIONAL] -f The id of the file to retrieve. If no such argument, then the checksums of all files are retrieved.
- [OPTIONAL] -p The id of the pillar where the F
[OPTIONAL] -S The salt of checksum to request in the response. Requires the ChecksumType argument.
[OPTIONAL] -R The algorithm of checksum to request in the response from the pillars.
PutFile
Perform the PutFile by running the 'PutFile.sh' script. It takes the following arguments:
[MANDATORY] -f The path to the file, which is wanted to be put
[OPTIONAL] -S The salt of checksum to request in the response. Requires the ChecksumType argument.
[OPTIONAL] -R The algorithm of checksum to request in the response from the pillars.
[OPTIONAL] -i A id for the file (default is the name of the file).
DeleteFile
Perform the DeleteFile by running the 'DeleteFile.sh' script. It takes the following arguments:
[MANDATORY] -f The path to the file, which is wanted to be deleted (the actual file is required for calculating the checksums etc. for performing the delete operation)
[OPTIONAL] -c The checksum of the file to be delete (in the collection default checksum specficiation).
[OPTIONAL] -S The salt of checksum to request in the response. Requires the ChecksumType argument.
[OPTIONAL] -R The algorithm of checksum to request in the response from the pillars.
[OPTIONAL] -p The id of the pillar where the file should be delete. If no argument, then the file will be deleted at all pillars.