QueryingBDII: Difference between revisions

From T2B Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 43: Line 43:
<pre>
<pre>
ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d: -f1 | tr -d '# ' | sort | uniq
ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d: -f1 | tr -d '# ' | sort | uniq
</pre>
=== List of sites having a CE supporting a given VO ===
Example for beapps :
<pre>
ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d, -f2 | sort | uniq
</pre>
=== List of sites exposing cloud IaaS resources ===
(Found [https://wiki.egi.eu/wiki/FAQ10_EGI_Federated_Cloud_User#How_can_I_get_the_list_of_the_FedCloud_sites.3F here])
<pre>
ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2GroupID=grid,o=glue "GLUE2ServiceType=IaaS" | grep GLUE2ServiceAdminDomainForeignKey
</pre>
=== Get the OCCI endpoint to access the cloud of a given site ===
<pre>
ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2DomainID=<site_name>,GLUE2GroupID=grid,o=glue GLUE2EndpointInterfaceName=OCCI | grep GLUE2EndpointURL
</pre>
</pre>

Latest revision as of 15:37, 8 November 2016

What you will find on this page

Some useful commands, mainly based on ldapsearch, to extract meaningful information from BDII.

Some useful links to documentation

https://wiki.egi.eu/wiki/USG_Using_LDAP_Search

http://gridinfo.web.cern.ch/developers/resource-bdii

https://wiki.egi.eu/wiki/FAQ10_EGI_Federated_Cloud_User#Site_information

Useful commands

Get the list of top-bdii's

lcg-infosites --vo all bdii_top

Get the list of VOs supported by the CEs from a given country

Example for UK :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEUniqueID=*.ac.uk*))" | grep "GlueCEAccessControlBaseRule: VO:" | sort | uniq | cut -d: -f3

List of CEs from a given country

Example for UK :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(GlueCEUniqueID=*.ac.uk*)" GlueCEInfoHostName | grep GlueCEInfoHostName: | sort | uniq | cut -d: -f2

List of all sites that have a CE

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(objectclass=GlueCE)" dn | egrep -e "^#(.*), local, grid$" | cut -d, -f 2 | sort | uniq

List of CEs of a given site

Example for BEgrid-ULB-VUB :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(objectclass=GlueCE)" dn | egrep -e "^#(.*), local, grid$" | grep BEgrid-ULB-VUB | cut -d: -f1 | tr -d '# ' | sort | uniq

List of CEs supporting a given VO

Example for beapps :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d: -f1 | tr -d '# ' | sort | uniq

List of sites having a CE supporting a given VO

Example for beapps :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d, -f2 | sort | uniq

List of sites exposing cloud IaaS resources

(Found here)

ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2GroupID=grid,o=glue "GLUE2ServiceType=IaaS" | grep GLUE2ServiceAdminDomainForeignKey

Get the OCCI endpoint to access the cloud of a given site

ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2DomainID=<site_name>,GLUE2GroupID=grid,o=glue GLUE2EndpointInterfaceName=OCCI | grep GLUE2EndpointURL