Skip to content

Commit

Permalink
feat: added event bridge,dynamodb stream,iam role,iam policy, onprem,…
Browse files Browse the repository at this point in the history
… fallback
  • Loading branch information
tsypuk committed Aug 8, 2023
1 parent bd9d407 commit f3012da
Show file tree
Hide file tree
Showing 53 changed files with 1,093 additions and 49 deletions.
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ doc: test images

images:
/Applications/draw.io.app/Contents/MacOS/draw.io -q 100 -x -f jpg -r -o docs/docs/aws-components/output/jpg docs/docs/aws-components/output/drawio
/Applications/draw.io.app/Contents/MacOS/draw.io -q 100 -x -f jpg -r -o docs/docs/core-components/output/jpg docs/docs/core-components/output/drawio
/Applications/draw.io.app/Contents/MacOS/draw.io -q 100 -x -f jpg -r -o docs/docs/onprem-components/output/jpg docs/docs/onprem-components/output/drawio


landscape:
Expand All @@ -35,23 +37,29 @@ test:
$(call colorecho, "Run all Tests...")
poetry run python -m unittest -v tests/*.py
poetry run python -m unittest -v tests/aws/*.py
poetry run python -m unittest -v tests/core/*.py
poetry run python -m unittest -v tests/onprem/*.py
$(call colorecho, "Run flakehell lint...")
poetry run flakehell lint

check:
@echo Old tag: $(TAG) New tag: $(NEW_VERSION)

release:
$(call colorecho, "Releasing new version...")
pre-release:
$(call colorecho, "Preparing Release with new version...")
poetry version $(NEW_VERSION)
git add .
git tag $(NEW_VERSION)
$(MAKE) changelog
$(MAKE) release2docs
git tag -d $(NEW_VERSION)
git add . && git commit -m "bump: version $(TAG) -> $(NEW_VERSION)" && git tag $(NEW_VERSION)

release:
$(call colorecho, "Push to origin with TAGs...")
git push
git push --tags

release2docs:
$(call colorecho, "Releasing new version...")
$(call colorecho, "Adding changelog to online docs...")
{ echo '---'; echo 'title: CHANGELOG'; echo 'layout: default'; echo '---'; echo ''; cat CHANGELOG.MD; } > "docs/CHANGELOG.md"
86 changes: 86 additions & 0 deletions docs/docs/aws-components/dynamo_stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
layout: default
title: DynamoDB Stream
parent: AWS Components
nav_order: 1
date: 2023-08-06
---

# DynamoDB Stream
{: .d-inline-block }

New (v0.2.0)
{: .label .label-green }

## Node Type: ``dynamo_stream``

## Code Snippet:

```python
{% root_include_snippet ../tests/aws/test_dynamo_stream.py %}
```

## Rendering:

![lambda](output/jpg/dynamo_stream.jpg)


## drawio dynamo_stream vertex:

```xml
<?xml version="1.0" ?>
<mxCell id="vertex:dynamo_stream:arn:aws:dynamodb:eu-west-1:123456789012:table/test-table/stream" parent="1" vertex="1">

<mxGeometry width="78" height="78" as="geometry"/>

</mxCell>

```

## Advanced for Geeks:

### Style:
```html
style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#2E27AD;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.dynamodb_stream"
```
### Vertex size:

| width | height |
|:----------|:---------|
| 78 | 78|

### Full XML dump:
```xml
<?xml version="1.0" ?>
<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:dynamo_stream:arn:aws:dynamodb:eu-west-1:123456789012:table/test-table/stream" parent="1" vertex="1">

<mxGeometry width="78" height="78" as="geometry"/>

</mxCell>

</root>

</mxGraphModel>

</diagram>
</mxfile>

```

### drawio file:

Download generated ``dynamo_stream.drawio``:

[Download](output/drawio/dynamo_stream.drawio){: .btn .btn-purple }
86 changes: 86 additions & 0 deletions docs/docs/aws-components/event_bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
layout: default
title: Event Bridge
parent: AWS Components
nav_order: 1
date: 2023-08-06
---

# Event Bridge
{: .d-inline-block }

New (v0.3.11)
{: .label .label-green }

## Node Type: ``event_bridge``

## Code Snippet:

```python
{% root_include_snippet ../tests/aws/test_event_bridge.py %}
```

## Rendering:

![lambda](output/jpg/event_bridge.jpg)


## drawio event_bridge vertex:

```xml
<?xml version="1.0" ?>
<mxCell id="vertex:event_bridge:arn:aws:scheduler:eu-west-1:123456789012:schedule/group-1/schedule-rate" parent="1" vertex="1">

<mxGeometry width="78" height="78" as="geometry"/>

</mxCell>

```

## Advanced for Geeks:

### Style:
```html
style="sketch=0;outlineConnect=0;fontColor=#232F3E;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.eventbridge;"
```
### Vertex size:

| width | height |
|:----------|:---------|
| 78 | 78|

### Full XML dump:
```xml
<?xml version="1.0" ?>
<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:event_bridge:arn:aws:scheduler:eu-west-1:123456789012:schedule/group-1/schedule-rate" parent="1" vertex="1">

<mxGeometry width="78" height="78" as="geometry"/>

</mxCell>

</root>

</mxGraphModel>

</diagram>
</mxfile>

```

### drawio file:

Download generated ``event_bridge.drawio``:

[Download](output/drawio/event_bridge.drawio){: .btn .btn-purple }
86 changes: 86 additions & 0 deletions docs/docs/aws-components/iam_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
layout: default
title: IAM Policy
parent: AWS Components
nav_order: 1
date: 2023-08-06
---

# IAM Policy
{: .d-inline-block }

New (v0.2.0)
{: .label .label-green }

## Node Type: ``iam_policy``

## Code Snippet:

```python
{% root_include_snippet ../tests/aws/test_iam_policy.py %}
```

## Rendering:

![lambda](output/jpg/iam_policy.jpg)


## drawio iam_policy vertex:

```xml
<?xml version="1.0" ?>
<mxCell id="vertex:iam_policy:arn:aws:iam::123456789012:policy/ecs-cloudwatch-userPolicy" parent="1" vertex="1">

<mxGeometry width="78" height="67" as="geometry"/>

</mxCell>

```

## Advanced for Geeks:

### Style:
```html
style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#3F8624;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.policy;"
```
### Vertex size:

| width | height |
|:----------|:---------|
| 78 | 67|

### Full XML dump:
```xml
<?xml version="1.0" ?>
<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:iam_policy:arn:aws:iam::123456789012:policy/ecs-cloudwatch-userPolicy" parent="1" vertex="1">

<mxGeometry width="78" height="67" as="geometry"/>

</mxCell>

</root>

</mxGraphModel>

</diagram>
</mxfile>

```

### drawio file:

Download generated ``iam_policy.drawio``:

[Download](output/drawio/iam_policy.drawio){: .btn .btn-purple }
86 changes: 86 additions & 0 deletions docs/docs/aws-components/iam_role.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
layout: default
title: IAM Role
parent: AWS Components
nav_order: 1
date: 2023-08-06
---

# IAM Role
{: .d-inline-block }

New (v0.2.0)
{: .label .label-green }

## Node Type: ``iam_role``

## Code Snippet:

```python
{% root_include_snippet ../tests/aws/test_iam_role.py %}
```

## Rendering:

![lambda](output/jpg/iam_role.jpg)


## drawio iam_role vertex:

```xml
<?xml version="1.0" ?>
<mxCell id="vertex:iam_role:arn:aws:iam::123456789012:role/ec2-cloudwatch-role" parent="1" vertex="1">

<mxGeometry width="94.5" height="79.5" as="geometry"/>

</mxCell>

```

## Advanced for Geeks:

### Style:
```html
style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.role;fillColor=#759C3E;gradientColor=none;"
```
### Vertex size:

| width | height |
|:----------|:---------|
| 94.5 | 79.5|

### Full XML dump:
```xml
<?xml version="1.0" ?>
<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:iam_role:arn:aws:iam::123456789012:role/ec2-cloudwatch-role" parent="1" vertex="1">

<mxGeometry width="94.5" height="79.5" as="geometry"/>

</mxCell>

</root>

</mxGraphModel>

</diagram>
</mxfile>

```

### drawio file:

Download generated ``iam_role.drawio``:

[Download](output/drawio/iam_role.drawio){: .btn .btn-purple }

0 comments on commit f3012da

Please sign in to comment.