Version 28 (modified by piontek, 11 years ago) (diff) |
---|
The page describes the usage of the QCG-Broker Client, which is the command line text client for the QCG-Broker service.
System pre-requirements
- Installed qcg-broker-client package. The RPM installation procedure for SL5/6 is described here
User Requirements
- User's credential To secure the communication and authenticate the user to the service the X509 proxy certificate is needed.
Environment configuration
User’s credential
To configure the security settings please create or edit the ~/.globus/cog.properties file.
Client expects the access either to the pair of user certificate and private key files in "pem" format or to the proxy certificate file.
IMPORTANT: If the user has the certificate in p12 format, the certificate has to be first converted to the pem format files.
openssl pkcs12 -nocerts -in cert.p12 -out userkey.pem openssl pkcs12 -clcerts -nokeys -in cert.p12 -out usercert.pem
Add or edit the location of key/certificate files in the cog.properties file.
usercert=/home/piontek/.globus/usercert.pem userkey=/home/piontek/.globus/userkey.pem
As an alternative the path to the user proxy certificate file can be specified.
proxy=/tmp/x509up_u501
If certificate and key are specified and exist the user proxy certificate is automatically created by the client. Otherwise the proxy certificate has to be created somehow else (e.g. using the grid-proxy-init tool) and copied to the location pointed out by the proxy variable. In the second case checking of the key format must be disabled in the qcg configuration. Please see the QCG_ENV_SKIP_KEY_CHECK variable in the next section.
Configuration of the client
One can overwrite global client configuration crating or editing the ~/.qcg/qcg.conf file and setting the following variables:
- QCG_ENV_PROXY_DURATION - default lifetime (in hours) of the proxy certificate created by the client,
- QCG_ENV_PROXY_DURATION_MIN - minimal liefetime of the proxy certificate in hours. If the remaining lifetime is shorter then the given value the proxy is automatically recreated by the client
- QCG_ENV_CONNECT_TIMEOUT - maximal time (in seconds) that the client waits to connect to the interactive sesion,
- QCG_ENV_SKIP_KEY_CHECK - If the variable is not empty client do not check the correctness of the key format. Must be check if the client is configured to use the proxy and the key/certificate are not provided.
QCG Broker Client Modes
The QCG-client can operate in two modes:
- Simple mode - recommended for most of the users. The Simple mode offers the most frequently used functionality of the QCG in a very simple and intuitive way,
- Advance Mode which is recommended for advanced users for whom the functionality of the Simple mode is not sufficient.
QCG Simple Client
The QCG Simple client is recommended for all users who do not need advanced capabilities of the QCG middleware like workflows, parallel jobs with topologies or parameter sweep jobs. In return, it offers access to the most frequently used functionality in very simple and intuitive way. The QCG Simple client consists of a set of command line tools modelled after the set of tools known from popular queueing systems. All tasks submitted to be executed by QCG-Broker must be described in a formal way using the concept of directives known also from queueing systems.
qcg-* Tools
Set of tools allowing to submit/control tasks and to reserve/control resources managed by the QCG infrastructure.
qcg-cancel
Cancel task(s) usage: qcg-cancel [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... usage: qcg-client cancel_task [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... Options: -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-clean
Clean task(s). Remove working directory usage: qcg-clean [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... usage: qcg-client clean_task [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... Options: -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-connect
Connect to the task. Open interactive terminal in the working directory of the task usage: qcg-connect [-h] [-v] JOBID[/TASKID] usage: qcg-client connect_to_tasks [-h] [-v] JOBID[/TASKID] Options: -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-info
Display information about task(s) usage: qcg-info [-d] [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... usage: qcg-client task_info [-d] [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... Options: -d,--description display user's job description -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-list
Display information about tasks usage: qcg-list [-C <period>] [-h] [-n <NOTE>] [-N] [-p <PURGED>] [-R] [-S <period>] [-s <status(es)>] [-v] usage: qcg-client get_tasks [-C <period>] [-h] [-n <NOTE>] [-N] [-p <PURGED>] [-R] [-S <period>] [-s <status(es)>] [-v] Options: -C,--changed <period> changed in the period of time (not supported yet) -h,--help display help message -n,--note <NOTE> list elements with the given note -N,--no-list do not display list -p,--purged <PURGED> display whether the working directory is purged or not (PURGED=true|false). -R,--report display summary report. -S,--submitted <period> submited in the period of time. If the status is defined the default value of the period is 1 day. -s,--status <status(es)> status(es) of the job. Lack of this option is equivalent to requesting unterminated activities. -v,--version display version
qcg-peak
Peek the output file(s) usage: qcg-peek [-c <NUMBER>] [-f <FILE>] [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... usage: qcg-client peek_output [-c <NUMBER>] [-f <FILE>] [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... Options: -c,--characters <NUMBER> number of characters -f,--file <FILE> file to peek -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-proxy
Create user proxy usage: proxy_init [-h] [-v] Options: -h,--help display help message -v,--version display version
qcg-refetch
Refetch output files usage: qcg-refetch [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... usage: qcg-client stage_out [-h] [-v] JOBID[/TASKID] [JOBID[/TASKID]] ... Options: -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job TASKID optional identifier of the task The default identifier of task is 'task'
qcg-refresh_proxy
Refresh proxy for the given job(s) usage: qcg-client refresh_proxy [-h] [-v] JOBID [JOBID] ... Options: -h,--help display help message -v,--version display version Arguments: JOBID identifier of the job
qcg-sub
Submit job(s) to the QCG infrastructure usage: qcg-sub [-D <DIRECTIVE>] [-h] [-I] [-J | -S | -X] [-R <NUMBER>] [-v] FILE [FILE] ... usage: qcg-client submit_job [-D <DIRECTIVE>] [-h] [-I] [-J | -S | -X] [-R <NUMBER>] [-v] FILE [FILE] ... Options: -D,--directive <DIRECTIVE> adds #QCG directives to the description -h,--help display help message -I,--interactive Interactive mode -J,--jsdl JSDL dialect -R,--repeat <NUMBER> repeat submission (only for testing) -S,--simple QCG Simple dialect -v,--version display version -X,--xml QCG XML dialect
qcg-rcancel
Cancel reservation(s) usage: qcg-rcancel [-h] [-v] RESID [RESID] ... usage: qcg-client cancel_reservation [-h] [-v] RESID [RESID] ... Options: -h,--help display help message -v,--version display version Arguments: RESID identifier of the reservation
qcg-reserve
Create reservation(s) usage: qcg-reserve [-h] [-J | -S | -X] [-v] FILE [FILE] ... usage: qcg-client create_reservation [-h] [-J | -S | -X] [-v] FILE [FILE] ... Options: -h,--help display help message -J,--jsdl JSDL dialect -S,--simple QCG Simple dialect -v,--version display version -X,--xml QCG XML dialect Arguments: FILE Path to file with job description
qcg-rinfo
Display information about the given reservation(s) usage: qcg-rinfo [-d] [-D] [-h] [-v] RESID [RESID] ... usage: qcg-client reservation_info [-d] [-D] [-h] [-v] RESID [RESID] ... Options: -d,--description display user's job description -D,--qcg_description display QCG job description -h,--help display help message -v,--version display version Arguments: RESID identifier of the reservation
qcg-rlist
Display information about reservations usage: qcg-rlist [-C <period>] [-h] [-n <NOTE>] [-N] [-R] [-S <period>] [-s <status(es)>] [-v] usage: qcg-client get_reservations [-C <period>] [-h] [-n <NOTE>] [-N] [-R] [-S <period>] [-s <status(es)>] [-v] Options: -C,--changed <period> changed in the period of time (not supported yet) -h,--help display help message -n,--note list elements with the given note -N,--no-list do not display list -R,--report display summary report. -S,--submitted <period> submited in the period of time. If the status is defined the default value of the period is 1 day. -s,--status <status(es)> status(es) of the job. Lack of this option is equivalent to requesting unterminated activities. -v,--version display version