Signed-off-by: jagger <cossjie@foxmail.com>pull/520/head
| @@ -24,5 +24,6 @@ buf.lock | |||||
| configs/tenanter.yaml | configs/tenanter.yaml | ||||
| log/ | log/ | ||||
| logs/ | |||||
| /cache/ | /cache/ | ||||
| /vendor/ | /vendor/ | ||||
| @@ -927,6 +927,8 @@ type ( | |||||
| Token string `json:"token,omitempty" db:"token"` | Token string `json:"token,omitempty" db:"token"` | ||||
| Ak string `json:"ak,omitempty" db:"ak"` | Ak string `json:"ak,omitempty" db:"ak"` | ||||
| Sk string `json:"sk,omitempty" db:"sk"` | Sk string `json:"sk,omitempty" db:"sk"` | ||||
| PrivateKey string `json:"privateKey,omitempty" db:"private_key"` | |||||
| Passphrase string `json:"passphrase,omitempty" db:"passphrase"` | |||||
| Region string `json:"region,omitempty" db:"region"` | Region string `json:"region,omitempty" db:"region"` | ||||
| ProjectId string `json:"projectId,omitempty" db:"project_id"` | ProjectId string `json:"projectId,omitempty" db:"project_id"` | ||||
| Version string `json:"version,omitempty" db:"version"` | Version string `json:"version,omitempty" db:"version"` | ||||
| @@ -211,7 +211,7 @@ service pcm { | |||||
| @doc "获取资源规格范围" | @doc "获取资源规格范围" | ||||
| @handler resourceRange | @handler resourceRange | ||||
| get /core/ai/resourceSpec/range (ResourceSpecReq) returns (ListResult) | get /core/ai/resourceSpec/range (ResourceSpecReq) returns (ListResult) | ||||
| //集群资源规格----- 结束 | |||||
| //集群资源规格----- 结束 | |||||
| } | } | ||||
| //hpc二级接口 | //hpc二级接口 | ||||
| @@ -456,7 +456,7 @@ service pcm { | |||||
| @doc "文本识别" | @doc "文本识别" | ||||
| @handler ChatHandler | @handler ChatHandler | ||||
| post /ai/chat (ChatReq) returns (ChatResult) | post /ai/chat (ChatReq) returns (ChatResult) | ||||
| /******chat end***********/ | |||||
| /******chat end***********/ | |||||
| } | } | ||||
| //screen接口 | //screen接口 | ||||
| @@ -1145,4 +1145,5 @@ service pcm { | |||||
| @handler scheduleSituationHandler | @handler scheduleSituationHandler | ||||
| get /monitoring/schedule/situation returns (scheduleSituationResp) | get /monitoring/schedule/situation returns (scheduleSituationResp) | ||||
| } | |||||
| } | |||||
| @@ -2,11 +2,17 @@ Name: pcm.core.api | |||||
| Host: 0.0.0.0 | Host: 0.0.0.0 | ||||
| Port: 8999 | Port: 8999 | ||||
| MaxBytes: 524288000 | MaxBytes: 524288000 | ||||
| Log: | |||||
| Mode: file | |||||
| Level: debug | |||||
| Path: ./logs | |||||
| Rotation: daily | |||||
| ServiceName: "pcm.core.api" | |||||
| Timeout: 500000 | Timeout: 500000 | ||||
| DB: | DB: | ||||
| DataSource: root:uJpLd6u-J?HC1@(47.92.88.143:3306)/pcm?parseTime=true&loc=Local | |||||
| DataSource: root:uJpLd6u-J?HC1@(119.45.255.234:3306)/pcm?parseTime=true&loc=Local | |||||
| Redis: | Redis: | ||||
| Host: 10.206.0.12:6379 | Host: 10.206.0.12:6379 | ||||
| Pass: redisPW123 | Pass: redisPW123 | ||||
| @@ -45,6 +45,7 @@ type CommonParams struct { | |||||
| Nodes string `json:"nodes"` | Nodes string `json:"nodes"` | ||||
| NTasks string `json:"ntasks"` | NTasks string `json:"ntasks"` | ||||
| Time string `json:"time,omitempty"` | Time string `json:"time,omitempty"` | ||||
| App string `json:"app"` | |||||
| } | } | ||||
| func NewCommitHpcTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommitHpcTaskLogic { | func NewCommitHpcTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommitHpcTaskLogic { | ||||
| @@ -181,6 +182,7 @@ func ConvertToJobRequest(job *types.CommitHpcTaskReq) (JobRequest, error) { | |||||
| Nodes: job.Parameters["nodes"], | Nodes: job.Parameters["nodes"], | ||||
| NTasks: job.Parameters["ntasks"], | NTasks: job.Parameters["ntasks"], | ||||
| Time: job.Parameters["time"], | Time: job.Parameters["time"], | ||||
| App: job.App, | |||||
| }, | }, | ||||
| AppSpecific: utils.MpaStringToInterface(job.Parameters), | AppSpecific: utils.MpaStringToInterface(job.Parameters), | ||||
| }, nil | }, nil | ||||
| @@ -0,0 +1,8 @@ | |||||
| 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密钥认证;'; | |||||