Skip to content

Commit

Permalink
✨ Is353/api results table from meta-project sweep (⚠️ devops) (#2851)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Mar 7, 2022
1 parent 0df1384 commit 7cf097b
Show file tree
Hide file tree
Showing 11 changed files with 896 additions and 138 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,15 @@ TableWidth=140;\
printf "%24s | %90s | %12s | %12s\n" Name Endpoint User Password;\
printf "%.$${TableWidth}s\n" "$$separator";\
printf "$$rows" 'oSparc platform' 'http://$(get_my_ip).nip.io:9081';\
printf "$$rows" 'oSparc platform web API' 'http://$(get_my_ip).nip.io:9081/dev/doc';\
printf "$$rows" 'oSparc web API doc' 'http://$(get_my_ip).nip.io:9081/dev/doc';\
printf "$$rows" 'oSparc public API doc' 'http://$(get_my_ip).nip.io:8006/dev/doc';\
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};\
printf "$$rows" Portainer 'http://$(get_my_ip).nip.io:9000' admin adminadmin;\
printf "$$rows" Redis 'http://$(get_my_ip).nip.io:18081';\
printf "$$rows" 'Docker Registry' $${REGISTRY_URL} $${REGISTRY_USER} $${REGISTRY_PW};\
printf "$$rows" "Dask Dashboard" "http://$(get_my_ip).nip.io:8787";
printf "$$rows" "Traefik Dashboard" "http://$(get_my_ip).nip.io:8080/dashboard/";
printf "$$rows" "Rabbit Dashboard" "http://$(get_my_ip).nip.io:15762" admin adminadmin;
printf "$$rows" "Dask Dashboard" "http://$(get_my_ip).nip.io:8787";\
printf "$$rows" "Docker Registry" "$${REGISTRY_URL}" $${REGISTRY_USER} $${REGISTRY_PW};\
printf "$$rows" "Rabbit Dashboard" "http://$(get_my_ip).nip.io:15762" admin adminadmin;\
printf "$$rows" "Traefik Dashboard" "http://$(get_my_ip).nip.io:8080/dashboard/";\
printf "\n%s\n" "⚠️ if a DNS is not used (as displayed above), the interactive services started via dynamic-sidecar";\
echo "⚠️ will not be shown. The frontend accesses them via the uuid.services.YOUR_IP.nip.io:9081";
endef
Expand Down
165 changes: 159 additions & 6 deletions api/specs/webserver/openapi-meta-projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Page_IterationAsItem_"
$ref: "#/components/schemas/Page_IterationItem_"
"404":
description:
This project has no iterations.Only meta-project have iterations
Expand All @@ -63,6 +63,141 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}:
get:
tags:
- meta-projects
summary: Get Project Iterations
description: Get current project's iterations
operationId: "simcore_service_webserver.meta_modeling_handlers._get_meta_project_iterations_handler"
parameters:
- description: Project unique identifier
required: true
schema:
title: Project Uuid
type: string
description: Project unique identifier
format: uuid
name: project_uuid
in: path
- required: true
schema:
title: Ref Id
anyOf:
- type: integer
- type: string
name: ref_id
in: path
- required: true
name: iter_id
schema:
type: integer
in: path
responses:
"200":
description: Successful Response

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results:
get:
tags:
- meta-projects
summary: List Project Iterations Results
description: Lists current project's iterations results table
operationId: "simcore_service_webserver.meta_modeling_handlers._list_meta_project_iterations_results_handler"
parameters:
- description: Project unique identifier
required: true
schema:
title: Project Uuid
type: string
description: Project unique identifier
format: uuid
name: project_uuid
in: path
- required: true
schema:
title: Ref Id
anyOf:
- type: integer
- type: string
name: ref_id
in: path
- description: index to the first item to return (pagination)
required: false
schema:
title: Offset
exclusiveMinimum: false
type: integer
description: index to the first item to return (pagination)
default: 0
minimum: 0
name: offset
in: query
- description: maximum number of items to return (pagination)
required: false
schema:
title: Limit
maximum: 50.0
minimum: 1.0
type: integer
description: maximum number of items to return (pagination)
default: 20
name: limit
in: query
responses:
"200":
description: Successful Response
content:
application/json:
schema:
$ref: "#/components/schemas/Page_IterationResultItem_"
"404":
description:
This project has no iterations.Only meta-project have iterations
and they must be explicitly created.
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results:
get:
tags:
- meta-projects
summary: Get Project Iteration Results
description: Get current project's iterations
operationId: "simcore_service_webserver.meta_modeling_handlers._get_meta_project_iteration_results_handler"
parameters:
- description: Project unique identifier
required: true
schema:
title: Project Uuid
type: string
description: Project unique identifier
format: uuid
name: project_uuid
in: path
- required: true
schema:
title: Ref Id
anyOf:
- type: integer
- type: string
name: ref_id
in: path
- required: true
schema:
type: integer
name: iter_id
in: path

