diff --git a/internal/scheduler/service/aiService.go b/internal/scheduler/service/aiService.go index 254f19ba..2d93dc92 100644 --- a/internal/scheduler/service/aiService.go +++ b/internal/scheduler/service/aiService.go @@ -87,7 +87,7 @@ func InitAiClusterMap(conf *config.Config, clusters []types.ClusterInfo) (map[st switch c.Driver { case OCTOPUS: id, _ := strconv.ParseInt(c.Id, 10, 64) - octopus := octopusHttp.NewOctopusHttp(id, c.Nickname, c.Server, c.Address, c.Username, c.Password) + octopus := octopusHttp.NewOctopusHttp(id, c.ResourcePool, c.Nickname, c.Server, c.Address, c.Username, c.Password) collectorMap[c.Id] = octopus executorMap[c.Id] = octopus inferenceMap[c.Id] = octopus diff --git a/internal/storeLink/octopusHttp/octopusHttp.go b/internal/storeLink/octopusHttp/octopusHttp.go index 75d9bef7..04984d7a 100644 --- a/internal/storeLink/octopusHttp/octopusHttp.go +++ b/internal/storeLink/octopusHttp/octopusHttp.go @@ -24,7 +24,6 @@ import ( ) const ( - RESOURCE_POOL = "grampus-pool" Param_Token = "token" Param_Addr = "addr" Forward_Slash = "/" @@ -95,16 +94,17 @@ type OctopusHttp struct { platform string participantId int64 token *Token + resourcePool string } -func NewOctopusHttp(id int64, name, server, host string, user string, pwd string) *OctopusHttp { +func NewOctopusHttp(id int64, resourcePool, name, server, host, user, pwd string) *OctopusHttp { token := &Token{ user: user, pwd: pwd, server: server, host: host, } - return &OctopusHttp{platform: name, participantId: id, server: server, host: host, token: token} + return &OctopusHttp{resourcePool: resourcePool, platform: name, participantId: id, server: server, host: host, token: token} } // executor @@ -239,7 +239,7 @@ func (o *OctopusHttp) SubmitTask(ctx context.Context, imageId string, cmd string Name: TASK_NAME_PREFIX + UNDERSCORE + utils.RandomString(10), ImageId: imageId, IsDistributed: false, - ResourcePool: RESOURCE_POOL, + ResourcePool: o.resourcePool, Config: []*omodel.CreateTrainJobConf{ { Command: cmd, @@ -304,7 +304,7 @@ func (o *OctopusHttp) resourceSpecs(ctx context.Context) (*entity.OctResp, error } param := omodel.ResourceSpecParam{ - ResourcePool: RESOURCE_POOL, + ResourcePool: o.resourcePool, } b, _ := json.Marshal(param) diff --git a/internal/types/types.go b/internal/types/types.go index 140a4478..d7a153b6 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -780,6 +780,7 @@ type ClusterInfo struct { ProxyEnable string `json:"proxyEnable,omitempty" db:"proxy_enable"` Driver string `json:"driver,omitempty" db:"driver"` Status string `json:"status,omitempty" db:"status"` + ResourcePool string `json:"resourcePool,omitempty" db:"resource_pool"` } type ClusterListResp struct { diff --git a/version.sql b/version.sql index 147d5fba..30742273 100644 --- a/version.sql +++ b/version.sql @@ -1,8 +1,3 @@ +#20250901 alter table t_cluster - add private_key varchar(1000) null comment 'PEM格式私钥内容' after sk; - -alter table t_cluster - add passphrase varchar(100) null comment ' 私钥的加密口令' after private_key; - -alter table t_cluster - modify auth_type tinyint(1) not null comment '认证方式:0->ak,sk;1->user,pwd;2->token;3->ssh密钥认证;'; \ No newline at end of file + add resource_pool varchar(100) null comment 'octopus资源池' after status; \ No newline at end of file