[原创]Globus Toolkit网格环境的搭建(一)

最近老师要求我们把机房的网格环境搭起来,方便更高效率进行科学计算的工作,由于我们要跑数据量非常之大,所以并行计算是必不可少的~~~

谈到网格,自然会想到Globus了,所以这些天花了一些时间学习了一下Globus Toolkit,并且在四台机器上做了一下实验,实现了基本的网格job schedule,个人感受是就是Globus Toolkit 的配置过程比较复杂,所以今天写一下Globus Toolkit 配置的详细过程(这篇所配置的是“从机”,“主机”配置流程在接下来的文章中介绍)。

 

Globus官方网站对Globus Toolkit是这样描述的:The Globus® Toolkit is an open source software toolkit used for building grids. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause.

Wiki对Globus Toolkit的描述也很简单:The Globus Toolkit, currently at version 4, is an open source toolkit for building computing grids developed and provided by the Globus Alliance.

 

在配置Globus之前建议你先了解一下Globus的原理和具体框架流程,还有它遵循了哪些标准协议等基础知识,费话就不多说了~~~(以下代码区内是Ubuntu Shell下编辑的,其中有一些注释内容)

“从机“的配置过程:

1.Install Ubuntu(我使用的version是Karmic)

2. Connect to the network (把网络环境和karmic的源配置好,方便接下来所需要其它包的快速安装)

3. Create two users(建立两个账户,使用globus用户与主机建立连接;)

#adduser globus     // use globus create a user at /home/globus
#adduser xsh 

4. Install prerequisites tools (需要一些预装的软件包)

#sudo apt - get install [g ++  sun - java6 - jdk xinetd ant]   // 一个一个的安装
#export JAVA_HOME =/ usr / lib / jvm / java - 6 - sun /


5. Install globus-4.2.0 (下载官网上Latest-stable的version即可,然后配置一下环境变量)

#cp gt4. 2.1 ... - installer.tar.gz  / usr / local /
#cd gt4.
2.1 ... - installer
#.
/ configure
#make
#make install
#chown 
- R globus:globus  / usr / local / globus - 4.2 . 0 /
#export GLOBUS_LOCATION
=/ usr / local / globus - 4.2 . 0
Alternatively add GLOBUS_LOCATION to 
/ etc / profile:
export GLOBUS_LOCATION
=/ usr / local / globus - 4.2 . 0 /
#source 
/ etc / profile


6. Set up Security(配置Globus的授权认证)

#scp  - r node1: / usr / local / globus - 4.2 . 0 / share / certificates $GLOBUS_LOCATION / share
#cp 
/ usr / local / globus - 4.2 . 0 / etc / globus - user - env.sh  / home / a.sh
Create host certificate 
for  node33:
root@node1:
~ #myproxy - admin - addservice  - " nodo33 "   - l node33
root@node33:
~ #source  / etc / profile
#source 
/ home / a.sh
#myproxy
- retrieve  - s node1  - k node33  - l node33
Enter MyProxy pass phrase:
222222
#cd 
/ etc / grid - security /
#cp hostcert.pem containercert.pem
#cp hostkey.pem containerkey.pem
#chown globus:globus container
* .pem
#ls 
- * .pem
If node33 wants to REMOVE :
#myproxy
- destroy  - s  node1  - k node33  - l node33
Create a grid
- mapfile
#gedit grid
- mapfile
" /O=Grid/OU=GlobusTest/OU=simpleCA-node1/CN=xsh "  xsh


7. Set up GridFTP(建立GridFTP,Globus主要使用它进行结点间的通信)

#gedit  / etc / xinetd.d / gridftp     // add thses lines below:
service gsiftp
{
instances                =   100
socket_type              =  stream
wait                     =  no
user                     =  root
env                      +=  GLOBUS_LOCATION =/ usr / local / globus - 4.2 . 0
env                      +=  LD_LIBRARY_PATH =/ usr / local / globus - 4.2 . 0 / lib
server                   =   / usr / local / globus - 4.2 . 0 / sbin / globus - gridftp - server
server_args              =   - i
log_on_success           +=  DURATION
disable                  =  no
}

#gedit  / etc / services
# Local services
myproxy - server   7512 / tcp                        # Myproxy server
gsiftp           2811 / tcp

# / etc / init.d / xinetd reload
#netstat  - an  |  grep  2811
tcp         0        0   0.0 . 0.0 : 2811              0.0 . 0.0 : *                LISTEN  

Begin a test:
#su xsh
#source  / etc / profile
#source  / home / a.sh
#myproxy - logon  - s node1
Enter MyProxy pass phrase:  222222
A credential has been received  for  user xsh in  / tmp / x509up_u1001.
#globus - url - copy gsiftp: // node33/etc/group gsiftp: // node1/tmp/


8. Set up GRAM4(配置GRAM4,对Grid资源进行管理)

#chmod  + / etc / sudoers
#gedit 
/ etc / sudoers     // add these lines below
globus ALL = (GLOBUSUSERS) NOPASSWD:  / usr / local / globus - 4.2 . 0 / libexec / globus - gridmap - and - execute  - / etc / grid - security / grid - mapfile  / usr / local / globus - 4.2 . 0 / libexec / globus - job - manager - script.pl  *
globus  ALL
= (GLOBUSUSERS) NOPASSWD:  / usr / local / globus - 4.2 . 0 / libexec / globus - gridmap - and - execute  - / etc / grid - security / grid - mapfile  / usr / local / globus - 4.2 . 0 / libexec / globus - gram - local - proxy - tool  *
#chmod 
- / etc / sudoers


9. Set up Webservices (最后建立Web服务,这样主机就能调用本机了)

#source  / etc / profile
#source 
/ home / a.sh
#cp 
/ usr / local / globus - 4.2 . 0 / etc / init.d / globus - ws - java - container  / etc / init.d /

#su globus
globus@node33:
~ / etc / init.d / globus - ws - java - container start
globus@node33:
~ / etc / init.d / globus - ws - java - container stop
globus@node33:
~ / etc / init.d / globus - ws - java - container restart


就些从机的所有配置完成,收功!

整个的配置过程我已经写很详细了,想得到更多的信息,还是去Globus的官网GT4.2 Quickstart中看吧,它才是权威啊~

主机的配置过程我会尽快写的

参考网站:

http://www.globus.org/

http://www.cnblogs.com/conanboa 

 

转载于:https://www.cnblogs.com/conanboa/archive/2010/01/16/1649449.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值