afefe5475187fb57ca0802c9a75586ee.ppt
- Количество слайдов: 24
February 24 th, Frascati, Italy www. eu-egee. org DGAS Basic Management A. Guarise EGEE is a project funded by the European Union under contract INFSO-RI-508833
Data. Grid Accounting System The Data Grid Accounting System was originally developed within the EU Datagrid Project and is now being maintained and re engineered within the EU EGEE Project. The Purpose of DGAS is to implement Resource Usage Metering, Accounting and Billing in a fully distributed Grid environment. It is conceived to be distributed, secure and extensible. The system is designed in order for Usage Metering, Accounting and Billing to be indipendent layers. February 24 th 2005 - 2
Usage Metering and Accounting The usage of Grid Resources by Grid Users is registered in appropriate servers, known as HLRs (Home Location Registers) where both users and resources are registered. In order to achieve scalability, there can be many independent HLRs. At least one HLR per VO are foreseen, although a finer granularity is possible. Each HLR keeps the records of every grid job executed by each of its registered users or resources, thus being able to furnish usage information with many granularity levels: Per user or resource, per group of users or resources, per VO. February 24 th 2005 - 3
Economic Accounting ● ● The DGAS software is concieved mainly as an Economic Accounting system. Within this approach, grid users and grid resources are treated as consumers and producers of goods like computational power or storage capacity. The consumers can use these goods paying an apropriate amount of Grid Credits to the producers. The idea behind this approach is that an Economic Accounting system may have a major advantage over a plain, bookkeeping style accounting system: it deploys a virtual economic market over the grid so that the natural behviour of this market can be used to drive the workload management system in balancing the resource load. February 24 th 2005 - 4
Example of economic accounting VO 1 Check Economic Authorization VO 2 WMS HLR 1 HLR 2 CE CE February 24 th 2005 - 5
HLR Server Installation ● ● There actually two ‘flavours’ of the DGAS software available. The one coming from the EGEE g. Lite software and the one coming from the INFNGrid middleware. The two ‘flavours’ are very similar, the only differences being in some changes in command names. In order to install an HLR server using the INFNGrid ‘flavour’ of DGAS (actually available for RH 7. 3 and SLC 3) the needed rpms are: edg-wl-common-api_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-common-utilities_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-services-common_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-dgas-hlr-server-admin_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-dgas-hlr-ui_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-dgas-pa-pa. Client_slc_3_0_3 -2. 3. 8 -0. i 486. rpm February 24 th 2005 - 6
HLR Server configuration The HLR server has a configuration file: ● ● ● /opt/edg/etc/edg-wl-dgas-hlr. conf The main parameters needed to tune up the server are: Parameter Default Value Description hlr_def_log /opt/edg/var/log/hlrd. log TCP listener log file hlr_qmgr_def_log /opt/edg/var/log/hlr_qmgrd. log Transaction daemon log file hlr_def_port 56568 HLR listening port hlr_gridmapfile /etc/grid-security/grid-mapfile Host grid-mapfile hlr_def_lock /opt/edg/var/hlr. lock Tcp listener lock file hlr_qmgr_def_lock /opt/edg/var/hlr_qmgr. lock Transaction daemon lock file February 24 th 2005 - 7
HLR Database initialisation The HLR stores all the critical information in a persistent databased upon My. SQL. Before starting up a DGAS installation for the first time it is necessary to initialise the databases used by the HLR. There is a script that automates this process: ● ● ● /opt/edg/sbin/edg-wl-hlrd-dbcreate The script creates two databases named ‘hlr’ and ‘hlr_tmp’ and populate them with a set of predefined tables. February 24 th 2005 - 8
HLR Server Startup ● ● The HLR server is actually composed by three separate daemons, illustrated in the table below. The startup script: /etc/rc. d/init. d/edg-wl-hlrd understands the usual start, stop, restart and status targets. Daemon name edg-wl-dgas-hlrd Description The TCP listener, waits for incoming requests and calls the engine needed to fulfill the client command. edg-wl-dgas-hlr-tqd The daemon responsible for managing accounting transactions with other HLRs. edg-wl-dgas-hlrhad. pl Daemon responsible for restarting the server in case of failures. February 24 th 2005 - 9
PA Server Installation ● ● ● A Price Authority is a service responsible to establish prices for resources, store them and allow to retrieve the price assigned to a resource in a given moment in time. The installation of a PA server is conceptually identical to that of an HLR, since the underlying code is mainly the same. Usually it should be deployed on the same node that runs the HLR server that manages the resources of a site. The RPMs needed by a PA server are (INFNGrid flavour): edg-wl-common-api_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-common-utilities_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-services-common_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-dgas-pa-server_slc_3_0_3 -2. 3. 8 -0. i 486. rpm edg-wl-dgas-pa-pa. Client_slc_3_0_3 -2. 3. 8 -0. i 486. rpm February 24 th 2005 - 10
PA Server configuration The PA server has a configuration file: ● ● ● /opt/edg/etc/edg-wl-dgas-pa. conf The Parameters needed to tune up the server are: Parameter pa_def_log pa_def_lock pa_def_port pricing_sch eme pa_price_dll_name def_price_m Default Value Description /opt/edg/var/log/pad. log PA log file /opt/edg/var/pa. lock PA lock file 56567 PA listening port dynamic | manual Selects if prices are inserted by the administrator or computed automatically by the system. libdgas_pa. Price. Alg. Dyn. so Name of the DLL plugin used for dynamic price computation. February 24 th Time (in seconds) after wich a price 2005 - 11
PA Server Startup ● ● The PA server is actually composed by two separate daemons, illustrated in the table below. The startup script: /etc/rc. d/init. d/edg-wl-pad understands the usual start, stop, restart and status targets. Daemon name edg-wl-dgas-pad edg-wl-dgas-hlrhad. pl Description The TCP listener, wait for incoming requests and calls the engine needed to fulfill the client command. Daemon responsible for restarting the server in case of failures. It is the same command used by the HLR server. February 24 th 2005 - 12
HLR : Registering Accounts (1) ● ● Users need to have a valid DGAS account on an HLR in order for their jobs to be accounted. To manually create an user account the command is: edg-wl-dgas-hlr-add. User -u guarise –g torino –f infngrid -e andrea. guarise@to. infn. it –c “/C=IT/O=INFN/OU=Personal Certificate/L=Torino/CN=Andrea Guarise/Email=Andrea. Guarise@to. infn. it” ● ● ● This creates an account for the user Andrea Guarise, with dgas uid ‘guarise’, assigning him to the ‘torino’ group of the infngrid Virtual Organisation. As the command suggests, it is possible to assign users to VOs and to groups inside a VO. There are therefore commands to create such groups: The command used to create the torino group would be: edg-wl-dgas-hlr. Add. Group –g torino –d “infngrid group torino” –f infngrid February 24 th 2005 - 13
HLR : Registering Accounts (2) Then the infngrid VO account can be created with the command: ● edg-wl-dgas-hlr-add. Fund –d “INFNGrid VO” –f infngrid Also Grid Resources need to have an account on an HLR server, the command to manually register a resource is: ● edg-wl-dgas-hlr-add. Resource –r to 001 –e sys. manager@to. infn. it –d grid 002. to. infn. it –c “grid 002. to. infn. it: 2119/jobmanager-pbs-short” –g torino – f infngrid This command creates an account for the CE with CEId: ● ● ● grid 002. to. infn. it: 2119/jobmanager-pbs-short As you can see also the CE can be seen as an account part of a group, that, as in the example, can be a group contaqining users as well. February 24 th 2005 - 14
HLR : Registering Accounts (3) ● ● Since manually inserting a huge amount of user and resource accounts is clearly not feasible. Two CLI tools are furnished for bulk registrations as well. To register in a single step all the Users belonging to a given VO LDAP server the command is: dgas_hlr_vo. Import. pl –v “ldap: //gridvo. nikhef. nl/o=alice, de=eu-datagrid, dc=org” –V alice ● This command creates the accounts for all the users registered in the ALICE VO. It also creates group accounts using the domain of the e-mail addresses so that users belonging to the VO are automatically grouped by site too. February 24 th 2005 - 15
HLR : Registering Accounts (4) ● To register in a single step all the Resources belonging to a given bd. II server the command is: dgas_hlr_bdii. Import. pl –s “ibm 140. cnaf. infn. it” –p 2170 ● ● This command creates the accounts for all the resources registered in the ibm 140 bd. II. It creates group accounts using the domain of the ce hostname and uses the Mds-Vo-Name ldap field to assign the resource to a VO. This is the default behaviour of the command, some tuning is available with other CLI options, that can be seen via the ‘-h’ command option. February 24 th 2005 - 16
HLR and PA: Basic operations ● Both the HLR and PA TCP listener can be remotely queried for their status, the command is: edg-wl-dgas-ping. Client –s “grid 005. to. infn. it: 56568: ” –t 1 Available Engines: UI: ATM: BANK: JOBAUTH: USERAUTH: URWG: PING Ping requests: 2 ATM requests: 539/523 job. Auth requests: 36/0 ● ● ● It needs to be executed with a valid user proxy. All the daemons write logs of their activities. Each log entry contains information about the Engine that originates the log stamp and information about the connection responsible for the service call, such as hostname of the machine originating the request and the subject of the certificate that authenticates the client connection. Every daemon writes a lock file that contains the pid of the corresponding daemon process. February 24 th 2005 - 17
HLR: Standard queries An administrator that has local access to the HLR server can retrieve many information about the status of the accounts: For example: ● ● ● edg-wl-dgas-hlr-query. User –Ua Retrieves the information about the account of all the registered users. ● edg-wl-dgas-hlr-query. User –Ua. T Retrieves also all the transactions performed for each user. edg-wl-dgas-hlr-query. User –U –e guarise. ATto. infn. it |guarise|andrea. guarise. ATto. infn. it|Andrea Guarise|/C=IT/O=INFN…|torino|infngrid|10000|0|0|wall_t ime=0, cpu_time=0, job_number=0| ● Retrieves only information about the user with the given email address ● Resource Queries Similar queries are available for resources accounts via the command: edg-wl-dgas-hlr-query. Resource February 24 th 2005 - 18
HLR: Advanced queries It is also possible to perform more complex queries to get, for example, statistics of the usage of a set of resources, or to have a snapshot of the amount of work performed by users dividing them by groups or VOs. ● Statistics of all the user jobs accounted by an HLR: edg-wl-dgas-hlr. Advanced. Query –Q user. Aggregate ● Jobs| 15| tot. Cost| tot. Cpu. Time|tot. Wall. Time|tot. Mem(MB)|tot. VMem(MB)| 0| 21550| 48551| 22| 25| Statistics of all the user jobs accounted for the group ‘torino’: edg-wl-dgas-hlr. Advanced. Query –Q user. Aggregate –g torino ● Jobs| 5| tot. Cost| tot. Cpu. Time|tot. Wall. Time|tot. Mem(MB)|tot. VMem(MB)| 0| 9201| 15539| 7| 8| Aggregates are available for resources, groups, VOs. It is also possible to have job lists and specify a time interval for the queries. February 24 th 2005 - 19
Metering Infrastructure: GIANDUIA DGAS furnishes the APIs that can be used by each site to develop its own metering infrastructure. So that a site can freely decide how to measure its own Usage Records. Two APIs are available. These both provide a C++ library and a CLI tool. Their purpose is to push the information to the User HLR once the Usage Record for a job is available. These two API only differs in terms of the schema adopted to describe the Usage Records: The first implements a simple, proprietary, schema. The second implements the GGF URWG schema, more powerful, but rather complex to manage. A minimum set of information need to be available in the usage record to make grid accounting possible: ● ● ● ● The User HLR Location (comes with the job JDL) A valid User Proxy (Needed to secure the communication) The CE ID (Needed to unambiguously assign the Usage) The Grid Job Id (For grid accounting the LRMS job id is not enough) February 24 th 2005 - 20
Metering Infrastructure: GIANDUIA ● GIANDUIA workflow (Gianduia Is A Nice Distributed Usage-metering Infrastructure for Accounting) WN job. Wrapper HLR_LOCATION USER_PROXY CE_ID LRMS_JOB_ID GRID_JOB_ID CE gianduia conf LRMS LOG User HLR (HLR_LOCATION) GIANDUIA gianduiotti. Box February 24 th 2005 - 21
GIANDUIA: Installation & configuration ● Gianduia needs to be installed on CE/WN Nodes, but soon only CE installation will be necessary. The RPMs needed from the INFNGrid Distribution are: ● CE: • edg-wl-common-api_slc_3_0_3 -2. 3. 8 -0. i 486. rpm • edg-wl-common-utilities_slc_3_0_3 -2. 3. 8 -0. i 486. rpm • edg-wl-dgas-hlr-ATMClient_slc_3_0_3 -2. 3. 8 -0. i 486. rpm ● WN: ● edg-wl-dgas-wn-ce. Service. Client_slc_3_0_3 -2. 3. 8 -0. i 486. rpm The configuration files used by gianduia are: ● ● /opt/edg/etc/edg-wl-dgas-ATMClient. conf ● ● It is used by the daemon that pushes the UR to the user HLR. /opt/edg/etc/edg-wl-dgas-gianduia. conf ● It is used by the gianduia daemon, responsible for retrieving LRMS accounting log entries and appending them to the job UR file. February 24 th 2005 - 22
GIANDUIA: Installation & configuration /opt/edg/etc/edg-wl-dgas-ATMClient. conf ● ● ● res_acct_PA_id = “hlr 02. to. infn. it: 56567” -- the PA where the resource is registered res_acct_bank_id = “hlr 02. to. infn. it: 56568” – the HLR where the resource is registered economic. Accounting = “no|yes” -- tells if the site manager requires job payment or not. lock. File. Name = “/opt/…/edg-wl-dgas-cliend. lock” -- lock file /opt/edg/etc/edg-wl-dgas-gianduia. conf ● ● lock. File. Name = “/opt/…/edg-wl-dgas-gianduia. lock” – lockfile chocolate. Box = “/opt/…/dgas. Raw. Box” – directory where the JW puts (via a tcp channel) the files needed by gianduia. gianduiotti. Box = “/opt/…/dgas. URBox” – directory where gianduia stores the complete UR for each job. February 24 th 2005 - 23
References ● Further information and documentation about DGAS can be found at: http: //www. to. infn. it/grid/accounting February 24 th 2005 - 24
afefe5475187fb57ca0802c9a75586ee.ppt