diff --git a/00_Documentation/class_diagram.drawio b/00_Documentation/class_diagram.drawio new file mode 100644 index 0000000000000000000000000000000000000000..b9abdda57be25090583bcca3759fb52df893c20c --- /dev/null +++ b/00_Documentation/class_diagram.drawio @@ -0,0 +1,189 @@ +<mxfile host="Electron" modified="2024-04-30T13:35:56.614Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.0.4 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="IlZTv-QdUwuiADvnxMXv" version="24.0.4" type="device"> + <diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1"> + <mxGraphModel dx="2206" dy="1483" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> + <root> + <mxCell id="WIyWlLk6GJQsqaUBKTNV-0" /> + <mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" /> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--0" value="UnicoreJob" style="swimlane;fontStyle=2;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1"> + <mxGeometry x="100" y="140" width="160" height="216" as="geometry"> + <mxRectangle x="230" y="140" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--1" value="Registry " style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="26" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--2" value="client" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="52" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--3" value="job" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="78" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--4" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="104" width="160" height="8" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--5" value="sumbit_job(job_description)" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="112" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-2" value="wait_for_job_start()" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="138" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-3" value="wait_for_job_finish()" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="164" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-1" value="get_job()" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--0" vertex="1"> + <mxGeometry y="190" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--6" value="Portforwarder" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1"> + <mxGeometry x="20" y="480" width="320" height="130" as="geometry"> + <mxRectangle x="130" y="380" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--7" value="job
" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--6" vertex="1"> + <mxGeometry y="26" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--9" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--6" vertex="1"> + <mxGeometry y="52" width="320" height="8" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--11" value="make_connection(hpc_port, local_port)
" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--6" vertex="1"> + <mxGeometry y="60" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-5" value="check_connection()

" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--6" vertex="1"> + <mxGeometry y="86" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--12" value="" style="endArrow=diamondThin;endSize=10;endFill=1;shadow=0;strokeWidth=1;rounded=0;edgeStyle=elbowEdgeStyle;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="zkfFHV4jXpPFQw0GAbJ--6" target="zkfFHV4jXpPFQw0GAbJ--0" edge="1"> + <mxGeometry width="160" relative="1" as="geometry"> + <mxPoint x="200" y="203" as="sourcePoint" /> + <mxPoint x="200" y="203" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--17" value="HPC_Deployer" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1"> + <mxGeometry x="530" y="130" width="160" height="216" as="geometry"> + <mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--18" value="job_list" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="26" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--19" value="portforwarding_list" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="52" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--20" value="config" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="78" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--23" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="104" width="160" height="8" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--24" value="set_config" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="112" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--25" value="start_pulling" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="138" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-11" value="start_jobs" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="164" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-12" value="start_portforwardings" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="zkfFHV4jXpPFQw0GAbJ--17" vertex="1"> + <mxGeometry y="190" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--26" value="" style="endArrow=diamondThin;shadow=0;strokeWidth=1;rounded=0;endFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical;jumpSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="zkfFHV4jXpPFQw0GAbJ--0" target="zkfFHV4jXpPFQw0GAbJ--17" edge="1"> + <mxGeometry x="0.5" y="41" relative="1" as="geometry"> + <mxPoint x="380" y="192" as="sourcePoint" /> + <mxPoint x="540" y="192" as="targetPoint" /> + <mxPoint x="-40" y="32" as="offset" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--27" value="1..*" style="resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=none;fontSize=12;" parent="zkfFHV4jXpPFQw0GAbJ--26" connectable="0" vertex="1"> + <mxGeometry x="-1" relative="1" as="geometry"> + <mxPoint y="4" as="offset" /> + </mxGeometry> + </mxCell> + <mxCell id="zkfFHV4jXpPFQw0GAbJ--28" value="1" style="resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=none;fontSize=12;" parent="zkfFHV4jXpPFQw0GAbJ--26" connectable="0" vertex="1"> + <mxGeometry x="1" relative="1" as="geometry"> + <mxPoint x="-7" y="4" as="offset" /> + </mxGeometry> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endArrow=diamondThin;endFill=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Nfre0TDgzKp-mo3EwC7I-5" target="zkfFHV4jXpPFQw0GAbJ--17" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-9" value="0..*" style="resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=none;fontSize=12;" parent="WIyWlLk6GJQsqaUBKTNV-1" connectable="0" vertex="1"> + <mxGeometry x="190" y="480" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-10" value="0..*" style="resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=none;fontSize=12;" parent="WIyWlLk6GJQsqaUBKTNV-1" connectable="0" vertex="1"> + <mxGeometry x="350" y="570" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-13" value="Backend" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1"> + <mxGeometry x="1040" y="177" width="160" height="117" as="geometry"> + <mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-14" value="unicore_job" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="Nfre0TDgzKp-mo3EwC7I-13" vertex="1"> + <mxGeometry y="26" width="160" height="22" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-17" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="Nfre0TDgzKp-mo3EwC7I-13" vertex="1"> + <mxGeometry y="48" width="160" height="8" as="geometry" /> + </mxCell> + <mxCell id="Nfre0TDgzKp-mo3EwC7I-18" value="start_job(job_config)" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="Nfre0TDgzKp-mo3EwC7I-13" vertex="1"> + <mxGeometry y="56" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="TvflgwcU52VNFXFne61s-5" value="start_orchestrator_job" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="Nfre0TDgzKp-mo3EwC7I-13"> + <mxGeometry y="82" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-0" value="UI" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1"> + <mxGeometry x="1040" y="385" width="160" height="216" as="geometry"> + <mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-1" value="job_type(gpu,cpu)" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="26" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-2" value="# nodes" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="52" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-3" value="# Cpu per task" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="78" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-4" value="mem per cpu" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="104" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-5" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="130" width="160" height="8" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-7" value="generate bluprint.json" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="138" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-9" value="start_job(): job_config" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="CWfM8TEpYPpnlyCobIkf-0" vertex="1"> + <mxGeometry y="164" width="160" height="26" as="geometry" /> + </mxCell> + <mxCell id="CWfM8TEpYPpnlyCobIkf-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Nfre0TDgzKp-mo3EwC7I-11" target="Nfre0TDgzKp-mo3EwC7I-13" edge="1"> + <mxGeometry relative="1" as="geometry"> + <mxPoint x="850" y="247" as="targetPoint" /> + <Array as="points"> + <mxPoint x="690" y="260" /> + <mxPoint x="851" y="260" /> + <mxPoint x="851" y="267" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="TvflgwcU52VNFXFne61s-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TvflgwcU52VNFXFne61s-0" target="Nfre0TDgzKp-mo3EwC7I-13"> + <mxGeometry relative="1" as="geometry"> + <Array as="points"> + <mxPoint x="840" y="330" /> + <mxPoint x="1120" y="330" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="TvflgwcU52VNFXFne61s-0" value="Orchestrator_client" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1"> + <mxGeometry x="760" y="363" width="160" height="117" as="geometry"> + <mxRectangle x="550" y="140" width="160" height="26" as="alternateBounds" /> + </mxGeometry> + </mxCell> + <mxCell id="TvflgwcU52VNFXFne61s-2" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="TvflgwcU52VNFXFne61s-0"> + <mxGeometry y="26" width="160" height="8" as="geometry" /> + </mxCell> + <mxCell id="TvflgwcU52VNFXFne61s-3" value="start_orchestrator(job_config)" style="text;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="TvflgwcU52VNFXFne61s-0"> + <mxGeometry y="34" width="160" height="26" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile> diff --git a/00_Documentation/class_diagram_V1.png b/00_Documentation/class_diagram_V1.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1c970a5c091d06bc243d17bd61d249961cab12 Binary files /dev/null and b/00_Documentation/class_diagram_V1.png differ diff --git a/src/hpc_deployer/unicore/backend_api.py b/src/hpc_deployer/unicore/backend_api.py index b2cd4f24e90ca55e3d99d0832bf1a196555efd0b..84485a0941428f41115511e91d1564c1e200f2e9 100644 --- a/src/hpc_deployer/unicore/backend_api.py +++ b/src/hpc_deployer/unicore/backend_api.py @@ -63,7 +63,7 @@ def start_job(unicore_config): @app.route('/start-orchestrator', methods=['POST']) def start_orchestrator_job(): - start_orchestrator("localhost",config.orchestrator_portgrpc,config.base_path) + start_orchestrator("localhost",int(config.orchestrator_portgrpc),config.base_path) @app.route('/job-started', methods=['POST']) diff --git a/src/hpc_deployer/unicore/unicore_job.py b/src/hpc_deployer/unicore/unicore_job.py index c708d0c8f02a3be5b46f5ce0aa45fa5ad0965360..6be02cfb2dab61b6fd1e4bafefdd30a56cdbd491 100644 --- a/src/hpc_deployer/unicore/unicore_job.py +++ b/src/hpc_deployer/unicore/unicore_job.py @@ -67,8 +67,8 @@ class UnicoreJob: if response.status_code == 200: return response.content - - def generate_pull_config(self,unicore_config): + # There is a bug regarding of pulling apptainers in parallel: https://github.com/apptainer/singularity/issues/3579. We use none parallel in our case + def generate_pull_config_parallel(self,unicore_config): email = unicore_config["notification_email"] project= unicore_config["project_name"] partition= unicore_config["partition"] @@ -78,6 +78,7 @@ class UnicoreJob: for job_dic in container_list: docker_path = job_dic["image_url"] apptainer_name = job_dic["name"] + if num_gpu>0: srun_string = "srun --exact --gres=gpu:1 -n1 --cpus-per-task=4 bash -c \"apptainer pull --dir ${{APPTAINER_FOLDER}} {apptainer_name}.sif docker://{docker_path}\" &".format(apptainer_name=apptainer_name, docker_path=docker_path) else: @@ -97,8 +98,8 @@ class UnicoreJob: "mkdir -p ${WRITABLE_DIRECTORY}", "mkdir -p ${APPTAINER_FOLDER}", - "APPTAINER_CACHEDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", - "APPTAINER_TMPDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", + "export APPTAINER_CACHEDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", + "export APPTAINER_TMPDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", "echo ${APPTAINER_CACHEDIR}", "echo ${APPTAINER_TMPDIR}" ] @@ -147,6 +148,85 @@ class UnicoreJob: return job_dic + def generate_pull_config(self,unicore_config): + email = unicore_config["notification_email"] + project= unicore_config["project_name"] + partition= unicore_config["partition"] + num_gpu= int(unicore_config["gpu_number"]) + container_list= unicore_config["containers"] + srun_list=[] + for job_dic in container_list: + docker_path = job_dic["image_url"] + apptainer_name = job_dic["name"] + + if num_gpu>0: + srun_string = "apptainer pull --dir ${{APPTAINER_FOLDER}} {apptainer_name}.sif docker://{docker_path}".format(apptainer_name=apptainer_name, docker_path=docker_path) + else: + srun_string = "apptainer pull --dir ${{APPTAINER_FOLDER}} {apptainer_name}.sif docker://{docker_path}".format(apptainer_name=apptainer_name, docker_path=docker_path) + srun_list.append(srun_string) + + scratch_folder_name = "${{SCRATCH_{}}}".format(project) + data_beginn = [ + "#!/bin/sh", + "echo Job started", + + "JOBDIR=job1", + + "export WRITABLE_DIRECTORY=/tmp/cacheapptainer/${JOBDIR}Cache", + "export APPTAINER_FOLDER={}/apptainerfolder".format(scratch_folder_name), + + "mkdir -p ${WRITABLE_DIRECTORY}", + "mkdir -p ${APPTAINER_FOLDER}", + + "export APPTAINER_CACHEDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", + "export APPTAINER_TMPDIR=$(mktemp -d -p $WRITABLE_DIRECTORY)", + "echo ${APPTAINER_CACHEDIR}", + "echo ${APPTAINER_TMPDIR}" + ] + + data_end = [ + "rm -rf ${APPTAINER_CACHEDIR}", + "rm -rf ${APPTAINER_TMPDIR}" + ] + + data_complete = data_beginn + srun_list + data_end + + sbatch_setting = [ + "#!/bin/bash", + f"#SBATCH --account={project}", + f"#SBATCH --partition={partition}", + "#SBATCH --nodes=1", + "#SBATCH --mem-per-cpu=4G # memory per CPU core", + "#SBATCH --time=30", + "#SBATCH --output=stdout", + "#SBATCH --error=stderr" + ] + + if num_gpu>0: + sbatch_setting.append("#SBATCH --gres=gpu:{}".format(num_gpu)) + + job_dic = { + "Name": "Pull job", + "User email": email, + "Job type": "RAW", + "BSS file": "bss.sh", + "Project": project, + "Executable": "/bin/sh", + "Arguments": ["pull.sh"], + "Imports": [ + { + "To": "pull.sh", + "Data": data_complete + }, + { + "To": "bss.sh", + "Data": sbatch_setting + } + ] + } + + return job_dic + def generate_run_config(self,unicore_config): email = unicore_config["notification_email"] diff --git a/src/hpc_deployer/utils/config.py b/src/hpc_deployer/utils/config.py index 5c08067959dd3ac7ac149ed898051ae0db30b1d8..396d0c717edd5632f929ef718b709d4992aa8b3d 100644 --- a/src/hpc_deployer/utils/config.py +++ b/src/hpc_deployer/utils/config.py @@ -12,10 +12,9 @@ class Config: self.orchestrator_id = 99 self.orchestrator_host = "localhost" self.orchestrator_portgrpc= "9200" - self.orchestrator_portwebui = "9201" self.orchestrator_cpu = 4 - self.orchestrator_url = "/generic-parallel-orchestrator/orchestrator_container:1.8" - self.orchestrator_start= "pipenv run python3 -m /app/ai4eu.orchestratorservice" + self.orchestrator_url = "/generic-parallel-orchestrator/orchestrator_container:1.9-hpc" + self.orchestrator_start= "python -m ai4eu.orchestratorservice -p {}".format(self.orchestrator_portgrpc) self.path_to_blueprint = os.path.join(base_path, "blueprint.json") self.path_to_dockerinfo = os.path.join(base_path, "dockerinfo.json") diff --git a/src/hpc_deployer/webui/app.py b/src/hpc_deployer/webui/app.py index f98f3e8c2909edd9ae8ee1b4449865614185e3ae..15a99a929e4904e2bdbc7962bb45716e2a4d990a 100644 --- a/src/hpc_deployer/webui/app.py +++ b/src/hpc_deployer/webui/app.py @@ -93,10 +93,10 @@ def save_dockerinfo(input_list): def generate_unicore_config(): for container in containers: - a = container["image_url"] path = urlparse(container["image_url"]).path + if path.startswith("7444"): + path = path[len("7444"):] container["image_url"] = config.docker_registery_url + path - print(a) dic={ "containers":containers @@ -226,7 +226,7 @@ def configure_orchestrator(): "name": config.orchestrator_name, "cpu": config.orchestrator_cpu, "portgrpc": config.orchestrator_portgrpc, - "portwebui": config.orchestrator_portwebui, + "portwebui": config.orchestrator_portgrpc, "startcommand": config.orchestrator_start, "image_url":config.orchestrator_url } diff --git a/src/hpc_deployer/webui/templates/index.html b/src/hpc_deployer/webui/templates/index.html index 34b1cbcc7e1987da652fb31f39cc403396c3f941..efe589f94513b5301252bf0a336696eb3a3f6c57 100644 --- a/src/hpc_deployer/webui/templates/index.html +++ b/src/hpc_deployer/webui/templates/index.html @@ -129,6 +129,10 @@ </div> </div> + <form action="/job" method="get"> + <button type="submit" class="btn btn-warning btn-block">Go to Orchestartor page</button> + </form> + </div> </div>