-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgee_master_schema.json
173 lines (167 loc) · 4.48 KB
/
gee_master_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// database schema:
// mostly for documentation, since this is now shared between the portal and
// the slice-daemon.py script
// table is gee_master
// general command to connect is
// mongo --host <hostname> --port <port>
// for us, <hostname> is typically mongodb, and
// <port> is 27017 -- the default, omittable.
// users: {email [String], admin [a boolean]}
// email is a unique index for both the collections users and user_requests in
// mongo (done from the command line) so we don't have to worry about duplicate entries
{"users": {
"email": "String",
"admin": {
"type": "Boolean",
"default": false
}
},
// slices: {name, allocated, expires, tarfile, imageName}
// name is just the slice name
// user is the email of the user who owns the slice (null if not allocated)
// expires is the date on which the slice expires
// tarfile is the name of slice file
// imageName: is the name of the docker file
// NOT SHOWN (and may need to be fixed). Has an autoincrement COUNT field
// implemented by a Mongoose plugin -- how do we get it from Mongo?
"slices": {
"user": {
"type": "String",
"default": null // no user for this slice
},
"expires": {
"type": "Date"
},
"ports": {
"type": [
"host":"String",
"container": "String"
],
"default": []
},
"imageName": "String",
"tarfile": "String",
"status": "String"
},
//
// slice requests: {action, user, sliceName, imageName}
// action: create or delete
// user: user to do it for
// sliceName: name to give the script
// imageName: is the name of the docker file. Used only for create requests
// read by slice-daemon.py, so any change here must be accompanied by a change
// there
//
"slice_requests": {
"action": {
"type": "String",
"default": "delete"
},
"user": {
"type": "String",
"default": null
},
"sliceName": {
"type":"String"
},
"imageName": "String",
"ports": {
"type": [{
"host":"String",
"container": "String"
}],
"default": []
}
},
//
// images: {name}
// name: String
// names of images which can be instantiated on GEE
"images": {
"name": "String"
},
// Special slice requests -- requests for slices
// that have been made by users but not acted upon
// by administrators. These involve open ports,
// images not in the database, or both
// user: email of user requesting special slice
// imageName: text string with the image the user is requesting.
// The default should be in config.json, and specified there.
// ports: port mappings the user is requesting. should be in the form x:y,
// where x is the host port and y is the container port
"special_slice_requests": {
"user": {
"type": "String",
"default": null
},
"imageName": {
"type": "String",
"default": null
},
"ports": {
"type": [{
"host":"String",
"container": "String"
}],
"default": []
}
},
// Logging Documents. These are not used for operations by the GEE Portal, but
// are used for forensic purposes -- primarily, so administrators can find out
// what the various tools have done
// A slice creation record
"slice_create_records": {
"user": "String",
"imageName": "String",
"ports": {
"type": [{
"host":"String",
"container":"String"
}]
},
"sliceName": "String",
"sliceNum": "String",
"expires": {
"type": "Date"
},
"date": {
"type": "Date"
}
},
// A slice deletion record
"slice_delete_records": {
"date": {
"type": "Date"
},
"sliceName": "String"
},
// A slice renewal record
"slice_renew_records": {
"date": {
"type": "Date"
},
"new_expiration": {
"type": "Date"
},
"sliceName": "String",
"sliceNum": "String"
},
// A node record. These are the nodes in PlanetIgnite
"nodes" : {
// date added
"date" : {
"type": "Date"
},
"ipAddress": "String",
"siteName": "String", // name of the site, e.g. 'washington'
"dnsName": "String", // something.planet-ignite.net (e.g., 'washington.gee-project.net')
"sshNickname": "String", // for ansible and ssh -- e.g., 'ig-washington'
"permanent": "Boolean", // only true for nodes which should persist -- all added nodes have this as False
"status": {
"up": "Boolean", // Is the node up or down? Will be replaced by a more sophisticated interface
"date": {
"type": "Date"
}
}
},
}