Skip to content

Commit 7cf097b

Browse files
authored
✨ Is353/api results table from meta-project sweep (⚠️ devops) (ITISFoundation#2851)
1 parent 0df1384 commit 7cf097b

File tree

11 files changed

+896
-138
lines changed

11 files changed

+896
-138
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,15 @@ TableWidth=140;\
232232
printf "%24s | %90s | %12s | %12s\n" Name Endpoint User Password;\
233233
printf "%.$${TableWidth}s\n" "$$separator";\
234234
printf "$$rows" 'oSparc platform' 'http://$(get_my_ip).nip.io:9081';\
235-
printf "$$rows" 'oSparc platform web API' 'http://$(get_my_ip).nip.io:9081/dev/doc';\
235+
printf "$$rows" 'oSparc web API doc' 'http://$(get_my_ip).nip.io:9081/dev/doc';\
236+
printf "$$rows" 'oSparc public API doc' 'http://$(get_my_ip).nip.io:8006/dev/doc';\
236237
printf "$$rows" 'Postgres DB' 'http://$(get_my_ip).nip.io:18080/?pgsql=postgres&username='$${POSTGRES_USER}'&db='$${POSTGRES_DB}'&ns=public' $${POSTGRES_USER} $${POSTGRES_PASSWORD};\
237238
printf "$$rows" Portainer 'http://$(get_my_ip).nip.io:9000' admin adminadmin;\
238239
printf "$$rows" Redis 'http://$(get_my_ip).nip.io:18081';\
239-
printf "$$rows" 'Docker Registry' $${REGISTRY_URL} $${REGISTRY_USER} $${REGISTRY_PW};\
240-
printf "$$rows" "Dask Dashboard" "http://$(get_my_ip).nip.io:8787";
241-
printf "$$rows" "Traefik Dashboard" "http://$(get_my_ip).nip.io:8080/dashboard/";
242-
printf "$$rows" "Rabbit Dashboard" "http://$(get_my_ip).nip.io:15762" admin adminadmin;
240+
printf "$$rows" "Dask Dashboard" "http://$(get_my_ip).nip.io:8787";\
241+
printf "$$rows" "Docker Registry" "$${REGISTRY_URL}" $${REGISTRY_USER} $${REGISTRY_PW};\
242+
printf "$$rows" "Rabbit Dashboard" "http://$(get_my_ip).nip.io:15762" admin adminadmin;\
243+
printf "$$rows" "Traefik Dashboard" "http://$(get_my_ip).nip.io:8080/dashboard/";\
243244
printf "\n%s\n" "⚠️ if a DNS is not used (as displayed above), the interactive services started via dynamic-sidecar";\
244245
echo "⚠️ will not be shown. The frontend accesses them via the uuid.services.YOUR_IP.nip.io:9081";
245246
endef

api/specs/webserver/openapi-meta-projects.yaml

Lines changed: 159 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ paths:
5252
content:
5353
application/json:
5454
schema:
55-
$ref: "#/components/schemas/Page_IterationAsItem_"
55+
$ref: "#/components/schemas/Page_IterationItem_"
5656
"404":
5757
description:
5858
This project has no iterations.Only meta-project have iterations
@@ -63,6 +63,141 @@ paths:
6363
application/json:
6464
schema:
6565
$ref: "#/components/schemas/HTTPValidationError"
66+
67+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}:
68+
get:
69+
tags:
70+
- meta-projects
71+
summary: Get Project Iterations
72+
description: Get current project's iterations
73+
operationId: "simcore_service_webserver.meta_modeling_handlers._get_meta_project_iterations_handler"
74+
parameters:
75+
- description: Project unique identifier
76+
required: true
77+
schema:
78+
title: Project Uuid
79+
type: string
80+
description: Project unique identifier
81+
format: uuid
82+
name: project_uuid
83+
in: path
84+
- required: true
85+
schema:
86+
title: Ref Id
87+
anyOf:
88+
- type: integer
89+
- type: string
90+
name: ref_id
91+
in: path
92+
- required: true
93+
name: iter_id
94+
schema:
95+
type: integer
96+
in: path
97+
responses:
98+
"200":
99+
description: Successful Response
100+
101+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results:
102+
get:
103+
tags:
104+
- meta-projects
105+
summary: List Project Iterations Results
106+
description: Lists current project's iterations results table
107+
operationId: "simcore_service_webserver.meta_modeling_handlers._list_meta_project_iterations_results_handler"
108+
parameters:
109+
- description: Project unique identifier
110+
required: true
111+
schema:
112+
title: Project Uuid
113+
type: string
114+
description: Project unique identifier
115+
format: uuid
116+
name: project_uuid
117+
in: path
118+
- required: true
119+
schema:
120+
title: Ref Id
121+
anyOf:
122+
- type: integer
123+
- type: string
124+
name: ref_id
125+
in: path
126+
- description: index to the first item to return (pagination)
127+
required: false
128+
schema:
129+
title: Offset
130+
exclusiveMinimum: false
131+
type: integer
132+
description: index to the first item to return (pagination)
133+
default: 0
134+
minimum: 0
135+
name: offset
136+
in: query
137+
- description: maximum number of items to return (pagination)
138+
required: false
139+
schema:
140+
title: Limit
141+
maximum: 50.0
142+
minimum: 1.0
143+
type: integer
144+
description: maximum number of items to return (pagination)
145+
default: 20
146+
name: limit
147+
in: query
148+
responses:
149+
"200":
150+
description: Successful Response
151+
content:
152+
application/json:
153+
schema:
154+
$ref: "#/components/schemas/Page_IterationResultItem_"
155+
"404":
156+
description:
157+
This project has no iterations.Only meta-project have iterations
158+
and they must be explicitly created.
159+
"422":
160+
description: Validation Error
161+
content:
162+
application/json:
163+
schema:
164+
$ref: "#/components/schemas/HTTPValidationError"
165+
166+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results:
167+
get:
168+
tags:
169+
- meta-projects
170+
summary: Get Project Iteration Results
171+
description: Get current project's iterations
172+
operationId: "simcore_service_webserver.meta_modeling_handlers._get_meta_project_iteration_results_handler"
173+
parameters:
174+
- description: Project unique identifier
175+
required: true
176+
schema:
177+
title: Project Uuid
178+
type: string
179+
description: Project unique identifier
180+
format: uuid
181+
name: project_uuid
182+
in: path
183+
- required: true
184+
schema:
185+
title: Ref Id
186+
anyOf:
187+
- type: integer
188+
- type: string
189+
name: ref_id
190+
in: path
191+
- required: true
192+
schema:
193+
type: integer
194+
name: iter_id
195+
in: path
196+
197+
responses:
198+
"200":
199+
description: Successful Response
200+
66201
components:
67202
schemas:
68203
HTTPValidationError:
@@ -74,8 +209,8 @@ components:
74209
type: array
75210
items:
76211
$ref: "#/components/schemas/ValidationError"
77-
IterationAsItem:
78-
title: IterationAsItem
212+
IterationItem:
213+
title: IterationItem
79214
required:
80215
- name
81216
- parent
@@ -177,8 +312,8 @@ components:
177312
title: Count
178313
minimum: 0.0
179314
type: integer
180-
Page_IterationAsItem_:
181-
title: Page[IterationAsItem]
315+
Page_IterationItem_:
316+
title: Page[IterationItem]
182317
required:
183318
- _meta
184319
- _links
@@ -193,7 +328,7 @@ components:
193328
title: Data
194329
type: array
195330
items:
196-
$ref: "#/components/schemas/IterationAsItem"
331+
$ref: "#/components/schemas/IterationItem"
197332
ParentMetaProjectRef:
198333
title: ParentMetaProjectRef
199334
required:
@@ -227,3 +362,21 @@ components:
227362
type:
228363
title: Error Type
229364
type: string
365+
Page_IterationResultItem_:
366+
title: Page[IterationResultItem]
367+
required:
368+
- _meta
369+
- _links
370+
- data
371+
type: object
372+
properties:
373+
_meta:
374+
$ref: "#/components/schemas/PageMetaInfoLimitOffset"
375+
_links:
376+
$ref: "#/components/schemas/PageLinks"
377+
data:
378+
title: Data
379+
type: array
380+
items:
381+
$ref: "#/components/schemas/IterationItem"
382+
# NOTE: intentionally wrong. Will be deprecated

