#!/bin/bash
#
# VO Definitions for the generator
#
# Usage:
#
# USERS_CONF=<path_to_users.conf>
# GROUPS_CONF=<path_to_groups.conf>
# POOLS_LDIF=<path_to_pools.ldif>
# MKDIR_SCRIPT=<path_to_mkhome.sh>
# MKGMD_SCRIPT=<path_to_mkgmd.sh>
# VOMSMAPFILE=<path_to_voms-grid-mapfile>
# GROUPMAPFILE=<path_to_groupmapfile>
#
# emptyfiles
#
# dpmmgr uid gid home
#
# genuser \
#   USER_UID \
#   USER_GID \
#   USER_NAME \
#   USER_HOME \
#   USER_CN
#
# gengroup \
#   GROUP_GID \
#   GROUP_NAME \
#   GROUP_CN \
#   members...
#
# genmapentries \
#   VOMS \
#   USER \
#   GROUP
#
# genvo \
#   VO_NAME \
#   ID_BASE \
#   HOME_PREFIX \
#   N_POOL \
#   POOL_VOMS \
#   POOL_PREFIX \
#   POOL_GROUP \
#   N_SGM \
#   SGM_VOMS \
#   SGM_PREFIX \
#   SGM_GROUP \
#   N_PRD \
#   PRD_VOMS \
#   PRD_PREFIX \
#   PRD_GROUP \
#   N_PIL \
#   PIL_VOMS \
#   PIL_PREFIX \
#   PIL_GROUP \
#
# genallusersgroup
#   GROUP_GID \
#   GROUP_NAME \
#   GROUP_CN
#
#

BASEDN="dc=cluster,dc=univ,dc=kiev,dc=ua"
USERS_CONF=./users.conf
GROUPS_CONF=./groups.conf
POOLS_LDIF=./pools.ldif
MKDIR_SCRIPT=./mkpool.sh
MKGMD_SCRIPT=./mkgmdir.sh
VOMSMAPFILE=./voms-grid-mapfile
GROUPMAPFILE=./groupmapfile

emptyfiles

#
# ALICE     :: CERN LHC VO
#
genvo	alice		101000		/home/grid/alice/			\
	199	"/alice"			alice		alice		\
	19	"/alice/Role=lcgadmin"		sgmali		alicesgm	\
	49	"/alice/Role=production"	prdali		aliceprd	\
	19	"/alice/Role=pilot"		pilali		alicepil	\

#
# ATLAS     :: CERN LHC VO
#
genvo	atlas		102000		/home/grid/atlas/			\
	199	"/atlas"			atlas		atlas		\
	19	"/atlas/Role=lcgadmin"		sgmatl		atlassgm	\
	49	"/atlas/Role=production"	prdatl		atlasprd	\
	19	"/atlas/Role=pilot"		pilatl		atlaspil	\

#
# CMS       :: CERN LHC VO
#
genvo	cms		103000		/home/grid/cms/				\
	199	"/cms"				cms		cms		\
	19	"/cms/Role=lcgadmin"		sgmcms		cmssgm		\
	49	"/cms/Role=production"		prdcms		cmsprd		\
	19	"/cms/Role=pilot"		pilcms		cmspil		\

#
# LHCB      :: CERN LHC VO
#
genvo	lhcb		104000		/home/grid/lhcb/			\
	199	"/lhcb"				lhcb		lhcb		\
	19	"/lhcb/Role=lcgadmin"		sgmlhb		lhcbsgm		\
	49	"/lhcb/Role=production"		prdlhb		lhcbprd		\
	19	"/lhcb/Role=pilot"		pillhb		lhcbpil		\

#
# DTEAM      :: EGI/WLCG TROUBLESHOOTING
#
genvo	dteam		105000		/home/grid/dteam/			\
	99	"/dteam/*"			dteam		dteam		\

#
# BIOMED     :: EGI HEALTH RESEARCH VO
#
no_vo	biomed		106000		/home/grid/biomed/			\
	49	"/biomed"			bio		biomed		\
	19	"/biomed/Role=lcgadmin"		sgmbio		biomedsgm	\
	19	"/biomed/Role=production"	prdbio		biomedprd	\

#
# OPS        :: EGI/WLCG MONITORING
#
genvo	ops		107000		/home/grid/ops/				\
	49	"/ops/*"			ops		ops		\

genmf		"/ops/Role=pilot"		ops		ops

#
# VIRGO      :: INFN VO
#
no_vo	virgo		107000		/home/grid/virgo/			\
	49	"/virgo"			virgo		virgo		\
	19	"/virgo/Role=SoftwareManager"	sgmvrg		virgosgm	\

#
# UNUSED 108000
#

#
# UNUSED 109000
#

#
# MOLDYNGRID :: UNG VO
#
genvo	moldyngrid	110000		/home/grid/moldyngrid/			\
	99	"/moldyngrid"			mdg		moldyngrid	\
	19	"/moldyngrid/Role=VO-Admin"	sgmmdg		mdgsgm		\
	19	"/moldyngrid/Role=production"	prdmdg		mdgprd		\
	19	"/moldyngrid/Role=pilot"	pilmdg		mdgpil		\

#
# UKRAINE    :: JUNK POOL FOR SMALL UNG VOS
#
genvo	ukraine		111000		/home/grid/ukraine/			\
	199	-				ua		ukraine		\

genmf		"/UATest/*"			ua		ukraine
genmf		"/compuchemgridua/*"		ua		ukraine
genmf		"/matmoden/*"			ua		ukraine
genmf		"/medgrid/*"			ua		ukraine
genmf		"/sysbio/*"			ua		ukraine
genmf		"/ung.infrastructure/*"		ua		ukraine
genmf		"/virgo.ua/*"			ua		ukraine

#
# DESKTOPGRID :: IDGF VO
#
genvo	desktopgrid	112000		/home/grid/desktopgrid/			\
	19	"/desktopgrid.vo.edges-grid.eu"			deskgrid	desktopgrid		\
	5	"/desktopgrid.vo.edges-grid.eu/Role=SGMAdmin"	sgmdeskgrid	desktopgridsgm		\

genmf		"/edgiprod.vo.edgi-grid.eu"			deskgrid	desktopgrid

#
# TESTBED.UNIV :: KNU EDUCATION
#
genvo	testbed		113000		/home/grid/testbed/			\
	199	"/testbed.univ.kiev.ua/*"	tb		testbed		\

#
# NORDUGRID.ORG :: NORDUGRID COLLABORATION VO
#
genvo	nordugrid.org	114000		/home/grid/nordugrid/			\
	19	"/nordugrid.org/*"	ng			nordugrid	\

#
# HEP.ORG.UA :: BITP HEP VO
#
genvo	hep.org.ua	115000		/home/grid/hep.org.ua/			\
	19	"/hep.org.ua"			hepou		hepou		\
	5	"/hep.org.ua/Role=VO-Admin"	sgmhep		hepousgm	\

#
# UNUSED 116000
#

#
# UNUSED 117000
#

#
# NETWORKDYNAMICS :: UNG VO
#
genvo	networkdynamics	118000		/home/grid/networkdynamics/		\
	99	"/networkdynamics"			netdyn		networkdynamics	\
	19	"/networkdynamics/Role=VO-Admin"	sgmnetdyn	netdynsgm	\
	19	"/networkdynamics/Role=production"	prdnetdyn	netdynprd	\
	19	"/networkdynamics/Role=pilot"		pilnetdyn	netdynpil	\

#
# GENERATE 'grid' GROUP WITH ALL USERS
#
genallusersgroup grid 100000 "Grid accounts"

