-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for different connectors in uml
- Loading branch information
Showing
6 changed files
with
235 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud"> | ||
<diagram id="diagram_1" name="AWS components"> | ||
<mxGraphModel dx="1015" dy="661" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1"> | ||
<root> | ||
<mxCell id="0"/> | ||
<mxCell id="1" parent="0"/> | ||
<mxCell id="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="<b>Name</b>: producer-lambda<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda<BR>-----------<BR><b>CodeSize</b>: 1234<BR><b>Handler</b>: main<BR><b>Layers</b>: 0<BR><b>Memory</b>: 128<BR><b>PackageType</b>: Zip<BR><b>Runtime</b>: go1.x<BR><b>Timeout</b>: 30<BR><b>TracingConfig</b>: {'Mode': 'Active'}<BR><b>Version</b>: $LATEST" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#F58534;gradientColor=none;html=1;" parent="1" vertex="1"> | ||
<mxGeometry width="69" height="72" as="geometry" x="-480" y="403"/> | ||
</mxCell> | ||
<mxCell id="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" value="<b>Name</b>: consumer-lambda<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#F58534;gradientColor=none;html=1;" parent="1" vertex="1"> | ||
<mxGeometry width="69" height="72" as="geometry" x="649.99953125" y="515"/> | ||
</mxCell> | ||
<mxCell id="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" value="<b>Name</b>: table1<BR><b>ARN</b>: arn:aws:dynamodb:eu-west-1:123456789012:table/table1" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.dynamo_db;fillColor=#2E73B8;gradientColor=none;" parent="1" vertex="1"> | ||
<mxGeometry width="72" height="81" as="geometry" x="649.99953125" y="718.5"/> | ||
</mxCell> | ||
<mxCell id="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" value="<b>Name</b>: internal<BR><b>ARN</b>: arn:aws:sns:eu-west-1:123456789012:internal.fifo<BR>-----------<BR><b>Owner</b>: 123456789<BR><b>SubscriptionsConfirmed</b>: 3<BR><b>SubscriptionsPending</b>: 0" style="sketch=0;outlineConnect=0;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sns;" parent="1" vertex="1"> | ||
<mxGeometry width="78" height="78" as="geometry" x="-70.97999999999999" y="400"/> | ||
</mxCell> | ||
<mxCell id="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" value="<b>Name</b>: events<BR><b>ARN</b>: arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo<BR>-----------<BR><b>DelaySeconds</b>: 0<BR><b>FifoQueue</b>: TRUE<BR><b>ReceiveMessageWaitTimeSeconds</b>: 0<BR><b>SqsManagedSseEnabled</b>: false<BR><b>VisibilityTimeout</b>: 30" style="sketch=0;outlineConnect=0;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sqs;" parent="1" vertex="1"> | ||
<mxGeometry width="78" height="78" as="geometry" x="260" y="512"/> | ||
</mxCell> | ||
<mxCell id="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" value="<b>Name</b>: events2<BR><b>ARN</b>: arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" style="sketch=0;outlineConnect=0;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sqs;" parent="1" vertex="1"> | ||
<mxGeometry width="78" height="78" as="geometry" x="260" y="310"/> | ||
</mxCell> | ||
<mxCell id="vertex:s3:arn:aws:s3:::bucket_name/key_name" value="<b>Name</b>: key_name<BR><b>ARN</b>: arn:aws:s3:::bucket_name/key_name" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.bucket_with_objects;fillColor=#E05243;gradientColor=none;" parent="1" vertex="1"> | ||
<mxGeometry width="78" height="78" as="geometry" x="-78" y="720"/> | ||
</mxCell> | ||
<mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:s3:arn:aws:s3:::bucket_name/key_name" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="edge:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="edge:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="edge:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda:to:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" target="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="2" parent="0" value="features"/> | ||
<mxCell id="3" parent="0" value="actors"/> | ||
<mxCell id="edge_features_1:s3:arn:aws:s3:::bucket_name/key_name:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0000FF;strokeWidth=3;fontSize=22;" parent="2" source="vertex:s3:arn:aws:s3:::bucket_name/key_name" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="label_features_1:s3:arn:aws:s3:::bucket_name/key_name:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="1: LifeConfig Rule invokes lambda function" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#00FF00;fontStyle=0;fontSize=14;" parent="edge_features_1:s3:arn:aws:s3:::bucket_name/key_name:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" vertex="1" connectable="0"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint as="offset"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="edge_features_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0000FF;strokeWidth=3;fontSize=22;" parent="2" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="label_features_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" value="2: Send Event to SNS that file processing is finished<BR>multiline<BR>note<BR>added on the right" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#00FF00;fontStyle=0;fontSize=14;" parent="edge_features_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" vertex="1" connectable="0"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint as="offset"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="edge_features_3:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0000FF;strokeWidth=3;fontSize=22;" parent="2" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="label_features_3:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" value="3: Fanout Event to SQS" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#00FF00;fontStyle=0;fontSize=14;" parent="edge_features_3:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" vertex="1" connectable="0"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint as="offset"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="edge_features_4:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0000FF;strokeWidth=3;fontSize=22;" parent="2" source="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" edge="2"> | ||
<mxGeometry as="geometry"/> | ||
</mxCell> | ||
<mxCell id="label_features_4:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" value="4: poll message from SQS and invoke consumer lambda function" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#00FF00;fontStyle=0;fontSize=14;" parent="edge_features_4:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" vertex="1" connectable="0"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint as="offset"/> | ||
</mxGeometry> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from multicloud_diagrams import MultiCloudDiagrams | ||
from samples.samples.aws_service_end_2_end import prepare_end2end | ||
|
||
|
||
def main(): | ||
mcd = MultiCloudDiagrams() | ||
|
||
prefix = 'prod' | ||
prev_file = f'../output/output.{prefix}_plantuml.end2end.drawio' | ||
|
||
mcd.read_coords_from_file(prev_file) | ||
prepare_end2end(mcd) | ||
|
||
mcd.read_uml_mappings('uml_mapping.yml') | ||
|
||
style = { | ||
'orthogonalLoop': '1', | ||
'edgeStyle': 'orthogonalEdgeStyle', | ||
'curved': '1', | ||
'startArrow': 'oval', | ||
'endArrow': 'classicThin', | ||
'dashed': '1', | ||
'strokeColor': '#0000FF', | ||
'strokeWidth': '3', | ||
'fontSize': '22' | ||
} | ||
|
||
label_style = { | ||
'labelBackgroundColor': 'none', | ||
'fontColor': '#00FF00', | ||
'fontStyle': 0, | ||
'fontSize': 14 | ||
} | ||
mcd.read_uml_from_file('features.plantuml', edge_style=style, label_style=label_style) | ||
|
||
result_file = f'../output/output.{prefix}_features.drawio' | ||
mcd.export_to_file(result_file) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@startuml | ||
participant S3Bucket | ||
participant LambdaFunction1 | ||
participant SNS | ||
queue SQS | ||
participant LambdaFunction2 | ||
database Storage | ||
|
||
S3Bucket-->LambdaFunction1: LifeConfig Rule invokes lambda function | ||
LambdaFunction1 ->> SNS: Send Event to SNS that file processing is finished | ||
note right | ||
multiline | ||
note | ||
added on the right | ||
end note | ||
SNS-->SQS | ||
SQS->LambdaFunction2: poll message from SQS and invoke consumer lambda function | ||
LambdaFunction2 -->> Storage: Update DynamoDB Table. Save image status. | ||
@enduml |
Empty file.
Oops, something went wrong.