api/specs/webserver/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ paths:
223223
/projects/{project_uuid}/checkpoint/{ref_id}/iterations:
224224
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations"
225225

226+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}:
227+
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1{iter_id}"
228+
229+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results:
230+
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1-~1results"
231+
232+
/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results:
233+
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1{iter_id}~1results"
234+
226235
# REPOSITORY -------------------------------------------------------------------------
227236
/repos/projects:
228237
$ref: "./openapi-version-control.yaml#/paths/~1repos~1projects"

services/docker-compose.local.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ services:
5858
webserver:
5959
environment:
6060
- SC_BOOT_MODE=${SC_BOOT_MODE:-default}
61+
- REST_SWAGGER_API_DOC_ENABLED=1
6162
ports:
6263
- "8080"
6364
- "3001:3000"
6465
deploy:
6566
labels:
6667
- traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=false
68+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.service=${SWARM_STACK_NAME}_webserver
69+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.entrypoints=http
70+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.rule=hostregexp(`{host:.+}`) && PathPrefix(`/dev/`)
71+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.priority=3
72+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.middlewares=${SWARM_STACK_NAME}_gzip@docker, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker, ${SWARM_STACK_NAME}_webserver_retry
6773

6874
dask-sidecar:
6975
environment:
@@ -134,8 +140,7 @@ services:
134140
- io.simcore.zone=${TRAEFIK_SIMCORE_ZONE}
135141
- traefik.enable=true
136142
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.service=api@internal
137-
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.rule=PathPrefix(`/dashboard`)
138-
|| PathPrefix(`/api`)
143+
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.rule=PathPrefix(`/dashboard`) || PathPrefix(`/api`)
139144
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.entrypoints=traefik_monitor
140145
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.middlewares=${SWARM_STACK_NAME}_gzip@docker
141146
- traefik.http.services.${SWARM_STACK_NAME}_api_internal.loadbalancer.server.port=8080

0 commit comments

Comments
 (0)