JCC-CSScheduler/common/assets/scripts/create_database.sql

38 lines
1.7 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

drop database if exists scheduler;
create database scheduler;
use scheduler;
create table ComputingCenter (
CCID int not null auto_increment primary key comment '计算中心名称',
UOPSlwNodeID bigint not null comment '计算中心在运控系统的ID',
PCMParticipantID bigint not null comment '计算中心在PCM系统的ID',
CDSNodeID bigint null comment '计算中心在存储系统的ID',
CDSStorageID bigint null comment '此算力中心的存储服务对应在存储系统中的ID',
Name varchar(100) not null comment '计算中心名称'
) comment = '计算中心';
create table Image (
ImageID int not null auto_increment primary key comment '调度系统内的镜像ID',
CDSPackageID bigint comment '镜像文件对应的存储系统PackageID',
Name varchar(200) not null comment '镜像名称,在调度系统上设置的',
CreateTime timestamp not null comment '镜像创建时间'
) comment = "镜像";
create table PCMImage (
ImageID int not null comment '调度系统内的镜像ID',
CCID int not null comment '导入到的计算中心的ID',
PCMImageID varchar(200) not null comment '通过PCM系统导入到各计算中心后得到的ID',
Name varchar(200) not null comment '镜像名称通过PCM导入后获得',
UploadTime timestamp not null comment '镜像导入时间',
primary key(ImageID, CCID)
) comment = '镜像导入到算力中心的信息';
create table CCResource (
CCID int not null comment '计算中心ID',
PCMResourceID varchar(200) not null comment 'PCM系统返回的资源规格ID',
PCMResourceName varchar(200) not null comment 'PCM系统返回的资源规格名称',
Resource JSON not null comment '此种规格具体包含的资源信息',
primary key(CCID, PCMResourceID)
);