CE Configurator

Complete: 1

Goals of this page:

Help admins to create Configurator scripts to set their site OSG-CE.

Contents

Customize this configurator script

CE Server Name CE type
Batch
Use GUMS
Use SQUID
Use Glexec
Use SE
Show Storage
Show Network
Show Site Info

A fresh install script should look like this:

#!/bin/bash

touch /var/log/ce-install.log
yum install osg-ca-certs  >> /var/log/ce-install.log 2>&1
yum install osg-ca-certs-updater >> /var/log/ce-install.log 2>&1
yum install osg-ce-condor >> /var/log/ce-install.log 2>&1


#Make sure config templates exists
[ ! -f /etc/osg/config.d/01-squid.ini.template ]&&cp -p /etc/osg/config.d/01-squid.ini /etc/osg/config.d/01-squid.ini.template
[ -f /etc/osg/config.d/10-gateway.ini ]&&[ ! -f /etc/osg/config.d/10-gateway.ini.template ]&&cp -p /etc/osg/config.d/10-gateway.ini /etc/osg/config.d/10-gateway.ini.template
[ ! -f /etc/osg/config.d/10-misc.ini.template ]&&cp -p /etc/osg/config.d/10-misc.ini /etc/osg/config.d/10-misc.ini.template
[ ! -f /etc/osg/config.d/10-storage.ini.template ]&&cp -p /etc/osg/config.d/10-storage.ini /etc/osg/config.d/10-storage.ini.template
[ -f /etc/osg/config.d/20-condor.ini ]&&[ ! -f /etc/osg/config.d/20-condor.ini.template ]&&cp -p /etc/osg/config.d/20-condor.ini /etc/osg/config.d/20-condor.ini.template
[ ! -f /etc/osg/config.d/30-gip.ini.template ]&&cp -p /etc/osg/config.d/30-gip.ini /etc/osg/config.d/30-gip.ini.template
[ ! -f /etc/osg/config.d/40-network.ini.template ]&&cp -p /etc/osg/config.d/40-network.ini /etc/osg/config.d/40-network.ini.template
[ ! -f /etc/osg/config.d/40-siteinfo.ini.template ]&&cp -p /etc/osg/config.d/40-siteinfo.ini /etc/osg/config.d/40-siteinfo.ini.template

#In case OSG repo is disabled make sure we still update osg-ca-certs
[ ! -f /root/osg-ca-certs-updater.template ]&&cp -p /etc/cron.d/osg-ca-certs-updater /root/osg-ca-certs-updater.template
sed -i -e "s#osg-ca-certs-updater -a#osg-ca-certs-updater --enablerepo=osg -a#" /etc/cron.d/osg-ca-certs-updater

The CE-configurator script is like this:

#!/bin/bash

#begin config /etc/osg/config.d/01-squid.ini
/bin/cp -f /etc/osg/config.d/01-squid.ini.template  /etc/osg/config.d/01-squid.ini
sed -i -e "s@enabled = True@enabled = False@"  /etc/osg/config.d/01-squid.ini
sed -i -e "s@location = @location = UNAVAILABLE@" /etc/osg/config.d/01-squid.ini
#end config /etc/osg/config.d/01-squid.ini

#begin config /etc/osg/config.d/10-gateway.ini
/bin/cp -f /etc/osg/config.d/10-gateway.ini.template /etc/osg/config.d/10-gateway.ini
#end config /etc/osg/config.d/10-gateway.ini

#begin config /etc/osg/config.d/10-misc.ini
/bin/cp -f /etc/osg/config.d/10-misc.ini.template /etc/osg/config.d/10-misc.ini
#end config /etc/osg/config.d/10-misc.ini

#begin config /etc/osg/config.d/10-storage.ini
/bin/cp -f /etc/osg/config.d/10-storage.ini.template /etc/osg/config.d/10-storage.ini
#end config /etc/osg/config.d/10-storage.ini

#begin config /etc/osg/config.d/20-condor.ini
/bin/cp -f /etc/osg/config.d/20-condor.ini.template /etc/osg/config.d/20-condor.ini
sed -i -e "s@enabled = FALSE@enabled = TRUE@" /etc/osg/config.d/20-condor.ini
sed -i -e "s@job_contact = host.name/jobmanager-condor@job_contact = myce.server.name/jobmanager-condor@"  /etc/osg/config.d/20-condor.ini
sed -i -e "s@util_contact = host.name/jobmanager@util_contact = myce.server.name/jobmanager@"  /etc/osg/config.d/20-condor.ini
#end config /etc/osg/config.d/20-condor.ini

#begin config /etc/osg/config.d/30-gip.ini
/bin/cp -f /etc/osg/config.d/30-gip.ini.template /etc/osg/config.d/30-gip.ini
sed -i -e "s@batch = DEFAULT@batch = condor@" /etc/osg/config.d/30-gip.ini
#end config /etc/osg/config.d/30-gip.ini

#begin config /etc/osg/config.d/40-network.ini
/bin/cp -f /etc/osg/config.d/40-network.ini.template /etc/osg/config.d/40-network.ini
sed -i -e "s@source_range = UNAVAILABLE@source_range = 20000,25000@" /etc/osg/config.d/40-network.ini
sed -i -e "s@port_range = UNAVAILABLE@port_range = 20000,25000@" /etc/osg/config.d/40-network.ini
sed -i -e "s@port_state_file = UNAVAILABLE@port_state_file = /var/tmp/globus-port-state.log@" /etc/osg/config.d/40-network.ini
#end config /etc/osg/config.d/40-network.ini

#begin config /etc/osg/config.d/40-siteinfo.ini
/bin/cp -f /etc/osg/config.d/40-siteinfo.ini.template /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@host_name = UNAVAILABLE@host_name = myce.server.name@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@resource = UNAVAILABLE@resource = registered-oim-resource-name@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@resource_group = UNAVAILABLE@resource_group = registered-oim-resource-group@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@sponsor = UNAVAILABLE@sponsor = uscms@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@site_policy = UNAVAILABLE@site_policy = http://institution.site/Policy.html@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@contact = UNAVAILABLE@contact = Site admin Name@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s/email = UNAVAILABLE/email = myemail@my.institution/" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@city = UNAVAILABLE@city = mycity@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@country = UNAVAILABLE@country = US@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@longitude = UNAVAILABLE@longitude = -45@" /etc/osg/config.d/40-siteinfo.ini
sed -i -e "s@latitude = UNAVAILABLE@latitude = 45@" /etc/osg/config.d/40-siteinfo.ini
#end config /etc/osg/config.d/40-siteinfo.ini

-- Juan Eduardo Ramirez - 2016-05-17


This topic: CMSPublic > ComputeElementConfigurator
Topic revision: r5 - 2016-05-20 - eduardo
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback