IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope:Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  Grid computing  >

协调网格任务 -- 既非盛宴,也无饥荒

使用 IBM Tivoli Intelligent Orchestrator 为网格增加或减少服务器

developerWorks


清单 1. 分配 DataSynapse 服务器工作流

##################################################################################
#                                                                                #
# DataSynapse AddServer:                                                         #
#                                                                                #
# Add a DataSynapse Server to a cluster                                          #
#                                                                                #
# Inputs:                                                                        #
#   ClusterID - The id of the cluster to which the server is to be added         #
#   ServerID  - The server which will be added to the cluster (can be null)      #
#                                                                                #
# Outputs:                                                                       #
#   ServerID - The server which has been added to the cluster                    #
#                                                                                #
##################################################################################
workflow DataSynapse_AddServer(in ClusterID, inout ServerID) implements Cluster.AddServer LocaleInsensitive 
##################################################################################
# Variable Definitions                                                           #
#                                                                                #
# Directorvar - The name of the Datasynapse director variable defined in the DCM #
# Poolid      - The Pool associated with the Cluster                             #
# Requestid   - The id Orchestrator associated with this request                 #
# ReturnCode  - The Return code from the DataSynapse_Start command               #
# DirectorID  - The  name of the Datasynapse director this engine will access    #
#                                                                                #
##################################################################################
  var Poolid
  var Requestid
  var ReturnCode
  var Directorvar = "Director"
  var DirectorID
  # Get The request ID (Needed by the RM calls)
  Get_Current_Deployment_Request_Id(Requestid)
  # Use Get_Cluster_Attributes to retrieve the Pool associated with this cluster
  Get_Cluster_Attributes(<null>, <null>, ClusterID, <null>, <null>, <null>,
   <null>, <null>, <null>, <null>, Poolid, <null>, <null>,
 <null>, <null>, <null>)
  # Get a server from the free pool
  My_Allocate_Server(ClusterID, Poolid, Requestid, ServerID)
  # Find the name of the DataSynapse Director that this server will use when starting	
  Get_DCM_Property(<null>, ClusterID, Directorvar, DirectorID)
  try
  	# Start the DataSynapse Engine Daemon on the server
  	DataSynapse_Start(ServerID, DirectorID, ReturnCode)
    RM_Add_Server(ClusterID, Requestid, ServerID)
  catch DataSynapseError msg
  	# The DataSynapse_Start threw an error got to find another server
    DataSynapse_AddServer(ClusterID,ServerID)
  endtry

返回文章。

    关于 IBM 隐私条约 联系 IBM 使用条款