responses:
"200":
description: Successful Response

components:
schemas:
HTTPValidationError:
Expand All @@ -74,8 +209,8 @@ components:
type: array
items:
$ref: "#/components/schemas/ValidationError"
IterationAsItem:
title: IterationAsItem
IterationItem:
title: IterationItem
required:
- name
- parent
Expand Down Expand Up @@ -177,8 +312,8 @@ components:
title: Count
minimum: 0.0
type: integer
Page_IterationAsItem_:
title: Page[IterationAsItem]
Page_IterationItem_:
title: Page[IterationItem]
required:
- _meta
- _links
Expand All @@ -193,7 +328,7 @@ components:
title: Data
type: array
items:
$ref: "#/components/schemas/IterationAsItem"
$ref: "#/components/schemas/IterationItem"
ParentMetaProjectRef:
title: ParentMetaProjectRef
required:
Expand Down Expand Up @@ -227,3 +362,21 @@ components:
type:
title: Error Type
type: string
Page_IterationResultItem_:
title: Page[IterationResultItem]
required:
- _meta
- _links
- data
type: object
properties:
_meta:
$ref: "#/components/schemas/PageMetaInfoLimitOffset"
_links:
$ref: "#/components/schemas/PageLinks"
data:
title: Data
type: array
items:
$ref: "#/components/schemas/IterationItem"
# NOTE: intentionally wrong. Will be deprecated
9 changes: 9 additions & 0 deletions api/specs/webserver/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ paths:
/projects/{project_uuid}/checkpoint/{ref_id}/iterations:
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations"

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}:
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1{iter_id}"

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results:
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1-~1results"

/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results:
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations~1{iter_id}~1results"

# REPOSITORY -------------------------------------------------------------------------
/repos/projects:
$ref: "./openapi-version-control.yaml#/paths/~1repos~1projects"
Expand Down
9 changes: 7 additions & 2 deletions services/docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,18 @@ services:
webserver:
environment:
- SC_BOOT_MODE=${SC_BOOT_MODE:-default}
- REST_SWAGGER_API_DOC_ENABLED=1
ports:
- "8080"
- "3001:3000"
deploy:
labels:
- traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=false
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.service=${SWARM_STACK_NAME}_webserver
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.entrypoints=http
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.rule=hostregexp(`{host:.+}`) && PathPrefix(`/dev/`)
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.priority=3
- 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

dask-sidecar:
environment:
Expand Down Expand Up @@ -134,8 +140,7 @@ services:
- io.simcore.zone=${TRAEFIK_SIMCORE_ZONE}
- traefik.enable=true
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.service=api@internal
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.rule=PathPrefix(`/dashboard`)
|| PathPrefix(`/api`)
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.rule=PathPrefix(`/dashboard`) || PathPrefix(`/api`)
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.entrypoints=traefik_monitor
- traefik.http.routers.${SWARM_STACK_NAME}_api_internal.middlewares=${SWARM_STACK_NAME}_gzip@docker
- traefik.http.services.${SWARM_STACK_NAME}_api_internal.loadbalancer.server.port=8080
Expand Down
Loading

0 comments on commit 7cf097b

Please sign in to comment.