New configurations
authorZdeněk Šustr <sustr4@cesnet.cz>
Tue, 5 Oct 2010 14:12:02 +0000 (14:12 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Tue, 5 Oct 2010 14:12:02 +0000 (14:12 +0000)
org.glite.px.myproxy-yaim/config/functions/config_gip_px [new file with mode: 0755]
org.glite.px.myproxy-yaim/config/functions/config_info_service_px [new file with mode: 0644]
org.glite.px.myproxy-yaim/config/functions/config_proxy_server [new file with mode: 0644]
org.glite.px.myproxy-yaim/config/man/myproxy-yaim.1 [new file with mode: 0644]
org.glite.px.myproxy-yaim/config/node-info.d/glite-px [new file with mode: 0644]
org.glite.px.myproxy-yaim/config/node-info.d/glite-px_30 [new file with mode: 0644]
org.glite.px.myproxy-yaim/config/services/glite-px [new file with mode: 0644]

diff --git a/org.glite.px.myproxy-yaim/config/functions/config_gip_px b/org.glite.px.myproxy-yaim/config/functions/config_gip_px
new file mode 100755 (executable)
index 0000000..e7f49e8
--- /dev/null
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        config_gip_px
+#
+# DESCRIPTION : This function configures the generic information providor (GIP)
+#               for MyProxy (PX) node.
+#
+# AUTHORS :     Shu-Ting.Liao@cern.ch
+#               
+# NOTES :       The config_gip_<node_type> function creates the ldif file. 
+#               This is currently done by the function config_info_service_<node_type>.
+#               This function is still included in the function list for cleaning tasks. 
+#               
+#
+# YAIM MODULE:  glite-yaim-myproxy
+#
+##############################################################################
+config_gip_px_check () {
+   yaimlog DEBUG "This function currently doesn't set any environment variables."
+}
+
+config_gip_px_setenv () {
+   yaimlog DEBUG "This function currently doesn't set any environment variables."
+}
+
+config_gip_px () {
+
+CONF_DIR="$INSTALL_ROOT/glite/var/tmp/gip"
+LDIF_DIR="${INSTALL_ROOT}/glite/etc/gip/ldif"
+
+rm -rf ${CONF_DIR}/glite-info-static-px.conf
+rm -rf ${LDIF_DIR}/static-file-PX.ldif
+
+return 0
+
+}
diff --git a/org.glite.px.myproxy-yaim/config/functions/config_info_service_px b/org.glite.px.myproxy-yaim/config/functions/config_info_service_px
new file mode 100644 (file)
index 0000000..06725d6
--- /dev/null
@@ -0,0 +1,88 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        config_info_service_px
+#
+# DESCRIPTION : This function configures the dynamic service publisher
+#               for MyProxy (PX) node.
+#
+# AUTHORS :     Maria.Alandes.Pradillo@cern.ch
+#               
+# NOTES :       
+#
+# YAIM MODULE:  glite-yaim-myproxy
+#
+##############################################################################
+
+config_info_service_px_check () {
+       requires $1 SITE_NAME INSTALL_ROOT PX_HOST
+}
+
+config_info_service_px_setenv () {
+       yaimlog DEBUG "This function currently doesn't set any environment variables."
+}
+
+config_info_service_px () {
+
+INFO_SERVICE_CONFIG=${INFO_SERVICE_CONFIG:-${INSTALL_ROOT}/glite/etc}
+INFO_SERVICE_SCRIPT=${INFO_SERVICE_SCRIPT:-${INSTALL_ROOT}/glite/libexec}
+INFO_PROVIDER_PATH=${INFO_PROVIDER_PATH:-${INSTALL_ROOT}/glite/etc/gip/provider}
+
+SERVICE=MYPROXY
+SERVICE_HOST=${PX_HOST}
+
+SERVICE_LC=`echo ${SERVICE} | tr '[:upper:]' '[:lower:]'`
+
+if [ ! -f ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf.template ]; then
+  yaimlog ERROR "The template file for glite-info-service-${SERVICE_LC}.conf.template was not found in ${INFO_SERVICE_CONFIG}."
+  exit 1
+fi
+
+if [ ! -f ${INFO_SERVICE_SCRIPT}/glite-info-service ]; then
+  yaimlog ERROR "The script file for glite-info-service was not found in ${INFO_SERVICE_SCRIPT}."
+  exit 1
+fi
+
+yaimlog DEBUG "Delete a previous version of the glite-info-service-${SERVICE_LC}.conf if it exists"
+rm -rf ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf
+
+yaimlog DEBUG "Create the glite-info-service-${SERVICE_LC}.conf file out of the template file"
+cp ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf.template ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf
+
+# Note: the configuration file may need to be altered if non standard values have been used. 
+
+yaimlog DEBUG "Delete a previous version of the glite-info-provider-service-${SERVICE_LC}-wrapper if it exists"
+rm -rf ${INFO_PROVIDER_PATH}/glite-info-provider-service-${SERVICE_LC}-wrapper
+
+yaimlog DEBUG "Create the ${INFO_PROVIDER_PATH} in case it doesn't exist"
+mkdir -p ${INFO_PROVIDER_PATH} 
+
+yaimlog DEBUG "Create the glite-info-provider-service-${SERVICE_LC}-wrapper file"
+cat << EOF > ${INFO_PROVIDER_PATH}/glite-info-provider-service-${SERVICE_LC}-wrapper
+#!/bin/sh
+export PATH=$PATH:${INFO_SERVICE_SCRIPT}
+export ${SERVICE}_HOST=${SERVICE_HOST}
+${INFO_SERVICE_SCRIPT}/glite-info-service ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf $SITE_NAME
+EOF
+
+chmod +x ${INFO_PROVIDER_PATH}/glite-info-provider-service-${SERVICE_LC}-wrapper 
+  
+return 0
+
+}
diff --git a/org.glite.px.myproxy-yaim/config/functions/config_proxy_server b/org.glite.px.myproxy-yaim/config/functions/config_proxy_server
new file mode 100644 (file)
index 0000000..eb6a60b
--- /dev/null
@@ -0,0 +1,132 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004. 
+# See http://www.eu-egee.org/partners/ for details on the copyright 
+# holders.  
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); 
+# you may not use this file except in compliance with the License. 
+# You may obtain a copy of the License at 
+#
+#    http://www.apache.org/licenses/LICENSE-2.0 
+#
+# Unless required by applicable law or agreed to in writing, software 
+# distributed under the License is distributed on an "AS IS" BASIS, 
+# WITHOUT WARRANTIES OR CONDITIONS 
+# OF ANY KIND, either express or implied. 
+# See the License for the specific language governing permissions and 
+# limitations under the License.
+##############################################################################
+#
+# NAME :        config_proxy_server
+#
+# DESCRIPTION : This function configures the 3.0 proxy server.
+#
+# AUTHORS :     Robert.Harakaly@cern.ch
+#
+# NOTES :      
+#
+# YAIM MODULE:  glite-yaim-myproxy
+# UPDATES:      Ulrich.Schwickerath@cern.ch, Steve.Traylen@cern.ch
+#                 
+##############################################################################
+#
+# 21/05/2008 US,ML  rewrite to support more configuration options
+#
+
+config_proxy_server_check () {
+
+requires $1 BDII_USER BDII_GROUP BDII_HOME_DIR X509_HOST_CERT X509_HOST_KEY
+return $?
+
+}
+
+config_proxy_server_setenv () {
+
+return 0
+
+}
+
+config_proxy_server () {
+
+# Fix for bug 54094: BDII_USER needs copies of host cert and key
+mkdir -p ${BDII_HOME_DIR}/.globus
+cp ${X509_HOST_CERT} ${BDII_HOME_DIR}/.globus/usercert.pem 
+cp ${X509_HOST_KEY} ${BDII_HOME_DIR}/.globus/userkey.pem 
+chown -R ${BDII_USER}.${BDII_GROUP} ${BDII_HOME_DIR}/.globus 
+
+
+MYPROXY_CONF=${INSTALL_ROOT}/glite/etc/myproxy-server.conf
+MYPROXY_CONF_NEW=${INSTALL_ROOT}/glite/etc/myproxy-server.conf_NEW
+
+
+# Special case where we are upgrading from the old style configuration.
+# with a configuration file myproxy-server.config file.
+pgrep -lf myproxy-server.config 2>&1 > /dev/null
+if [ $? = "0" ] ; then
+   yaimlog INFO "MyProxy Running with old style configuration, stopping"
+   /sbin/service myproxy stop
+fi
+
+
+yaimlog DEBUG "Creating Minimal myproxy configuration."
+cat <<EOF > $MYPROXY_CONF_NEW
+# YAIM generated configuration file for MyProxy
+#
+# We allow anyone to use this service. They are checked against the
+# installed CAs anyway.
+# 
+accepted_credentials "*"
+
+EOF
+
+if [ "x$GRID_TRUSTED_BROKERS" != "x" ] ; then
+  yaimlog WARNING "Use of GRID_TRUSTED_BROKERS is deprecated in YAIM, use GRID_AUTHORIZED_RENEWERS"   
+  echo "# Adding GRID_TRUSTED_BROKERS as authorized_renewers - Deprecated" >> $MYPROXY_CONF_NEW
+  split_quoted_variable $GRID_TRUSTED_BROKERS | while read x; do
+      test "x$x" != "x" && echo "authorized_renewers \"$x\"" >> $MYPROXY_CONF_NEW
+  done
+  echo "" >> $MYPROXY_CONF_NEW
+fi
+
+for VALUE in GRID_AUTHORIZED_RENEWERS       GRID_DEFAULT_RENEWERS \
+             GRID_AUTHORIZED_RETRIEVERS     GRID_DEFAULT_RETRIEVERS \
+             GRID_AUTHORIZED_KEY_RETRIEVERS GRID_DEFAULT_KEY_RETRIEVERS \
+             GRID_TRUSTED_RETRIEVERS        GRID_DEFAULT_TRUSTED_RETRIEVERS 
+
+do
+    KEY=`echo $VALUE | sed 's/^GRID_//' | tr "[:upper:]" "[:lower:]"`
+    echo "#Adding YAIM value $VALUE if any as $KEY values" >> $MYPROXY_CONF_NEW
+    split_quoted_variable ${!VALUE} | while read x; do
+        test "x$x" != "x" && echo "$KEY \"$x\"" >> $MYPROXY_CONF_NEW
+    done
+    echo "" >> $MYPROXY_CONF_NEW
+done
+
+/sbin/chkconfig --add myproxy 
+
+#
+# check if the configuration changed and reload/replace only if necessary
+#
+
+[ -f $MYPROXY_CONF ] && diff $MYPROXY_CONF_NEW $MYPROXY_CONF 2>&1 > /dev/null
+rc=$?
+
+if [ $rc == 0 ]; then
+  yaimlog INFO "MyProxy server configuration unchanged"
+  rm -f  $MYPROXY_CONF_NEW
+else
+  yaimlog INFO "Reloading MyProxy server"
+  mv $MYPROXY_CONF_NEW $MYPROXY_CONF
+  /etc/init.d/myproxy reload < /dev/null
+fi
+
+/etc/init.d/myproxy status 2>&1 > /dev/null
+if [ $? != "0" ] ; then
+  yaimlog INFO "MyProxy server not running so starting"
+  /etc/init.d/myproxy start
+fi
+
+
+
+return 0
+}
diff --git a/org.glite.px.myproxy-yaim/config/man/myproxy-yaim.1 b/org.glite.px.myproxy-yaim/config/man/myproxy-yaim.1
new file mode 100644 (file)
index 0000000..e8b3824
--- /dev/null
@@ -0,0 +1,86 @@
+.TH "YAIM - Yet Another Installation Manager" 1
+.SH NAME
+yaim \- YAIM (YAIM Aint an Installation Manager) is, as the name suggests, a way of configuring Grid Services. 
+The aim of YAIM is to provide a simple installation and configuration method that can be used to set up a simple Grid Site 
+but can be easily adapted and extended to meet the need of larger sites. The yaim-myproxy module is configuring the MyProxy server.
+
+.SH DESCRIPTION
+The yaim-myproxy module allows you to configure the MyProxy server.
+
+.SH CONFIGURATION VARIABLES
+This is the list of variables needed to set up in order to configure the MyProxy server.
+.TP
+For more details, please check:
+.TP 
+.B  https://twiki.cern.ch/twiki/bin/view/LCG/PX_configuration_variables
+.TP
+.B Mandatory Variables: 
+Site admins must ensure these variables are properly defined according to the features of the site
+.TP
+site-info.def variables: These variables are defined in /opt/glite/yaim/examples/site-info.def. 
+.TP
+INSTALL_ROOT : Installation root - change if using the re-locatable distribution. 
+.TP
+SITE_NAME : The GIIS of the site where the MyProxy server belongs to. 
+.TP
+GLOBUS_TCP_PORT_RANGE: Port range for Globus IO. It should be specified as "num1,num2". YAIM automatically handles the syntax of this variable depending on the version of VDT. If it's VDT 1.6 it leaves "num1,num2". If it's a version < VDT 1.6 it changes to "num1 num2". 
+.TP
+.TP
+node specific variables: These variables are defined in /opt/glite/yaim/examples/services/glite-px.
+.TP
+GRID_TRUSTED_BROKERS : List of the DNs of the Resource Brokers host certificates which are trusted by the Proxy node. (ex: /O=Grid/O=CERN/OU=cern.ch/CN=host/testbed013.cern.ch). Now deprecated, use GRID_DEFAULT_RENEWERS instead.
+.TP
+GRID_AUTHORIZED_RENEWERS : List of authorized_renewrs.       
+.TP
+GRID_DEFAULT_RENEWERS : List of default_renewers
+.TP
+GRID_AUTHORIZED_RETRIEVERS : List of authorized_retrievers.
+.TP
+GRID_DEFAULT_RETRIEVERS : List of default_retrievers.
+.TP
+GRID_AUTHORIZED_KEY_RETRIEVERS : List of authorized_key_retrievers.
+.TP
+GRID_DEFAULT_KEY_RETRIEVERS  : List default_key_retrievers.
+.TP
+GRID_TRUSTED_RETRIEVERS : List of trusted_retrievers.
+.TP
+GRID_DEFAULT_TRUSTED_RETRIEVERS List of default_trusted_retrievers.
+.TP
+
+.SH EXAMPLES
+How to configure the Myproxy node.
+.TP
+.B ./yaim -c -s /root/site-info.def -n glite-PX
+.TP
+To debug the configuration process:
+.TP
+.B ./yaim -c -s /root/site-info.def -n glite-PX -d 6 
+
+.SH DOCUMENTATION
+You can find useful information on these web pages:
+.TP
+Entry point for YAIM documentation:
+.TP
+.B  https://twiki.cern.ch/twiki/bin/view/EGEE/YAIM
+.TP
+The Generic Installation and Configuration guides as well as the YAIM guides:
+.TP
+.B https://twiki.cern.ch/twiki/bin/view/LCG/LcgDocs
+.TP
+Useful links:
+.TP
+.B  http://lcg.web.cern.ch/LCG/Sites/the-LCG-directory.html
+
+.SH AUTHORS
+YAIM is a collaborative project where different modules are developed and maintened by different 
+groups. Here are some of the present contributors:
+.TP
+.B Maria Allandes Pradillo, Gergely Debreczeni, Laurence Field, \
+Di Qing, Andreas Unterkircher, Oliver Keeble, Steve Traylen, Owen Synge, Gavin Mccance , Maarten Litmaath, \
+and we are happy to receive patches from everybody !
+
+.SH CONTACT
+To contact YAIM people use the 
+.B yaim-contact@cern.ch 
+email address. 
+
diff --git a/org.glite.px.myproxy-yaim/config/node-info.d/glite-px b/org.glite.px.myproxy-yaim/config/node-info.d/glite-px
new file mode 100644 (file)
index 0000000..8230ef9
--- /dev/null
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS
+# OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        glite-px
+#
+# DESCRIPTION : This function contains the function list that configures the 3.1 proxy server.
+#
+# AUTHORS :     Shu-Ting.Liao@cern.ch
+#
+# NOTES :
+#
+# YAIM MODULE:  glite-yaim-myproxy
+#
+##############################################################################
+
+PX_FUNCTIONS="
+config_crl
+config_host_certs
+config_edgusers
+config_gip_only
+config_gip_px
+config_gip_service_release
+config_globus_clients
+config_proxy_server
+config_bdii_only
+config_info_service_px
+"
+
+
diff --git a/org.glite.px.myproxy-yaim/config/node-info.d/glite-px_30 b/org.glite.px.myproxy-yaim/config/node-info.d/glite-px_30
new file mode 100644 (file)
index 0000000..260ce8f
--- /dev/null
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS
+# OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        glite-px
+#
+# DESCRIPTION : This function contains the function list that configures the 3.0 proxy server.
+#
+# AUTHORS :     Robert.Harakaly@cern.ch
+#
+# NOTES :
+#
+# YAIM MODULE:  glite-yaim-myproxy
+#
+##############################################################################
+
+BASE1_FUNCTIONS="
+config_ldconf
+config_sysconfig_edg
+config_sysconfig_globus
+config_sysconfig_lcg
+config_crl
+config_rfio"
+
+PX_FUNCTIONS="${BASE1_FUNCTIONS}
+config_host_certs
+config_edgusers
+config_java
+config_rgma_client
+config_gip
+config_globus
+config_proxy_server"
+
diff --git a/org.glite.px.myproxy-yaim/config/services/glite-px b/org.glite.px.myproxy-yaim/config/services/glite-px
new file mode 100644 (file)
index 0000000..cd80a88
--- /dev/null
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS
+# OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        glite-px
+#
+# DESCRIPTION : This configuration file contains the list of variables needed
+#               to configure Myproxy together with site-info.def.
+#
+# AUTHORS :     yaim-contact@cern.ch
+#
+# NOTES :
+#
+# YAIM MODULE:  glite-yaim-myproxy
+#
+##############################################################################
+
+# GRID_TRUSTED_BROKERS: DNs of services (RBs) allowed to renew/retrives
+# credentials from/at the myproxy server. Put single quotes around each trusted DN !!!
+
+# Deprecated
+#GRID_TRUSTED_BROKERS="
+#'broker one'
+#'broker two'
+#"
+
+
+GRID_AUTHORIZED_RENEWERS=${GRID_AUTHORIZED_RENEWERS:-""}
+# WMS has traditionally used this next one.
+GRID_DEFAULT_RENEWERS=${GRID_DEFAULT_RENEWERS:-""}
+GRID_AUTHORIZED_RETRIEVERS=${GRID_AUTHORIZED_RETRIEVERS:-""}
+GRID_DEFAULT_RETRIEVERS=${GRID_DEFAULT_RETRIEVERS:-""}
+GRID_AUTHORIZED_KEY_RETRIEVERS=${GRID_AUTHORIZED_KEY_RETRIEVERS:-""}
+GRID_DEFAULT_KEY_RETRIEVERS=${GRID_DEFAULT_KEY_RETRIEVERS:-""}
+
+# This is what NCG nagios solution  uses this next one.
+GRID_TRUSTED_RETRIEVERS=${GRID_TRUSTED_RETRIEVERS:-""}
+GRID_DEFAULT_TRUSTED_RETRIEVERS=${GRID_DEFAULT_TRUSTED_RETRIEVERS:-""}
+
+