Install VOMS server for testing
authorZdeněk Šustr <sustr4@cesnet.cz>
Tue, 15 Nov 2011 14:51:59 +0000 (14:51 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Tue, 15 Nov 2011 14:51:59 +0000 (14:51 +0000)
org.glite.testsuites.ctb/PX/tests/px-common-testbeds.sh

index 674a681..eeb6143 100755 (executable)
@@ -74,6 +74,56 @@ else
         fi
 fi
 
+
+rpm -Uvhi http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
+yum install -y yum-priorities yum-protectbase
+rpm -i http://emisoft.web.cern.ch/emisoft/dist/EMI/1/sl5/x86_64/base/emi-release-1.0.0-1.sl5.noarch.rpm
+
+
+yum install -y emi-voms-mysql
+yum install -y xml-commons-apis
+
+service mysqld start
+
+/usr/bin/mysqladmin -u root password [Edited];
+
+mysql --user=root --password=[Edited] -e "grant all on *.* to 'root'@'\`hostname\`' identified by '[Edited]';"
+mysql --user=root --password=[Edited] -e "grant all on *.* to 'root'@'\`hostname -f\`' identified by '[Edited]';"
+
+cd
+mkdir yaim
+cd yaim
+mkdir services
+
+cat << EOF > site-info.def
+MYSQL_PASSWORD="[Edited]"
+SITE_NAME="\`hostname -f\`"
+VOS="vo.org"
+EOF
+
+cat << EOF > services/glite-voms
+# VOMS server hostname
+VOMS_HOST=\`hostname -f\`
+VOMS_DB_HOST='localhost'
+
+VO_VO_ORG_VOMS_PORT=15000
+VO_VO_ORG_VOMS_DB_USER=cert_mysql_user
+VO_VO_ORG_VOMS_DB_PASS="[Edited]"
+VO_VO_ORG_VOMS_DB_NAME=voms_cert_mysql_db
+
+VOMS_ADMIN_SMTP_HOST=[Edited]
+VOMS_ADMIN_MAIL=[Edited]
+EOF
+
+sed -i 's/155/255/g' /opt/glite/yaim/examples/edgusers.conf
+sed -i 's/156/256/g' /opt/glite/yaim/examples/edgusers.conf
+
+/opt/glite/yaim/bin/yaim -c -s site-info.def -n VOMS
+
+source /etc/profile.d/grid-env.sh
+
+voms-admin --nousercert --vo vo.org create-user "/C=UG/L=Tropic/O=Utopia/OU=Relaxation/CN=glite" "/C=UG/L=Tropic/O=Utopia/OU=Relaxation/CN=the trusted CA" "glite" "root@`hostname -f`"
+
 echo cd > arrange_px_test_user.sh
 echo export PXTSTCOLS=\$PXTSTCOLS >> arrange_px_test_user.sh
 echo 'export GLITE_MYSQL_ROOT_PASSWORD="[Edited]"' >> arrange_px_test_user.sh