Skip to content

Commit

Permalink
Add a local development diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
martinabrle committed Oct 30, 2023
1 parent 145d71b commit ed74748
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
This is a simple Todo List demo app, built with Java 11, Springboot and Thymeleaf frameworks. It can run locally with an embeded H2 DB (no configuration needed), with a local Postgresql Database for more realistic testing, locally with a Postgresql backend in Azure or fully deployed into Azure. When deployed into Azure, it will be taking advantage of Log Analytics Workspace and Application Insights for monitoring, Keyvault for managing secrets, AppService for running the app, PostgresQL Flexible Server for storing the data in a resilient manner and GitHub Actions for CI/CD. With AppService deployment, we are using deployment slots for staging and production environments. GitHub actions in turn use just one protected environment, PRODUCTION, for a gated deployment into production. Most of the features used here work with a free tier of Azure services, so you can try it out without incurring any costs. On the Github side, majority of the features will work with a free version of GitHub Actions. Protected environments (gated PRODUCTION deployment)will only work with a public repo or with a paid version of GitHub, GitHub Enterprise.

## Running the app locally with H2 database
You can the app locally with H2 database for testing purposes by following the next steps:
![Architecture Diagram](./diagrams/demo-app-local-in-memory-db.drawio.png)

You can run the app locally with H2 database for testing purposes by following the next steps:
* Install Java 11 and Maven locally
* Run the command line of your choice and make sure that Java 11 SDK is installed and in your path
```
Expand Down
81 changes: 81 additions & 0 deletions diagrams/demo-app-local-in-memory-db.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<mxfile host="app.diagrams.net" modified="2023-10-30T10:28:22.422Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" etag="osZnh9nyCiLfRyYEymtU" version="22.0.8" type="device">
<diagram id="CIYdKKqNAJBwTVAFqt9w" name="Page-1">
<mxGraphModel dx="1415" dy="802" 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="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-1" value="WEB + API" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/app_services/App_Services.svg;" parent="1" vertex="1">
<mxGeometry x="402" y="102" width="64" height="64" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-9" value="" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/general/Browser.svg;" parent="1" vertex="1">
<mxGeometry x="80" y="88" width="65" height="52" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-10" value="" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/general/Browser.svg;" parent="1" vertex="1">
<mxGeometry x="90" y="98" width="65" height="52" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-11" value="" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/general/Browser.svg;" parent="1" vertex="1">
<mxGeometry x="100" y="108" width="65" height="52" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-12" value="" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/general/Browser.svg;" parent="1" vertex="1">
<mxGeometry x="110" y="118" width="65" height="52" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-13" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.995;exitY=0.276;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="0QP-IHk7IyoN1cNLL2Y5-12" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="180" y="142" as="sourcePoint" />
<mxPoint x="400" y="132" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-14" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.474;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.466;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="0QP-IHk7IyoN1cNLL2Y5-1" target="ZslZh0sM-f5XVa9DPkSD-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="135" as="sourcePoint" />
<mxPoint x="670" y="131" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-15" value="" style="shape=actor;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="87" y="119" width="40" height="60" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-16" value="" style="shape=actor;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="97" y="129" width="40" height="60" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-17" value="" style="shape=actor;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="107" y="139" width="40" height="60" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-18" value="" style="shape=actor;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="117" y="149" width="40" height="60" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-19" value="" style="shape=actor;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="127" y="159" width="40" height="60" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-22" value="Browser user(s)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
<mxGeometry x="79" y="212" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-26" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="22" as="sourcePoint" />
<mxPoint x="280" y="20" as="targetPoint" />
<Array as="points">
<mxPoint x="770" y="20" />
<mxPoint x="770" y="280" />
<mxPoint x="280" y="280" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0QP-IHk7IyoN1cNLL2Y5-27" value="&lt;ul&gt;&lt;li&gt;H2 DB Connection string &lt;i&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;(application-local.yml)&lt;/font&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;App DB User name&lt;/li&gt;&lt;li&gt;App DB User Password&lt;/li&gt;&lt;/ul&gt;" style="text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="442" y="129" width="176" height="73" as="geometry" />
</mxCell>
<mxCell id="gKN0slglhCB6e-M4ENdB-1" value="Local deployment" style="text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;" parent="1" vertex="1">
<mxGeometry x="18" y="20" width="252" height="40" as="geometry" />
</mxCell>
<mxCell id="SbZcLWqu1GxGIv8-tLfZ-1" value="GitHub Repo" style="aspect=fixed;html=1;points=[];align=center;image;fontSize=12;image=img/lib/azure2/general/Branch.svg;" parent="1" vertex="1">
<mxGeometry x="683" y="340" width="72" height="72" as="geometry" />
</mxCell>
<mxCell id="Wzz_lYJs2OhC6GSg2xJx-1" value="For fast local development and testing" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="33.5" y="52" width="216.5" height="28" as="geometry" />
</mxCell>
<mxCell id="ZslZh0sM-f5XVa9DPkSD-1" value="H2 in-memory DB" style="html=1;verticalLabelPosition=bottom;align=center;labelBackgroundColor=#ffffff;verticalAlign=top;strokeWidth=2;strokeColor=#0080F0;shadow=0;dashed=0;shape=mxgraph.ios7.icons.data;" vertex="1" parent="1">
<mxGeometry x="689" y="104.5" width="60" height="59" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added diagrams/demo-app-local-in-memory-db.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ed74748

Please sign in to comment.