Permalink
Browse files

[config-glite] No site dependent...

  • Loading branch information...
1 parent 2c080c9 commit d56d3617afcb9842462180a13d6c597362af87d7 @sbadia committed Mar 6, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 config-glite.rb
View
9 config-glite.rb
@@ -35,7 +35,7 @@
DIR = File.expand_path(File.dirname(__FILE__))
OUT = "> /dev/null 2>&1"
NAME = "config-glite"
-
+SITE = %x{hostname --fqdn}.chomp.split('.')[1]
if ARGV.length < 1
@@ -291,7 +291,8 @@ def queue_config(sname, wn)
$nodes.each do |node|
session.use "root@#{node}"
end
- session.exec("mkdir -p /root/yaim && mkdir -p /opt/glite/yaim/etc && cd /etc/yum.repos.d/ && rm -rf dag.repo* glite-* lcg-* && wget http://public.nancy.grid5000.fr/~sbadia/glite/repo.tgz -q && tar xzf repo.tgz && mv -f repo/* ./ && rm -rf repo* && rm -f adobe.repo && yum update -q -y #{OUT} && sed -e 's/keepcache=0/keepcache=1/' -i /etc/yum.conf && cd /opt/glite/yaim/etc/ && wget http://public.nancy.grid5000.fr/#{ENV['USER']}/#{NAME}-42.tgz -q && tar xzf #{NAME}-42.tgz && rm -rf #{NAME}-42.tgz")
+ session.exec("mkdir -p /root/yaim; mkdir -p /opt/glite/yaim/etc; cd /etc/yum.repos.d/ && rm -rf dag.repo* glite-* lcg-*; wget http://public.nancy.grid5000.fr/~sbadia/glite/repo.tgz -q && tar xzf repo.tgz && mv -f repo/* ./ && rm -rf repo* && rm -f adobe.repo && yum update -q -y #{OUT} && sed -e 's/keepcache=0/keepcache=1/' -i /etc/yum.conf && cd /opt/glite/yaim/etc/ && wget http://public.#{SITE}.grid5000.fr/~#{ENV['USER']}/#{NAME}-42.tgz -q && tar xzf #{NAME}-42.tgz && rm -rf #{NAME}-42.tgz")
+ # FIXME (ugly hack for ssh keys (sbadia key dependent...))
session.exec("cd /root/ && wget http://public.nancy.grid5000.fr/~sbadia/glite/scp-ssh.tgz -q && tar xzf scp-ssh.tgz && chown -R root:root /root/.ssh/")
session.loop
end
@@ -430,10 +431,10 @@ def queue_config(sname, wn)
puts "\033[1;36m###\033[0m {#{time_elapsed}} -- gLite install finished"
system("cat #{ARGV[0]}")
puts "\033[1;36m###\033[0m {#{time_elapsed / 60} min}"
- system("rm -rf ~/public/#{NAME}-42.tgz")
+ #system("rm -rf ~/public/#{NAME}-42.tgz")
system("ssh root@#{$my_voms} -o BatchMode=yes 'mv -f /opt/glite/yaim/etc/conf/yaim/server.xml /etc/tomcat/server.xml'")
system("ssh root@#{$my_voms} -o BatchMode=yes '/etc/init.d/tomcat restart #{OUT}'")
- system("ssh root@#{$my_voms} -o BatchMode=yes '/opt/glite/sbin/voms-db-deploy.py add-admin --vo grid5000 --dn '/O=VOMS/O=System/CN=Unauthenticated Client' --ca '/O=VOMS/O=System/CN=Dummy Certificate Authority' --email #{ENV['USER']}@fnancy.nancy.grid5000.fr #{OUT}'")
+ system("ssh root@#{$my_voms} -o BatchMode=yes '/opt/glite/sbin/voms-db-deploy.py add-admin --vo grid5000 --dn '/O=VOMS/O=System/CN=Unauthenticated Client' --ca '/O=VOMS/O=System/CN=Dummy Certificate Authority' --email #{ENV['USER']}@f#{SITE}.#{SITE}.grid5000.fr #{OUT}'")
else
puts "\033[1;31m==> No install\033[0m"
end

0 comments on commit d56d361

Please sign in to comment.