Utilisation uniforme des grilles avec SAGA et Tutorial grilles et EGEE Montpellier, le 18 juin Sylvain Reynaud
JSAGA2 Accès uniforme: le contexte ARCGOSNAREGI middleware infrastructures
JSAGA3 cluster Accès uniforme: les besoins Introduction L'accès à plusieurs grilles peut être motivé par: la disponibilité des données l'augmentation du nombre de ressources de calcul des besoins spécifiques (e.g. super-calculateur, confidentialité) réduire la latence (e.g. consolidation des résultats)
JSAGA4 Accès uniforme: les approches L'approche moyen terme (GIN) –Transmettre les jobs aux autres infrastructures En adaptant les meta-ordonnanceurs En utilisant les CE comme porte d'entrée L'approche long terme (OMII-Europe) –La même interface sur les composants existants Suivre les recommandations de l'Open Grid Forum Mécanismes communs (e.g. pour la sécurité) L'approche avec plug-ins coté client –Meta-ordonnanceurs: GridWay, GridSAM… –API cliente: GAT, CoG-Kit… …et EGEE user regional grids cluster Introduction
JSAGA5 Open Grid Forum Introduction Contexte Services d’ information Services d’ infrastructure Sécurité Gestion des ressources Gestion de l’exécution Services de données Policy Mgmt VO Mgmt Access Integration Transfer Replication Boundary Traversal Integrity Authorization Authentication Resource Notification Distributed Mgmt Event Mgmt MonitoringDiscovery Job Mgmt Logging Execution Planning Workflow Mgmt Workload Mgmt Provisioning Execution DeploymentConfigurationReservation Interfaces Applications Resource Mgmt Info Retrieval API Remote Procedure JSDL, OGSA-BES, OGSA-RSS, GRAAP UR, RUS, CDDLM, ACS, CGS OGSA-AuthZ, GSI, CAOPS OGSI, contribution à WSRF, WSN… GSM, DAIS, GFS, DFDL, GridFTP, ByteIO Contexte Services d’ information Services d’ infrastructure Sécurité Gestion des ressources Gestion de l’exécution Services de données Interfaces Applications Source: Dave Berry DRMAA, Grid RPC, SAGA, GIR Naming SAGA
JSAGA6 Simple API for Grid Applications SAGA est une interface –standard spécification de l' –orientée objet –simple pour 80% des besoins, 20% des fonctionnalités suffisent –intégrée "look & feel" commun à tous les packages de l'API –high-level les détails du fonctionnement du middleware sont cachés –uniforme indépendante du middleware sous-jacent au niveau de la gestion des erreurs également –multi-langages implémentations pour Java, C –stable spécification SAGA 1.0 (15 janvier 2008) binding Java de référence bientôt stabilisé (release candidate 2) SAGA
JSAGA7 Vue globale SAGA Source: S Jha, T Kielmann, A Merzky
JSAGA8 Vue globale SAGA
JSAGA9 Vue globale SAGAsecuritySecuritycontrol protocolDatalanguage monitorExecutionexpression Job Collection
JSAGA10 Vue globale // choix de l'implémentation System.setProperty("saga.factory","fr.in2p3.jsaga.impl.SagaFactoryImpl"); // instanciation des objets SAGA à l'aide des fabriques Session session = SessionFactory.createSession(); NSDirectory dir = NSFactory.createNSDirectory(session, url); // utilisation des objets SAGA List result = dir.list(); SAGA Specific SAGA
JSAGA11 Sécurité // crée une session avec les contextes par défaut Session session = SessionFactory.createSession(); // ajoute un contexte Globus à la session Context context = ContextFactory.createContext(); context.setAttribute(Context.TYPE, "Globus"); context.setAttribute(Context.USERPASS, passwd); context.setDefaults(); session.addContext(context); // passe la session en argument des méthodes SAGA NSEntry e = NSFactory.createNSEntry(session, url); … SAGA Specific SAGA
JSAGA12 planned construction done SAGA /etc/grid-security/certificates /tmp/x509up_u_$UID ~/.globus/user*.pem Sécurité X509SSHInMemCredGlobusG. LegacyG. RFC820MyProxyVOMSLogin / pwd jsaga-context-init jsaga-context-info jsaga-context-destroy proxy path CA certkey p12 proxy pass phrase usage rules for a globus proxy
JSAGA13 Gestion de données // crée les URLs URL src = URLFactory.createURL("lfn:///grid/file.dat"): URL dst = URLFactory.createURL("gsiftp://host/tmp"); // copie le fichier NSEntry f = NSFactory.createNSEntry(session, src); f.copy(dst); f.close(); SAGA Specific SAGA
JSAGA14 planned construction done SAGA Gestion de données Physical files cache catalogrnslfnsrb / irodshttphttpssftprbyteiofilezipgsiftptarftpmailcachesrm Optimisations: Interfaces optionnelles pour les plug-ins –e.g. transfert tierce-partie Gestion de cache –des connections ouvertes –des meta-données –du contenu explicite via plug-in Logical files
JSAGA15 Gestion de l'exécution // se connecte à un "job service" (e.g. RB, WMS, LCG-CE) URL rm = URLFactory.createURL("gatekeeper://host/job- manager-short"); JobService service = JobFactory.createJobService(session, rm); // soumet un(des) job(s) JobDescription desc = JobFactory.createJobDescription(); desc.setAttribute(JobDescription.EXECUTABLE, "/bin/ls"); Job job = service.createJob(desc); job.run(); // attend la fin du job job.waitFor(); if (State.FAILED.equals(job.getState()) job.rethrow(); SAGA Specific SAGA
JSAGA16 planned construction done SAGA Job monitoring Gestion de l'exécution SAGA user interface: getState / waitFor Monitoring Plug-in interfaces: querying / listening individual job / list of jobs / filtered jobs query individual job listen individual job query filtered jobs Job control gatekeepergLite-WMSwsgramunicore6sshforkcreamgridvmPBSproxy gatekeepergLite-LBwsgramunicore6 getState waitFor sshforkcream… Monitoring: polling/notification, requête individuelle/liste/filtre
JSAGA17 planned construction done Gestion de l'exécution Job control SAGA user interface: getInput / getOutput Streaming Plug-in interfaces: get / set interactive / non-interactive gatekeepergLite-WMSwsgramunicore6 set stream for interactive set stream for non- interactive get stream for interactive sshfork getInput getOutput getError SAGA cream Job monitoring gridvmPBSproxygatekeepergLite-LBwsgramunicore6sshforkcream… Streaming: avant/pendant/après l'exécution, direct/buffered/redirigé
JSAGA18 Collections de jobs // crée la collection de jobs JobCollectionManager mgr = JobCollectionFactory.createJobCollectionManager(session); JobCollectionDescription desc = JobCollectionFactory.createJobCollectionDescription("JSDL", stream); TaskContainer collec = mgr.createJobCollection(desc); collec.run(); // associe les jobs à des gestionnaires de ressources ((JobCollection) collec).bindResourceManagers(rm); // attend la fin de la collection de jobs while (jc.size() > 0) { Task job = collec.waitFor(WaitMode.ALL); System.out.println(job.getState()); } SAGA JobService service = JobFactory.createJobService(session) JobDescription description = JobFactory.createJobDescription()... Job job = service.createJob(description) JobService service = JobFactory.createJobService(session) JobDescription description = JobFactory.createJobDescription()... Job job = service.createJob(description) JSAGA specific SAGA workflow job_collectionlate_binded_job
JSAGA19 planned construction done Collections de jobs Jobcollection Language JSDL+ext.SAGAJDLRSL-2RSL-4 workflow job_collectionlate_binded_job Job Collection Job JSDL retryrules terminationrules parametric languagespecific data staging extensions native job description native job description native job description
JSAGA20 planned construction done Collections de jobs Jobcollection Expression basicdefaultJEPBeanShell myexec date('dd/MM/yyyy', now+24*INDEX) } … myexec -from 30/05/2008 … myexec -from 31/05/2008 … myexec -from 01/06/2008 … workflow job_collectionlate_binded_job exemple de job en JSDL
JSAGA21 planned construction done SAGA + collection Liste des plug-ins Security X509SSHInMemCredGlobusG. LegacyG. RFC820MyProxyVOMSLogin / pwd Data Exec. Expression catalogrnslfnsrb / irodshttphttpssftprbyteiofilezipgsiftptarftpmailcachesrm Job control gatekeepergLite-WMSwsgramunicore6sshlocalcreamgridvmPBSremotegatekeepergLite-LBwsgramunicore6sshlocalcream… basicdefaultJEPBeanShell Language JSDL+ext.SAGAJDLRSL-2RSL-4
JSAGA22 Résumé job desc. SAGA + collection gLite plug-ins Globus plug-ins JSAGA hidemiddlewareheterogeneity (e.g. gLite, Globus, Unicore) JDLRSL
JSAGA23 WMS WMS input data SRM GridFTP WS-GRAM LCG-CELCG-CEWS-GRAM firewall Est-ce suffisant ? job desc. gLite plug-ins Globus plug-ins JSAGA job staging graph delegate selection & files staging job OPlast EGEE hide grid infrastructuresheterogeneity (e.g. EGEE, OSG, DEISA) hidemiddlewareheterogeneity (e.g. gLite, Globus, Unicore) Infrastructureheterogeneity JDLRSL
JSAGA24 Est-ce suffisant ? hide grid infrastructuresheterogeneity (e.g. EGEE, OSG, DEISA) hidemiddlewareheterogeneity (e.g. gLite, Globus, Unicore) Une API construite au-dessus de SAGA pour permettre la soumission d'une collections de jobs sur de multiples grilles à partir d'une seule description de job Une implémentation en Java de la spécification SAGA Infrastructureheterogeneity JSAGA est…
JSAGA25 Hide middleware heterogeneity –Uniform interface (SAGA) Hide infrastructure heterogeneity –Selection of the right security context –Selection of the right client API configuration –Transport of the job input/output data to/from worker nodes Describe the capabilities of the infrastructures you want to use requirements World Grid E G E E l o c a l h o s t O p e n P l a s t C C - I N 2 P 3 Description des infrastructures wsgram WMS VOMS VOMS Globus gsiftp:// Infrastructureheterogeneity
JSAGA26 Description des infrastructures Hide middleware heterogeneity –Job management technologies e.g. CREAM, WMS, SSH, GK Hide infrastructure heterogeneity –Computing Elements (e.g. GK) Different grid or site policies –e.g. network filtering, shared FS Different environment variables –e.g. $VO_?_SW_DIR, /usr/local Different configuration attributes –e.g. monitor service URL, shell path on cygwin, default SE URL Commands available on worker –e.g. globus-url-copy, srmcp, Scp, wget, tar World Grid EGEE OpenPlast localhost CC-IN2P3 tar:// srb:// gsiftp:// srm:// lfn:// gatekeeper gatekeeper wsgram WMS gatekeeper VOMS VOMS Globus examples Infrastructureheterogeneity
JSAGA27 url:// Chemin de transfert dépend de… Lorsqu'on utilise une seule grille –tous les fichiers peuvent être transportés jusqu'au nœuds de calcul en passant par un seul et même nœud de stockage Lorsqu'on utilise plusieurs grilles –il devient nécessaire de construire dynamiquement un graphe de transfert plus complexe, qui va dépendre de… World Grid EGEE OpenPlast localhost CC-IN2P3 tar:// srb:// gsiftp:// srm:// lfn:// gatekeeper gatekeeper wsgram WMS gatekeeper VOMS VOMS Globus jobdesc. Infrastructureheterogeneityplug-insJSAGA
JSAGA28 Chemin de transfert dépend de… grid or site – –network filtering policy – –commands available on workers – –services available from workers (close Storage Element, shared FS) – –supported context instances data to stage – –shared by several jobs – –installed on some worker nodes – –file size – –required data protection level execution service – –protocols supported for staging transfer protocol – –access mode (RO, WO, RW) – –third-party transfer – –supported data protection level jobdesc. World Grid EGEE OpenPlast localhost CC-IN2P3 tar:// srb:// gsiftp:// srm:// lfn:// gatekeeper gatekeeper wsgram WMS gatekeeper VOMS VOMS Globus url:// Infrastructureheterogeneityplug-insJSAGA
JSAGA29 Infrastructureheterogeneity OpenPlast OpenPlast World Grid EGEE OpenPlast localhost CC-IN2P3 tar:// srb:// gsiftp:// srm:// lfn:// gatekeeper gatekeeper wsgram WMS gatekeeper VOMS VOMS Globus Chemin de transfert dépend de… grid or site – –network filtering policy – –commands available on workers – –services available from workers (close Storage Element, shared FS) – –supported context instances data to stage – –shared by several jobs – –installed on some worker nodes – –file size – –required data protection level execution service – –protocols supported for staging transfer protocol – –access mode (RO, WO, RW) – –third-party transfer – –supported data protection level OPlast GSIFTP EGEE CA SMTPGSIFTPGSIFTPHTTP OPlast SRB job C R1R1R1R1 E1E1E1E1 C' E1E1E1E1 R1R1R1R1 CC' common result std-error
JSAGA30 Infrastructureheterogeneity E1E1E1E1 R1R1R1R1 CC'C'' common EEsrc executable D1D1D1D1 input data result std-error OPlast EGEE CA SMTPGSIFTPGSIFTPHTTP GSIFTP OPlast SRB Chemin de transfert dépend de… grid or site –network filtering policy –commands available on workers –services available from workers (close Storage Element, shared FS) –supported context instances data to stage –shared by several jobs –installed on some worker nodes –file size –required data protection level job C"Esrc D1D1D1D1 E C R1R1R1R1 E1E1E1E1 C' TARTAR execution service – –protocols supported for staging transfer protocol – –access mode (RO, WO, RW) – –third-party transfer – –supported data protection level iGet
JSAGA31 Infrastructureheterogeneity Exemple de graphe généré Data flow E1E1E1E1 R1R1R1R1 CC'C'' common EEsrc executable D1D1D1D1 input data result std-error OPlast plusieurs protocoles utilisés, mais seulement 3 jobs soumis sur 1 grille…
JSAGA32 Qualité logicielle Fully automated build process –download build tools, modules –generate code, build, run tests Generated project web site : –documentation user guides (from annotations) specification (from code) design (from code) –reports static code analysis test results and coverage tasks list Wizard to generate skeleton of new plug-in projects Reusable SAGA test suite for validating plug-ins Conclusion # SAGA protocols test-suite configuration gsiftp.base=gsiftp://ccrugceli01.in2p3.fr/tmp/ gsiftp.base2=gsiftp://agena.c-s.fr/grid/tmp/ gsiftp.context=OpenPlast_proxy lfn.base=lfn:///grid/dteam/ lfn.context=EGEE_proxy http.base= file.base=file:///c:/tmp/ file.base2=file:///c:/
JSAGA33 Qualité logicielle Minimize dependencies –resolve conflicts between versions of libraries with maven –regenerate stubs from WSDL with Axis 1.4 –remove external dependencies no gLite-UI for EGEE, no OS- specific dependency Provide an installer –install only what you need… Conclusion
JSAGA34 Résumé des fonctionnalités Hide middleware heterogeneity –uniform interface Hide infrastructure heterogeneity –select security contexts, protocol versions, environment variables –transport data to/from workers …through standard interfaces –SAGA –JSDL …open source …with efficiency –choose the most efficient strategy for job monitoring, job in/out staging, file operations –enable caching connections, files information and content …with flexibility –extensible (plug-ins) –customizable (configuration) –use infrastructures as they are –middleware specific features Conclusion Describe your job once, submit it worldwide !
JSAGA35 Résumé de l'architecture For end-users: ready-to-use software adapted to their needs For application developers: hide infrastructure heterogeneity For application developers: hide middleware heterogeneity For plug-in developers: As many interfaces as ways to implement the functionalities Applications Plug-ins interfaces Plug-ins interfaces Job Collection Job Collection SAGA SAGA Conclusion
JSAGA36 Projets utilisant JSAGA JSAGA est utilisé par… portail web pour soumettre des jobs sur des infrastructures industrielles et de recherche –JJS (Java Job Submission) soumission de collections de jobs sur EGEE optimisé pour les jobs courts (sélection des ressources basée sur la QoS observée) –JUX (Java Universal eXplorer) explorateur de fichiers multi-protocoles Conclusion Applications /