Home
UNICORE Commandline Client: User Manual
Contents
1. Exports this exports a file from a UNICORE storage From u6 DEMO SITE Work somefile To home me somefile br The remote location can be given as a full UNICORE 6 URI or using the more user friendly but slower u6 notation Read more on remote locations in Section 8 Local files can be given as an absolute or relative path in the latter case the configured output directory will be used as base directory UNICORE Commandline Client User Manual 19 The protocol to be used for imports and exports can be chosen using the Preferred Protocols entry containing a space separated list of protocols Preferred protocols BFT RBYTEIO If not specified BFT will be used 7 5 4 Specifying credentials for data staging Some data staging protocols supported by UNICORE require credentials such as username and password Currently these are ftp and scp In case you want to give username and password the syntax is as follows mapomrese From ftp someserver 25 some file To input_data Credentials Username myname Password mypassword Why and similarly for exports 7 5 5 Redirecting standard input If you want to have your application or executable read its standard input from a file you can use the following Stdin filename then the standard input will come from the file named filename in the job working directory 7 6 Resources A job definitio
2. option short and long form description 0 output lt Output_dir gt Directory for any output produced default is the current directory r registry lt List_of_Registry_URLs gt The comma separated list of URLs of UNICORE registries v verbose Verbose mode h help Print help message y with timing Timing mode 4 1 Security and VO related options In general you need a keystore containing your identity in order to use UNICORE as well as a truststore file or directory containing trusted certificates To use UCC with infrastructures that run a SAML enabled VO server such as UVOS there are additional options for specifying the VO server your VO etc Please see section for details about the VO support Here is a list of security related options Table 2 Security and VO options for the UCC option short and long form description U user User ID to use remotely if you have multiple Z preference Select from your remote attributes e g xlogin J VO VO server URL G voGroup VO group A attributeAssertion File containing a VO attribute assertion I includeAttributes Filter VO attributes Q excludeAttributes Filter VO attributes UNICORE Commandline Client User Manual 7 4 2 Configuration file Note Since UCC 6 6 0 the use of a configuration file is mandatory since the possibility to specify options related to keystore and trust
3. UCC supports this of course The basic idea is that when submitting a job in asynchronous mode a job descriptor file is written that contains the job s address and any information about export files 6 3 1 Asynchronous submission Use the a flag when submitting a job Wee abia e lt 3olo rie This will submit the job stage in any local files start the job and exit A job descriptor file ending in job will be written to your configured output directory 6 3 2 Get the status of a particular job The command ucc get status lt job_desc gt will retrieve the job status If not given on the command line the job id will be read from the console UNICORE Commandline Client User Manual 13 6 3 3 Download results To get stdout stderr and other files you have marked for export in your job description do ucc get output o lt outdir gt lt job_desc gt Here the option o specifies the directory where to put the output by default the current directory is used As before the job address can also be read from the console 6 3 4 Referencing a job by its EPR Endpoint reference In case you want to check on a job not submitted through UCC or in case you do not have the job descriptor file any more you can also refer to a job given its EPR For example the list jobs command will produce a list of all job EPRs that you can access Note that in this case UCC will only retrieve stdout and stderr files To
4. name c9m say in a script activity lt jsdl DataStaging gt lt 3jsdl CreationFlag gt overwrite lt 3jsdl CreationFlag gt lt 3jsdl FileName gt input sh lt 3jsdl FileName gt lt jsdl Source gt lt 3jsdl URI gt c9m WORKFLOW_1D input sh lt 3sdl URI gt lt 3sdl Source gt lt 3jsdl DataStaging gt The workflow system will resolve the name at runtime and your file will be used This allows you to group your files by workflow ID 10 4 2 Downloading output files You can use the usual get file command to download files using the global IDs used by the workflow engine Hint the workf 1ow in fo command will list the files that are produced by the workflow 10 5 More 10 5 1 Tracing The trace functionality of the workflow engine allows to retrieve some performance data try ucc workflow trace lt your_workflow_address gt UNICORE Commandline Client User Manual 31 11 Batch processing The batch command allows you to run many jobs without having to start UCC each time You can control how many jobs should go to which site This allows efficient job processing while putting some load on the client machine If you need to take the client offline you should consider using the workflow system instead which also allows efficient high throughput processing Assume you have a bunch of jobs in UCC s job description format Section 7 stored in a directory jobs The output should go to a directory out You can run
5. o option if not given the current directory is used Also file names will be put into a subdirectory named as the job id to prevent accidental overwriting of existing files This behaviour can be changed using the b option When b is given on the command line no subdirectory will be created 6 1 2 Specifying the site In the example above a random site will be chosen to execute the job To control it you can use the s option This will accept the name of a target system The target systems available to you can be listed by ucc list sites 6 2 Options overview The following options are available when running jobs see also the general options overview in Section 4 UNICORE Commandline Client User Manual 12 Table 5 General options for UCC Option Short and long form Description s sitename SITE Site where the job shall be o output lt Output_dir gt run Directory for any output b brief Do not create a produced default is the sub directory for output current directory files O stdout specify a name for the E stderr exported standard out by default stdout specify a name for the a asynchronous Run asynchronously exported standard error by default stderr 6 3 Processing jobs asynchronously In case of long running jobs you will want to run the job asynchronously i e just submit the job stage in any files and start it in order to get the results later
6. use at your own risk Groovy example delete all your jobs x x remove all jobs import UNICORE X client classes import de fzj unicore uas client x iterate over TSSs and remove all jobs def lister new de fzj unicore ucc helpers TargetSystemLister registry securityProperties messageWriter lister each it jobs each messageWriter message Job at it address stringValue new JobClient it address stringValue it securityProperties destroy Groovy example list available storages x x list available storages UNICORE Commandline Client User Manual 39 import de fzj unicore uas client x import javax xml namespace QName porttype of storage service def SMSPORT new QName http unigrids org 2006 04 services sms StorageManagement method to extract storage name from a storage client def findName epr sms new StorageClient epr address stringValue epr securityProperties return sms resourcePropertiesDocument storageProperties fileSystem name list storages from registry registry listAccessibleServices SMSPORT each name findName it messageWriter message Storage lt name gt at it address stringValue list storages attached to target systems def lister new de fzJ unicore ucc helpers TargetSystemlLister registry securityProperties messageWriter lister each it storages each name findName it me
7. If you do not specifiy anything UCC will select a site that will match your requirements at least those that UCC checks for 7 2 Specifying the application or executable You can specify a UNICORE application by name and version or using a machine dependent path to an executable file using application name and version ApplicationName Date ApplicationVersion 1 0 Note the comma separation and the curly braces To call an executable using an executable Executable bin date UNICORE Commandline Client User Manual 16 7 3 Arguments and Environment settings Arguments and environment settings are specified using a list of String values Here is an example MxcCutzalolkeiaW jomemy sks ecne VS 1 29 Environment PATH bin FOO bar 7 4 Application parameters In UNICORE parameters for applications are often transferred in the form of environment variables For example the POVRay application has a large set of parameters to specify image width height and many more In UCC you can specify these parameters in a very simple way using the Parameters keyword ApplicationName POVRay Parameters WIDTH OT HEIGHT 480 DEBUG We Note that an empty parameter which does not have a value needs to be written with an explicit empty string due to the limitations of the JSON syntax 7 5 Job data management In general your job will require data files e
8. a fragment it is accessed directly UNICORE Commandline Client User Manual Table 3 continued option description http connection timeout Timeout to use when establishing a HTTP connection http sockettimeout Timeout to use when reading writing from to HTTP connection For example to set the timeout when establishing a connection to 5 seconds you would use http connection timeout 5000 4 4 Other options The following table lists other options that are more rarely used Table 4 Other options for the UCC option description contact registry Do not attempt to contact the registry even if one is configured 5 SAML PUSH support 5 1 Introduction UCC supports the SAML PUSH mode of authentication In this mode the user is authen ticated by an attribute assertion signed by a trusted third party The third party is a Virtual Organisation VO SAML 2 0 server such as UVOS or VOMS 5 2 Basic usage First retrieve an attribute assertion from VO server scoped for a particular group you are in and save it into a file ucc save attributes J https uvos example com 2443 G vo group O assertion xml UNICORE Commandline Client User Manual 9 If the VO server has been registered in the registry you may use auto instead of server s URL this is possible only in case of UVOS ucc save attributes J auto C vo group 0 assertion xml The
9. is used only for submitting managing data and getting results 10 2 Command overview The following commands are provided More details and examples follow below e workflow submit submit a workflow file e workflow info list information about workflows e workflow trace gather performance data from the workflow execution UNICORE Commandline Client User Manual 29 10 3 Basic use To check the availability of workflow services issue the following command ucc system info 1 This should show at least an accessible workflow engine and service orchestrator The distribution contains some example workflow files in the lt gt directory that you can edit and submit ucc workflow submit yourworkflow swf which will submit the workflow and print the address of the workflow to standard output To get the workflow status ucc workflow info lt workflow_address gt To list all your workflows you can use the lt gt command without an explicit workflow address ucc workflow info 1 10 4 Managing workflow data During workflow execution data files will be produced that the workflow system will move to a location on the Grid that is accessible for the individual jobs Usually this location is created automatically by UCC before the workflow is submitted using a special UNICORE service called a storage factory If you want to influence this decision UCC allows to select the storage factory to be used via the f op
10. them all through UCC using a single invocation as follows tec bach i obs So Ole mow As job files UCC will accept files ending in u jsdl or xml 11 1 Options You can run in follow mode where UCC will watch the input directory and will process new files as they arrive mes bearen ee a cm O OW on UCC can also process JSDL files to batch process these use the j option LEAN CAS SO MOE 11 2 Performance tuning options Getting the most performance out of UCC and your Grid installation can be a challenging task Sending too many jobs to a site might decrease throughput sometimes the client machine can be the limiting factor etc You should experiment a bit to get the best performance for your specific setup UCC has many options available for tuning Here is an overview Table 6 Tuning options for the UCC batch mode option short and long form description K keep Do not delete finished jobs on the server By default finished jobs are destroyed m max lt MaxRunningJobs gt Limit on jobs submitted by UCC at one time default 100 t threads lt NumThreads gt Number of threads to be used for processing default 4 UNICORE Commandline Client User Manual 32 Table 6 continued option short and long form description u update lt Updatelnterval gt Minimum time in milliseconds between status requests on a single job Default 1000 R noRe
11. 00 0Z200 7 Job description format UCC uses a simple format that allows you to specify the application or executable you want to run arguments and environment settings any files to stage in from remote servers or the local machine and any result files to stage out A number of sample files can be found in the samples directory of your UCC distribution on Linux check also usr share unicore ucc samples The format used is called JSON and contains comma separated key value mappings where the values can be simple strings or lists of values or maps String values should be placed in quotes Comments are inofficially possible using the hash character as in Unix shell scrips Each JSON file must begin and end with curly braces Several complete job samples can be found in the samples directory of the distribution UNICORE Commandline Client User Manual 15 Note Note quotes are needed around the keys and values in case special characters like or appear if in doubt use quotes To view an example job showing all available options simply run WEG bio el most of the options shown are not mandatory of course Note You may alternatively specify jobs in the JSDL format that is used internally in UNICORE 6 To do this run UCC with the j option 7 1 Site name You can optionally specify on which site if available the job should be run Sie CUD EMOT O TENEN
12. Communications Op OnS nf rape bah se eee Se ee A 7 44 QOtheropuons e ei ie Ce hw SGA bab a E be ee ated we be 8 5 SAML PUSH support 8 Sl Untroduction lt 64 ae eed Bebe a Baas Bw a ha ee a 8 JA BASIGUSADE lt 6 shi i Ss oh awk ae Ree BRS er Ge Aw Goes 8 5 3 Attribute liens oa pp eddir Sa RG SS we ee Sa ee Ee 9 5 4 Rules for multiple filters o turers 10 UNICORE Commandline Client User Manual 6 10 Running jobs 6 1 Introduction 6 2 Options overview 6 3 Processing jobs asynchronously s 246665 sigh e ee ees eae ee a8 Job description format TA SUCMAME oree AA Ro a a eh BOR Bae Gre 7 2 Specifying the application or executable o 7 3 Arguments and Environment settings p cs pe e ecri ee s A a kaop a E TA Application parameters s p oe iois A ee ARE e Se 7 3 Jobdatamanagement oo 456 6b a ee a a oe eA wea a AiG TRESQUICES a cg go A Ew RS we ge HA eee Hao Y TI EXECULLON environments s cc A A RA RR Be ia 1 8 M scellaneo0s OPplOdS lt eo s 2 224 khb ge oda bee ees Data management functions 8 1 Specifying remote locations 8 2 Data movement 8 3 Handling directories 8 4 Findingdata Metadata management functions Ou BARICS e e Ge ce aa 9 2 Available commands Workflow extensions 10 1 Introduction 10 2 Command overview 10 3 Basie use ca pagos mes 10 4 Managing workflow data 1035 MOTE 4
13. NICORE native and OGSA BES interfaces Batch mode job submission and processing with many performance tuning options Data movement upload download server to server copy etc using the UNICORE storage management functions and available data transfer protocols Storage functions Is mkdir including creation of storage instances via storage factories Full UNICORE workflow system support including the possibility to run single jobs through the resource brokering system Support for the UNICORE metadata system Information about the Grid is provided via the system info and query cip commands Various utilities like a shell mode the ability to generate SAML trust delegations low level WSRE operations and others Extensibility through custom commands and the possibility to run scripts written in the Groovy programming language Built in help For more information about UNICORE visit http www unicore eu 2 Installation and configuration 2 1 Prerequisites To run UCC you need the Sun Oracle or OpenJDK Java 6 JRE or SDK or later If not installed on your system you can download it from this download page 2 2 Download You can get the latest version from the SourceForge UNICORE download page UNICORE Commandline Client User Manual 2 2 3 Upgrading from previous versions If you are upgrading from a previous 6 5 x version of UCC you will have to update your preferences file and update the settings related t
14. UNICORE Commandline Client User Manual UNICRE BE RA E EUROPEAN MIDDLEWARE INITIATIVE UNICORE COMMANDLINE CLIENT USER MANUAL UNICORE Team Document Version 1 0 0 Component Version 6 6 0 Date 30 04 2013 This work is co funded by the EC EMI project under the FP7 Collaborative Projects Grant Agreement Nr INFSO RI 261611 UNICORE Commandline Client User Manual Contents 1 Overview 1 2 Installation and configuration 1 2A RTETEQUISITES ahs gs ee Ge hh a AG A le Re ee ee 1 2 2 Download se sor io e reos beet be be tb baw ae boa be bile a 1 2 3 Upgrading from previous versions lt senes samota ia ea EE 2 2 4 Installation and configuration ooa 02 000 0 004 2 25 Wreterencesle esep e min as ee a ws Ge Soe e 6 ES ee oS 2 DO SECU eoa e p a ew HO ae A Ge a e a a ee oe ewe au 3 2 MOB rc Gb ACR Aa a RE Be RS ee RE Se 3 28 Installing UCC extensions e sic oS 2 ea SE eee OS Se A 4 29 Testing the mStallauonm sese e 664 be ba bbe ea eee eee Bee 4 3 Getting started with UCC 4 Sl Getting help ceses fae d se weed MwA ee ee Seo a Gad eo 4 3 2 Connecting lt lt 24 j iede Ge be Bw Ah dk ee eae SL See BON 4 39 Listavalable stes ura a a BRS ae Ge 4 34 Running your first job s iy oeae o E ee be 5 IN ALISON VOURIODS 2 64 a PEP AEN EE OPES Pee EE EEG 5 4 Common options to UCC 5 4 1 Security and VO related options 0 evi cos Cees BM aS Spd a 6 42 Configuration le sg ech hace a A a RO eh Be a ee 7 43
15. ands interactively It is usually started by ucc shell If you want to process a list of commands from a file instead of typing them you can start the shell like this ucc shell f commandsfile or on Unix you can use the redirection features ucc shell lt commandsfile 13 1 Exiting the shell To exit type exit or press CTRL D 13 2 Changing property settings To change a property setting in shell mode you can use the set command Without additional arguments current properties are listed UCC Set me gris Py tes A output tmp UNICORE Commandline Client User Manual 36 To set one or more properties add space separated key value strings ucc gt set output work registry https 14 Admin use of UCC You can use UCC to keep track of your jobs or with appropriate permissions to keep track of all the resources on a site UCC allows to list jobs Grid sites and applications including full details Using the scripting possibilities described in Section 15 UCC can be extended to other administrative tasks as well 14 1 Security considerations Usually each UNICORE user has only access to his or her own resources such as jobs For administrative use you will need to aquire administrator privileges There are two ways to achieve this create a dedicated certificate and map it to role admin in the XUUDB or whatever attribute source you are using This method is recommended if you want to remotely admi
16. ao see e e wis 11 11 11 12 14 15 15 16 16 16 19 20 21 22 22 23 25 26 26 26 27 UNICORE Commandline Client User Manual 11 Batch processing lll ODHONS 2 acd She ee bend pha Pied id 11 2 Performance tuning options s ce ee ee 11 3 Resource selection in batch mode corr 12 OGSA BES functions 12 1 OGSA lt BES Seip a a a A Gok 12 2 Running and monitoring OGSA BES jobs o 12 3 Enabling username password authentication o 13 The UCC shell 13 1 Exiting the Shell s i coser a e red p 13 2 Changing property Settings isa A A La es 14 Admin use of UCC 14 1 Security Considerations so si coso ea a ea ae a Se 142 Filter sts cuz he eB ako Bae A a a Bee a eS 14 3 WSRE Commands iio 205 63 245 4 dew in Be Gd 15 Scripting 15 1 SGMpLCOMIEM e eor ci whe A e be eA ee eo BA EX mP tronos el aa BA vk es EER eo ee ds 16 Frequently asked questions 16 1 Configuration oracle a eA OR A e a 10 2 BASE soy ok oo A eee Se ee a BEG OS Ew Oe ee A 31 31 31 32 33 33 34 34 35 35 35 36 36 36 37 37 37 38 UNICORE Commandline Client User Manual 1 1 Overview The UNICORE Commandline client UCC is a full featured client for the UNICORE Grid middleware UCC has client commands for all the UNICORE basic services the OGSA BES interface and the UNICORE workflow system It offers the following functions Job submission and management for both U
17. atches the left hand of the regular expression and the value matches the right hand For each pair the following steps are performed e if there is a matching exclusive name value filter the pair is rejected e otherwise if there is a matching inclusive name value filter the pair passes e otherwise if there is a matching exclusive name filter the pair is rejected e otherwise if there is a matching inclusive name filter or there are no inclusive name filters the pair passes e otherwise the pair is rejected The result of filtering are the attributes containing only those values which passed after filter ing empty attributes are discarded UNICORE Commandline Client User Manual 11 6 Running jobs 6 1 Introduction The UCC can run jobs specified in a simple job description format Section 7 In the following it is assumed that you have UCC installed Section 2 and tried some examples Section 3 For example assume the file myjob u looks as follows ApplicationName Date ApplicationVersion 1 0 To run this through UCC issue the following command tes bla eS This will submit the job wait for completion download the stdout and stderr files and place them in your default output directory The run command has many options to see all the possibilities use the built in help WES aba la 6 1 1 Controlling the output location and file names Output files will be placed in the directory given by the
18. can use the lifetime attribute Lifetime 12h SOS muay Inj el 8 Data management functions UCC offers access to all the data management functions in UNICORE You can upload or download data from a remote server initiate a server to server transfer create directories and so on 8 1 Specifying remote locations Remote locations can be specified in two ways The first way is to use a URI that includes protocol storage server and filename for example BFT https mygateway 8080 SITE services StorageManagement res default_storage file which specifies a file named file on the storage instance https mygateway 8080 SITE services StorageManagement res using the BFT protocol Paths are relative to the storage root not the root of the actual file system This explicit format is sometimes inconvenient so you can use a shorter more intuitive format This is also a URI but you need to know only the name of the virtual site target system and the storage or job id For example unicore6 SITE Home file protocol PROTOCOL or shorter u6 SITE Home file protocol PROTOCOL This will resolve the current user s Home storage at the target system named SITE Note that if you do not specify the protocol the BFT protocol will be used as default You can also refer to a job Uspace the job s working directory on a given site For this you will need the unique ID of that job which you can get for example usin
19. cking NONE 2 7 Logging UCC writes some messages to the console more if you choose the verbose mode v option If you need real logging e g when using the batch mode you can edit the lt UCC_HOME gt conf logging properties file which configures the Log4J logging infrastructure used in UNICORE UNICORE Commandline Client User Manual 4 2 8 Installing UCC extensions UCC can be extended with additional commands It is enough to copy the libraries jar files of the extension into a directory that is scanned by UCC in general these are the UCC lib 2 9 Testing the installation To test your UCC installation and to get information about the resources on the Grid you re connecting to do ucc system info 1 v 3 Getting started with UCC Assuming you have successfully installed UCC this section shows how to get going quickly 3 1 Getting help Calling UCC with the h option will show the available options To get a list of available commands type mee h To get help on a specific command type ucc lt command gt h See also here for a list of common options 3 2 Connecting First contact UNICORE and make sure you have access to some target systems ucc connect options 3 3 List available sites Then list the sites available to you using ucc list sites options UNICORE Commandline Client User Manual 5 3 4 Running your first job The UCC distribution contains samples that you can ru
20. dline UNICORE Commandline Client User Manual 3 Note Windows only The preferences are usually searched in the c Documents and Set tings lt user_name gt ucc folder To create the ucc folder you might have to use the command prompt mkdir command When specifying paths in the preferences file the backslash character needs to be written using an extra backslash For example if you are using a local UNICORE 6 installation for testing you could use registry https localhost 8080 DEMO SITE services Registry res default_registry Note If you wish to change the default property file location you can set a Java VM property in the UCC start script for example by editing the command that starts UCC java Ducc preferences lt preferences location gt 2 6 Security UCC supports many keystore truststore options You need a that contains your user certifi cate and private key and you need to setup the certificate s of the certificate authorities that you trust The trusted certificates can reside in a Java keystore file in jks format or in a directory in pem format Please refer to ucc help auth for full information Here is a configuration example credential path lt your keystore gt credential password lt your password gt truststore type keystor truststore keystorePath lt your keystore gt truststore keystorePassword lt your password gt client serverHostnameChe
21. download other result files you ll have to use the datamovement functions described in Section 8 6 3 5 Uploading and executing an executable To upload and execute a file on a remote server you might need a small helper script to make the uploaded file executable and run it bin sh chmod x myapp myapp Your ucc job description would then look as follows Executable bin sh Arguments helper sh eMC rates aa From helper sh To helper sh Hrom Maa Mos Mica l Note Recent servers do not require this trick and you should be able to directly execute your uploaded executable without requiring a helper script UNICORE Commandline Client User Manual 14 6 3 6 Scheduling job submission to the batch system Sometimes a user wishes to control the time when a job is submitted to the batch queue for example because she knows that a certain queue will be empty at that time Note This feature only works with server release 6 4 0 or higher To schedule a job you can either use the S option to the ucc run command Wie woin O ViAs 2a Alternatively you can specify the start time in your job file using the Not before key word Not before 12 30 In both cases the specified start time can be given in the brief HH mm hours and minutes format shown above or in the full ISO 8601 format including year date time and time zone Not before 2011 12 24T12 30 gt
22. e OGSA BES extensions Users can fetch the job status by specifying the descriptor job file This file is automatically generated after a successful execution of bes submit job command Example ucc bes job status jobid job Job can be terminated using a job descriptor file ucc bes terminate job jobid job To list BESFactory properties ucc bes list att s bes 1 The above command will result in BESFactory s properties without jobs information To see the list of the user s jobs on a BESFactory ucc bes list job s bes 1 12 3 Enabling username password authentication Some BES implementations support authentication using username and password To add user name and password to the messages sent by UCC the UCC preferences file must contain the following settings UNICORE Commandline Client User Manual 35 setup username password uas security out handler classname de fzj unicore bes security UsernameOutHandler de fzj unicore bes security UsernameOutHandler wsUserName lt gt your_username gt de fzj unicore bes security UsernameOutHandler wsPassword lt gt your_password gt de fzj unicore bes security UsernameOutHandler wsActivateUsernameProfile tru 13 The UCC shell If you want to run a larger number of UCC commands the overhead of starting the Java VM or checking the registry may become annoying For this scenario UCC offers a shell that allows the user to enter UCC comm
23. g the list jobs command For example u6 SITE 1 3bc2e2 d814 406e 811d e533f8f7a93b outfile UNICORE Commandline Client User Manual 23 refers to the file outfile in the working directory of the given job on the SITE target system It is also possible to refer to storage services that are registered in the registry using their name for example u6 SHARE myfiles a_file can be used to refer to the shared storage named SHARE if it is registered in the registry Though convenient the method using unicore6 is much slower and will generate some network traffic If you do a lot of operations on the same resource you should use the resolve command to find out the URI of the resource and use that later 8 1 1 The resolve command This will figure out the real address for a unicore6 URL as defined above ucc resolve u6 SHARE 8 2 Data movement 8 2 1 get file Use get file to download remote files to your local machine Example ucc get file s u6 DEMO SITE Home test txt t my_test txt The s source and t target options are used to denote the source file s and the target file or directory Wild card characters and are supported For example ucc get file s u6 DEMO SITE Home x pdf t pdfs will download all pdf files and write them to the pdfs directory which must exist 8 2 2 put file Use put file to upload a local file to a remote location Examp
24. he WS Addressing s end point reference schema See below the contents of the sample endpoint reference file lt wsa EndpointReference xmlns wsa http www w3 org 2005 08 addressing gt lt wsa Address gt https localhost 8080 DEMO SITE services BESFactory gt res default_bes_factory lt wsa Address gt lt wsa EndpointReference gt In the above XML snippet under the Address tag you must specify the URL of a target BESFactory service For the sake of convenience here is an XML infoset representation taken from the WS Addressing specification lt EndpointReference gt lt Address gt xs anyURI lt Address gt lt ReferenceParameters gt xs any lt ReferenceParameters gt UNICORE Commandline Client User Manual 34 lt Metadata gt xs any lt Metadata gt lt EndpointReference gt 12 2 Running and monitoring OGSA BES jobs UCC provides an easy to use command for submitting jobs on OGSA BES complaint endpoints To send a job read from a JSDL file ucc bes submit job 3 hellompi xml s bes 3 v Alternatively the job can be submitted using a BESFactory URL or endpoint reference file path ucc bes submit Job j hellompi xml s https example3 com services BESFactory v or ucc bes submit job j hellompi xml s file tmp bes jugene xml v The JSON job description Section 7 can also be used although only a subset of JSON constructs are supported for th
25. he metadata functions are all accessed via a single UCC command metadata The actual operation to be performed is given with the C i e command option The storage to be operated upon is given using the s option alternatively the m option can be used to directly give the metadata service URL In addition to the URL the name of the target file on the storage is required Metadata is represented in JSON format The metadata operations usually read metadata from a file or write results to file which is specified using the f option In the following examples lt STORAGE gt denotes the URL of a storage capable of handling metadata UNICORE Commandline Client User Manual 27 9 2 Available commands 9 2 1 creating metadata To create metadata a file in JSON format is required containing key value pairs For example edit the file meta json to contain foo bar Say we have a file test on our storage then you can create metadata as follows ucc metadata C creat f meta json s lt STORAGE gt test If you now look at the file with Is l m ucc ls 1 m lt STORAGE gt test you should get something like this 10y SS AM 06S 2 22532 ESSE ROO tar resourceName test 9 2 2 reading metadata Apart from the Is 1 m used above there is also an explicit read command which can write the metadata to a file as well ucc metadata C read s lt STORAGE gt
26. ing required parent directories remotely Example ucc mkdir u6 DEMO SITE Home testdirectory data pdfs 8 3 2 rm This will remove a file or directory remotely By default UCC will ask for a confirmation Use the quiet or q option to disable this confirmation e g when using this command in scripts Example ucc rm u6 DEMO SITE Home testdirectory data pdfs UNICORE Commandline Client User Manual 26 8 4 Finding data 8 4 1 Is This will list a remote directory Useful options are 1 detailed output H human friendly and R recurse Example ucc ls u6 DEMO SITE Home 1 H If the storage supports metadata you can get the metadata of a single file using Is 1 m ucc ls u6 DEMO SITE Home bashrc 1 m 8 4 2 find This command is a similar to the well known Unix utility however much less powerful It allows to do recursive listings and retrieve files matching certain conditions Currently only name match is available For example to get all PDF files on a storage ucc find r l u6 DEMO SITE Home N pdf The find command is currently implemented synchronously and may thus run into a network timeout when it takes too long This limitation will be overcome in future versions of this command 9 Metadata management functions UCC offers a simple interface to access the metadata management service in UNICORE 9 1 Basics T
27. ither from your client machine or from some remote location An important concept in UNICORE is the job s workspace also called Uspace which is the default location into which files are placed The same applies to result files by default files will be downloaded from the job s workspace However other remote storage locations are supported too UNICORE Commandline Client User Manual 17 7 5 1 Importing files into the job workspace To import files from your local computer or from remote sites to the job s working directory on the remote UNICORE server there s the Imports keyword Here is an example Import section that specifies three imports IMPARES import a local file into the job workspace From work data fileName To uspaceFileName import a set of PDF files into the Uspace Teams Y mords calcey oct jaen o WA import a remote file from a UNICORE storage From u6 DEMO SITE Home testfile To otherUspaceFile lo If for some reason it may happen that the local file does not exist and you want the job to run anyway there is a flag FailOnError that can be set to false IMPOR Sia ll do not fail on errors for this import From work data fileName To uspaceFileName PeuLIOiaeaones Weel Ib Note UCC supports simple wild cards and for importing exporting LOCAL files i e currently wildcards do not work for server to server imp
28. le ucc put file s test txt t u6 DEMO SITE Home test txt If you specify the a option data will be appended to an existing file UNICORE Commandline Client User Manual 24 8 2 3 copy file This will initiate a server to server data transfer Use the a option to run asynchronously i e ucc will not wait for the transfer to complete Instead a file containing the transfer reference will be written which can be passed to the copy file status command for status checking later In case the source and target file are on the same storage resource UCC will issue the remote copy command and return immediately as there is no need for an asynchronous mode Example ucc copy file s u6 OTHER SITE Home test txt t u6 DEMO SITE Home test txt Sometimes a user wishes to schedule the time when a server to server transfer is executed for example because she knows that more network bandwith will be available at that time Note This feature only works with server release 6 4 0 or higher To schedule the file transfer you can use the S option to the ucc copy file command WES Coyle SS Op The format is simply HH mm hours and minutes Alternatively you can give the time in the full ISO 8601 format including year date time and time zone Wee Coor cile S VACA IATA SOS OO O02 00 8 2 4 copy file status This will print the status of the given data transfer As argumen
29. n Let s run the date sample The v switch prints more info so you can see what s going on ucc run options v UCC_HOME samples date u Note Look for UCC samples in the usr share doc unicore ucc samples directory This will run date on a randomly chosen site and retrieve the output To run on a particular site use the s option to specify a particular target system 3 5 Listing your jobs The command mas hist Ob Sm lopielonsy will print a list of jobs actually their addresses with their respective status RUNNING SUC CESSFUL etc 4 Common options to UCC The following table lists the options understood by most UCC commands Most commands have additional options You can always get a summary of all available options for a command by calling UCC with the h or help option for example ucc batch help Since it is not possible to give all the required options on the commandline it is mandatory to create a preferences file containing e g your settings for keystore registry etc Table 1 Common options for the UCC option short and long form description c configuration lt Properties_file gt Properties file containing your preferences By default a file userhome ucc preferences is checked k authenticationMethod lt auth gt Authentication method to use default X509 UNICORE Commandline Client User Manual 6 Table 1 continued
30. n you may use this assertion to get access to the server Most UCC commands support this for example you may connect to the server using this assertion uce connect A assertion xml You also may combine those two steps into one ucc connect J https uvos example com 2443 G vo group or assuming that UVOS server is in the registry ucc connect J auto G vo group However note that using lt lt A gt gt gt option is faster attributes are read from a file while in the combined scenario the attributes are fetched from a remote VO server prior to invocation of the intended UCC command 5 3 Attribute filtering You might want to obtain an assertion with only handful of attributes and their values This is done by using attribute filters UCC can display a list of all attributes Names scopes values and descriptions if available will be displayed ucc list attributes J auto The last column F contains a letter Y next to all attribute values that pass through attribute filters There are two kinds of filters inclusive filters which specify what attributes should pass and exclusive filters which specify what attributes should be filtered out If not specified the default inclusive filter approves of all attributes and their values and the default exclusive filter does not reject anything In this example an inclusive filter choose only those attributes whose name contains the word xlogin tee lisic ctcica lo
31. n can have a Resources section specifying the resources to request on the remote system Resources memory per CPU bytes you may use the common K M or G Memory 268435456 UNICORE Commandline Client User Manual 20 time per CPU seconds use min h or d for other units Runtime 86400 Total number of requested CPUs CPUs UL y you may optionally give the number of nodes Nodes 2 together with the CPUs per node CPUsPerNode 32 Custom resources site dependent StackLimitPerThread 262144 Operating system Operating system LINUX MACOS WINNT Resource reservation reference Reservation job1234 Note that you can also specify a reservation reference if your batch system supports this and you have made a resource reservation 7 7 Execution environments To run a job in a special execution environments as supported by the server you can use the following syntax Execution environment Name Arguments ArgNamel valuel ArgName2 value2 lo Ceicaomss ses Ir PRESONMAna Se A Boss omnan as A User precommand Uscrrposteomn an UNICORE Commandline Client User Manual 21 7 8 Miscellaneous options 7 8 1 Selecting the remote login and or group In case you have multiple logins or Unix groups on the remote site mapped to the same creden tial you can select the user name and or group to use as follows User name yourlogin Group yourg
32. nistrate UNICORE X use the server keystore of the UNICORE X server you want to administrate as UCC key store This will also give you administrator privileges For this you will need to be logged on to the UNICORE X server 14 2 Filtering lists The UCC commands that list server side things list jobs etc accept a filtering option that can be used to limit the results of the operation Filtering works on the XML resource properties of the resource in question Filtering is enabled by the f or filter option of the form f XMLNAME OPERATOR VALUE where XMLNAME is the name of an XML Element from the WSRF resource properties docu ment For example to list all your running jobs ucc list jobs f Status equals RUNNING To list all jobs submitted on Nov 13 2007 UCC S ts oUb sson Lame secon als 2 00 AS etc UNICORE Commandline Client User Manual 37 Table 7 Filtering options operator long and short form description equals eq String equality ignoring case notequals neq String inequality ignoring case contains c Substring match notcontains nc substring non match greaterthan gt Lexical comparison lessthan lt Lexical comparison 14 3 WSRF commands UCC supports several low level WSRF operations using the wsrf command To destroy a resource ucc wsrf destroy lt Address gt To get a property listing i e print the XML resource property docume
33. nt ucc wsrf getproperties lt Address gt To extend the lifetime of a resource ucc wsrf extend lt Address gt lt Days gt These commands can be abbreviated e g ucc wsrf d lt Address gt 15 Scripting UCC can execute Groovy scripts Groovy http groovy codehaus org is a dynamic scripting language similar to Python or Ruby but very closely integrated with Java The scripting facility can be used for automation tasks or implementation of custom commands but it needs a bit of insight into how UNICORE 6 and UCC work 15 1 Script context Your Groovy scripts can access some predefined variables that are summarized in the following table UNICORE Commandline Client User Manual 38 Table 8 Variables accessible for scripts variable description Java type registry A preconfigured client for de fzj unicore uas client RegistryQuery accessing the registry securityProperties Security configuration eu unicore util httpclient IClientConfiguration keystore etc registryURL the URL of the registry java lang String message Writer for writing messages to the de fzj unicore ucc Message Writer user commandLine the command line org apache commons cli CommandLine properties defaults from the user s java util Properties properties file 15 2 Examples Some example Groovy scripts can be found in the samples directory of the UCC distribution Here is a script that will delete all your jobs
34. o your keystore and truststore See below for an example and Section 4 for full configuration details 2 4 Installation and configuration To install unpack the distribution in a directory of your choice It s a good idea to add the bin directory to your PATH variable export PATH PATH lt UCC_HOME gt bin where UCC_HOME is the directory you installed UCC in Note Windows only Please do not install UCC into a directory containing spaces such as Program files Setting environment variables can be done as administrator using the Control panel gt System gt Extras panel Though you can specify your keystore location and other parameters on the commandline it 1s easiest to place this information in a file so that you do not have to key in this information repeatedly 2 5 Preferences file UCC checks by default whether the file lt userhome gt ucc preferences exists and reads it To specify keystore password and your preferred UNICORE 6 registry URL the file should look as follows credential path lt your keystore gt credential password lt your password gt truststore type keystor truststore keystorePath lt your keystore gt truststore keystorePassword lt your password gt client serverHostnameChecking NONE registry lt your registry gt Note If you are worried about security and do not want specify the password UCC will ask for it if it is not given in the preferences or on the comman
35. orts and exports 7 5 2 Importing files into other storage locations Note This requires a UNICORE server v6 4 2 or later A UNICORE site may supports multiple storages for example a TMP or SCRATCH directory To instruct the server to stage in a file into such a storage the Filesystem tag may be used For example to stage in a file into SCRATCH space the following Imports definition can be used UNICORE Commandline Client User Manual 18 Imports i import a file from a remote storage into the SCRATCH space on gt the target resourc From u6 DEMO SITE Home work data fileName To fileName Filesystem SCRATCH 7 5 3 Exporting result files from the job workspace To export files from the job s working directory to your local machine or to some remote storage use the Exports keyword Here is an example Exports section that specifies two exports Exports this exports all png files to a local directory From x png To home me images this exports a single file to a to local directory failure of this data transfer will be ignored From error log To home me logs error log FailOnError Falsen Es this exports to a UNICORE storage From stdout To u6 DEMO SITE Home results myjob stdout iy As a special case UCC also supports downloading files from other UNICORE storages using the Exports keyword
36. r that creates a proxy cert and adds it to the message 16 2 Usage 16 2 1 Can I use multiple registries with UCC Yes Simply use a comma separated list of URLs for the c option However you may only use a single key truststore so all registries and sites listed in them must accept the same security credentials UNICORE Commandline Client User Manual 41 16 2 2 Can l upload and execute my own executable Yes Check Section 6 16 2 3 Can I use UCC to list the contents of the registry Using the wsrf command and the UNIX grep utility this is very easy for example ucc wsrf getproperties https localhost 8080 DEMO SITE services Registry res default_registry grep Address will list the addresses of all services registered in the registry 16 2 4 How can I use plain JSDL files instead of a u JSON file for job submission Add the j option when submitting a job 16 2 5 I get strange errors related to security Make sure to set and use an alias for your key entry otherwise you might experience strange errors especially when using PKCS12 keystores Also read the general UNICORE FAQ on www unicore eu the UNICORE website which contains descriptions of many common errors 16 2 6 Are the JSDL documents and workflow documents validated The JSDL documents passed to the run command and to submit workflow are validated and any errors are logged If you wish UCC to stop in case of validation errors
37. roup Hint you can get a list of your logins groups on the site by executing ucc list sites s SITENAME 1 7 8 2 Specifying a project If the system you re submitting to does accounting you can specify the account or project you want to charge the job to using the Project tag Project my_project 7 8 3 Specifying the user email for batch system notifications Some batch systems support sending email upon completion of jobs To specify your email use User email foo bar org Hint if you want to explicitely switch off the email notification use NONE as email value This might be necessary because older UNICORE server versions try to use the email address from your certificate if present 7 8 4 Specifying the job name The job name can be set simply by Name Test job 7 8 5 Specifying the status check interval for batch mode Once a job is started it is often not useful to check its status every few seconds because the job might be running several minutes or more Especially in batch mode it can reduce the load on the servers if the update interval is chosen longer This can be achieved by using the following setting this only affects batch mode Update interval 60 only check once a minute default is one gt second UNICORE Commandline Client User Manual 22 7 8 6 Specifying the lifetime of the job If you want to specify a lifetime of the job and not rely on the server default you
38. s SMALL CLUSTER UNICORE Commandline Client User Manual 33 12 OGSA BES functions Assuming you have successfully installed UCC Section 2 this section shows you how to man age and monitor jobs on OGSA BES services using UCC The set of commands not only sup ports the UNICORE implementation but may also work with implementations in other Grid middlewares compliant with OGF s OGSA BES specification 12 1 OGSA BES Setup In UNICORE style users are required to provide a Registry URL inside the preferences file For BES users it is not always the case that an endpoint is advertised via a UNICORE Registry Therefore the configuration options allow user to modify this behaviour contact registry true false Users who whish to disable UCC calling the registry can set the contact registry option to false By default the contact registry option is true When setting contact registry to false OGSA BES users must provide at least one BESFac tory URL using the following format bes 1 https sitel com services BESFactory bes 2 https site2 com services BESFactory bes 3 https site3 com services BESFactory bes 4 file tmp bes Jjugene xml bes 5 tmp bes Jjuropa xml If the contact registry option is set to false and no OGSA BES URL is specified UCC will report an error To use an XML endpoint reference EPR read from a file for contacting a BESFactory service the contents of a EPR file must validate against t
39. sourceCheck Do not check if the necessary application is available on the target system will increase performance a bit X noFetchOutcome Do not fetch standard output and error S submitOnly Only submit the jobs do not wait for them to finish M maxNewJobs Limit the number of job submissions default 100 S sitename Specify which site to use W siteWeights Specify a file containing site weights j jsdl Assume jobs are in JSDL format instead of the default JSON u files 11 3 Resource selection in batch mode By default the UCC batch mode will select a random site for running a job You can modify the selection in different ways e using the s option or a Site lt sitename gt entry in the job file you can specify the site directly e use the W option to specify a file containing site weights Say you have two sites where one site is a big cluster and the other a small cluster To send more jobs to the big cluster you can use the site weights file example site weights file for use with ucc batch W BIG CLUSTER 100 SMALL CLUSTER 10 send no jobs to this site BAD CLUSTER 0 set default weight for any sites not specified here UCC_DEFAULT_SITE_WEIGHT 10 This would tell UCC to send 10 times more jobs to the BIG CLUSTER site and send no jobs to the BAD CLUSTER All other sites would get weight 10 i e the same a
40. ssageWriter message Storage lt name gt at it address stringValue 16 Frequently asked questions 16 1 Configuration 16 1 1 Dol really have to store my password in the preferences file Isn t this insecure Putting the password in a file or giving it as a commandline parameter can be considered inse cure The file could be read by others and the commandline parameters may be visible in for example in the output of the ps command Thus UCC will simply ask for the password in case you did not specify it UNICORE Commandline Client User Manual 40 16 1 2 How can I enable more detailed logging UCC uses log4j by default the configuration is done in lt UCC_HOME gt conf logging properties You can edit this file and increase the logging levels choose to log to a file or to the console etc 16 1 3 How can I set the HTTP connection timeout In your properties file set http connection timeout lt timeout in milliseconds gt 16 1 4 How can I log the SOAP messages sent and received by UCC In your properties file set log outgoing messages log outgoing true log incoming messages log incoming true which will log the messages on INFO level 16 1 5 How can generate a proxy cert and add it to my message in order to use e g GridFTP In your properties file add enable proxy cert out handler uas security out handler classname de fzj unicore uas security ProxyCertOutHandler which will add a handle
41. store on the command line have been removed By default UCC checks for the existence of a file lt userhome ucc preferences gt and reads set tings from there As shown above you can use a different file by specifiying it on the comman dline using the c option The configuration file can contain default settings for many commandline options which are given in the form lt option name gt lt value gt where lt option name gt is the long form of the option For example to set your keystore truststore and registry the file would contain the following settings credential path lt your keystore gt credential password XXXXXXX truststore type keystor truststore keystorePath lt your keystore gt truststore keystorePassword XXXXXX registry https localhost 8080 DEMO SITE services Registry res default_registry Note To protect your passwords you should make the file non readable by others for example on Unix using a command such as chmod 600 preferences 4 3 Communications options The configuration file may also contain low level options for example if you need to specify connection timeouts http proxies etc Table 3 HTTP options for the UCC option description http proxyHost HTTP s proxy to use http proxyPort Port of the HTTP s proxy to use http nonProxyHosts Space separated list of host name fragments for which NOT to go via the proxy If the target URL contains such
42. t it expects a file name contain ing the transfer reference or directly the reference Example for Unix which captures the reference into a shell variable export ID ucc copy file a s u6 OTHER SITE Home test txt t u6 DEMO SITE Home test txt ucc copy file status STD Specifying the file transfer protocol To use a different protocol from the default BFT you can use the 1 ejoicaloia e sosciiy E laste of preferred protocols UCC will try to match them with the capabilities of the storage and use the first match Your preferred protocols can also be listed in gt your preferences file using the NPROTOCO SUS y UNICORE Commandline Client User Manual 25 protocols UFTP BFT NOTE If necessary you can specify additional filetransfer options in gt your preferences file as well For example to use the UFTP protocol you may want to specify the client host address and the number of parallel streams explicitely uftp client host your_client_hostname uftp streams 2 encrypt data at the cost of performance uftp encryption true You can even override the UFTP server host which can be useful in case the UFTP server is accessible via multiple network interfaces uftp server host myhost com UCC will try to use reasonable defaults for any missing parameters 8 3 Handling directories 8 3 1 mkdir This will create a directory includ
43. tes y cio IL Maxlio The value for the lt lt lt I gt gt gt option is a list of semicolon separated Java regular expressions The expressions that contain the equal sign are called name value filters those which do not are called name filters For example you may choose all attributes with names that contain the word login and the admin value of all attributes containing the word role in their name UNICORE Commandline Client User Manual 10 wee ligt Sacer buEes Ui awto E Wn xo gn OMS aa You may also exclude attributes For example the following filter chooses all attributes but those ending with an a UCCMIASitpS at eaouine Sm Umecallic Oma Unum clu If you are content with the results of filtering you can obtain an assertion only with the filtered attributes ucc save attributes J auto G vo group 0 assertion xml I xlogin role admin Q xa You can also use it directly ucc connect J auto G vo group 1 xlogin role admin Q Mao 5 4 Rules for multiple filters Each attribute is considered as a set of name value pairs containing the name of attribute and the value of attribute A pair matches a name filter i e a filter defined using a regular expression without equals sign 1f the name of the attribute matches the regular expression A pair matches a name value filter i e a filter defined using a regular expression with equals sign if the name of the attribute m
44. test f out json The f option is optional 9 2 3 updating metadata Using update the given metadata is merged with any existing metadata Say we have a file x json containing eB Y we can append this to the existing metadata ucc metadata C update s lt STORAGE gt test f x json Check that the metadata has indeed been appended UNICORE Commandline Client User Manual 28 9 2 4 deleting metadata Explicitely deleting is also possible ucc metadata C delete s lt STORAGE gt test Check that the metadata has indeed been deleted 9 2 5 searching Searching requires a search string according to the rules of Apache Lucene and is triggered by the search command ucc metadata C search q foo s lt STORAGE gt 9 2 6 triggering metadata extraction To trigger the extraction of metadata on the server use the start extract command ucc metadata C start extract s lt STORAGE gt In this case the denotes the base path from which to start the extraction process The extrac tion process is asynchronous so a Task service address will be returned which can be used to monitor the extraction process using the wsrf getproperties command 10 Workflow extensions 10 1 Introduction UCC supports the UNICORE workflow system and allows to submit workflows to the workflow engine or single jobs to the service orchestrator broker The workflows are executed server side and UCC
45. tion to the workflow submit command ucc workflow submit f lt factory url gt lt workflow file gt You can check the available factories with the system info command If not specified UCC will use the fist storage factory 1t finds in the registry In general storages that are dynamically created will be deleted when the workflow is deleted To persistently store data you need to make sure to export important result files to a persistent location e g your Home on some Grid site or a persistent storage Alternatively you can directly specify a storage URL either using the convenient u6 notation or as a real network URL ucc workflow submit S u6 MY SITE Home lt workflow file gt ucc workflow submit S https my gateway SITE services StorageManagement res myuser Home lt workflow file gt UNICORE Commandline Client User Manual 30 10 4 1 Importing local data for use by a workflow If you have local files that need to be imported before starting the workflow you have to specify this using a normal UCC job file that contains only an Imports section stage in specification EMO Oates T From local file sh To c9m WORKFLOW_ID input sh l When submitting the workflow add the u lt filename gt option to specify the imports file This will cause UCC to copy the local file local file sh to the workflow storage space You can refer to this file in your workflow using the global
46. you need to set a property ucc validation fail_on_errors true
Download Pdf Manuals
Related Search
Related Contents
Kenmore 3.9 cu. ft. Front-Load Washer - White ENERGY STAR Owner's Manual compte-rendu de la journée - France Nature Environnement Hoover HMC 440TX UCV 701_PC(20) web NT09002A - GB Radiant strip - tub one 80-200 Pana甜"ーc 取扱説明書 vpn-ssl manual del usuario remoto para android Copyright © All rights reserved.
Failed to retrieve file