add logging configuration and database changes; update API for private key and passphrase

Signed-off-by: jagger <cossjie@foxmail.com>
This commit is contained in:
jagger 2025-07-01 10:57:26 +08:00
parent 3fae1ca6dc
commit 2ee6300784
8 changed files with 7344 additions and 7118 deletions

1
.gitignore vendored
View File

@ -24,5 +24,6 @@ buf.lock
configs/tenanter.yaml
log/
logs/
/cache/
/vendor/

View File

@ -927,6 +927,8 @@ type (
Token string `json:"token,omitempty" db:"token"`
Ak string `json:"ak,omitempty" db:"ak"`
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"`
ProjectId string `json:"projectId,omitempty" db:"project_id"`
Version string `json:"version,omitempty" db:"version"`

View File

@ -1146,3 +1146,4 @@ service pcm {
@handler scheduleSituationHandler
get /monitoring/schedule/situation returns (scheduleSituationResp)
}

View File

@ -2,11 +2,17 @@ Name: pcm.core.api
Host: 0.0.0.0
Port: 8999
MaxBytes: 524288000
Log:
Mode: file
Level: debug
Path: ./logs
Rotation: daily
ServiceName: "pcm.core.api"
Timeout: 500000
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:
Host: 10.206.0.12:6379
Pass: redisPW123

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,7 @@ type CommonParams struct {
Nodes string `json:"nodes"`
NTasks string `json:"ntasks"`
Time string `json:"time,omitempty"`
App string `json:"app"`
}
func NewCommitHpcTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommitHpcTaskLogic {
@ -181,6 +182,7 @@ func ConvertToJobRequest(job *types.CommitHpcTaskReq) (JobRequest, error) {
Nodes: job.Parameters["nodes"],
NTasks: job.Parameters["ntasks"],
Time: job.Parameters["time"],
App: job.App,
},
AppSpecific: utils.MpaStringToInterface(job.Parameters),
}, nil

File diff suppressed because it is too large Load Diff

8
version.sql Normal file
View File

@ -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密钥认证;';