Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
work-summary
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangxiaowei
work-summary
Commits
6d1f6d35
Commit
6d1f6d35
authored
May 16, 2022
by
ethen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c2ada57a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
196 additions
and
0 deletions
+196
-0
图形节点接口设计.md
docs/project-api/图形节点接口设计.md
+196
-0
No files found.
docs/project-api/图形节点接口设计.md
0 → 100644
View file @
6d1f6d35
## 0520-图形节点接口设计
### 节点
#### 1.节点数据查询
**url示例**
http://localhost:7701/ceadmin/0xadministrator/local/configuration/node?zoneId=ON_PREMISE&page=2&size=20&nodeType=station
**GET**
**参数说明**
| 参数 | 含义 | 说明 | 是否必填 |
| -------- | -------- | ------------------------------------------------------------ | -------- |
| zoneId | 计算区 | ON_PREMISE - 本地计算区 | 是 |
| page | 页数 | 0 - 初始值 | 否 |
| size | 条数 | 每页条数 | 否 |
| nodeType | 节点类型 | master, // 管理节点 login, // 登录节点 worker, // 计算节点 station // 图形节点 | 否 |
**返回示例**
```
json
{
"data"
:
{
"content"
:
[],
"pageable"
:
{
"sort"
:
{
"sorted"
:
false
,
"unsorted"
:
true
},
"offset"
:
40
,
"pageNumber"
:
2
,
"pageSize"
:
20
,
"unpaged"
:
false
,
"paged"
:
true
},
"totalPages"
:
1
,
//
总页数
"totalElements"
:
3
,
//
总条数
"last"
:
true
,
"number"
:
2
,
"size"
:
20
,
"sort"
:
{
"sorted"
:
false
,
"unsorted"
:
true
},
"numberOfElements"
:
0
,
"first"
:
false
},
"errorCode"
:
0
,
"message"
:
"success"
}
```
#### 2.新建节点
**url示例**
http://localhost:7701/ceadmin/0xadministrator/local/configuration/node
**POST**
**请求体示例**
```
json
{
"name"
:
"worker002"
,
//
节点名称
"zoneId"
:
"ON_PREMISE"
,
//
计算区
"location"
:
"on666"
,
"nodeType"
:
[
//
节点类型
"worker"
],
"groupId"
:
"default"
,
"rackId"
:
"default"
,
"hostIp"
:
"10.1.38.10"
,
"hardwareType"
:
"GPU"
,
//
硬件类型
"osType"
:
"Linux"
//
操作系统
}
```
### 队列
#### 1.队列列表数据查询
**url示例**
http://localhost:7701/ceadmin/0xadministrator/general/configuration/partition?zoneId=ON_PREMISE&partitionType=COMPUTE
**GET**
**参数说明**
| 参数 | 含义 | 说明 | 是否必填 |
| ------------- | -------- | ---------------------------------- | -------- |
| zoneId | 计算区 | ON_PREMISE - 本地计算区 | 是 |
| partitionType | 队列类型 | COMPUTE-计算队列,STATION-图形队列 | 否 |
**返回示例**
```
json
{
"data"
:
[
{
"id"
:
"6281ea62d315490001bb9973"
,
"name"
:
"c-4-1"
,
"zoneId"
:
"ON_PREMISE"
,
"type"
:
"CPU"
,
"nodes"
:
"cpu0001"
,
"isDefault"
:
"NO"
,
"priorityTier"
:
1
,
"maxTime"
:
"UNLIMITED"
,
"overSubscribe"
:
"NO"
,
"overSubscribeLimit"
:
null
,
"allowGroups"
:
"ALL"
,
"state"
:
"UP"
,
"createdAt"
:
1652681313277
,
"updatedAt"
:
1652681313277
,
"cpuName"
:
null
,
"coreNum"
:
0
,
"memory"
:
0.0
,
"gpuName"
:
null
,
"gpuNum"
:
0
,
"instanceTypes"
:
null
,
"provider"
:
null
,
"imageId"
:
null
,
"linuxWorkstationImageId"
:
null
,
"windowsWorkstationImageId"
:
null
,
"enable"
:
false
,
"systemDiskCategory"
:
null
,
"diskSize"
:
0
,
"chargeType"
:
null
,
"cloudAccountId"
:
null
,
"priceThreshold"
:
null
,
"standardPayment"
:
null
,
"economyPayment"
:
null
,
"label"
:
null
,
"partitionType"
:
"COMPUTE"
,
//
队列类型
"osType"
:
null
,
"computeType"
:
"CPU"
,
"partition"
:
"c-4-1"
,
"economyPaymentEnabled"
:
false
,
"standardPaymentEnabled"
:
true
}
],
"errorCode"
:
0
,
"message"
:
"success"
}
```
#### 2.创建队列
http://123.57.131.31/ceadmin/0xadministrator/local/configuration/partition
**POST**
**请求参数示例**
```
json
{
"name"
:
"test001"
,
"zoneId"
:
"ON_PREMISE"
,
"type"
:
"CPU"
,
"nodes"
:
"cpu001;cpu002;gpu003"
,
"isDefault"
:
"NO"
,
"priorityTier"
:
1
,
"maxTime"
:
"UNLIMITED"
,
"overSubscribe"
:
"NO"
,
"overSubscribeLimit"
:
""
,
"state"
:
"UP"
,
"allowGroups"
:
"ALL"
,
"partitionType"
:
"COMPUTE"
,
//
队列类型
"osType"
:
"Linux"
,
//
操作系统
}
```
####
### 启动图形界面
#### 1.启动图形界面--请选择硬件--填写表格--点击`确定`按钮
POST applyGraphicsWorkstation
#### 2.图形界面--linux工作站--点击`释放`按钮
DELETE releaseGraphicsWorkstation
### 监控
#### 1.查询节点列表
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment