Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ ehthumbs.db
*.iml
*.ipr
*.iws
._*.png
._*.webp
._*.svg


# Tests
coverage/
.jest/

# Vitepress
.vitepress/dist
.vitepress/cache
.backup
.remark-cache/
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.9 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.9">
<diagram name="Seite-1" id="Gjpo2csS5-b6mWFYLMsI">
<mxGraphModel dx="1114" dy="794" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="DkQQ7b9g_ovJa4es4mWr-2" value="App Project Repository" style="swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="80" y="80" width="240" height="90" as="geometry">
<mxRectangle x="40" y="40" width="100" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-3" value="I.e.: Change file:" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-2">
<mxGeometry y="30" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-4" value=".deploystack/docker-run.txt" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;fontFamily=Courier New;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-2">
<mxGeometry y="60" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="DkQQ7b9g_ovJa4es4mWr-7" target="DkQQ7b9g_ovJa4es4mWr-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-7" value="DeployStack GitHub App&lt;div&gt;Event on file Change&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="400" y="95" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="DkQQ7b9g_ovJa4es4mWr-3" target="DkQQ7b9g_ovJa4es4mWr-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="DkQQ7b9g_ovJa4es4mWr-9" target="DkQQ7b9g_ovJa4es4mWr-15">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-9" value="DeployStack Backend" style="swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="640" y="80" width="230" height="90" as="geometry">
<mxRectangle x="40" y="40" width="100" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-10" value="Validate Change within .deploystack" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-9">
<mxGeometry y="30" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-12" value="directory" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-9">
<mxGeometry y="60" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-14" value="DeployStack Backend" style="swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="120" y="240" width="230" height="90" as="geometry">
<mxRectangle x="40" y="40" width="100" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-15" value="Re-create IaC templates with new" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-14">
<mxGeometry y="30" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-17" value="values from docker-run.txt file" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-14">
<mxGeometry y="60" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-19" value="deploy-templates repository" style="swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="450" y="240" width="230" height="90" as="geometry">
<mxRectangle x="40" y="40" width="100" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-20" value="Push changes to IaC public repository" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-19">
<mxGeometry y="30" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-21" value="deploystackio/deploy-templates" style="text;strokeColor=none;fillColor=default;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="DkQQ7b9g_ovJa4es4mWr-19">
<mxGeometry y="60" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DkQQ7b9g_ovJa4es4mWr-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="DkQQ7b9g_ovJa4es4mWr-15" target="DkQQ7b9g_ovJa4es4mWr-20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/deploystack/iac-lifecycle.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 25 additions & 1 deletion docs/deploystack/iac-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,31 @@ Install the [DeployStack Repository Sync](/docs/deploystack/github-application.m
- Cloud providers update their IaC specifications
- DeployStack improves its template generation

![DeployStack IaC Lifecycle](/docs/assets/images/deploystack/iac-lifecycle.drawio.svg)
![DeployStack IaC Lifecycle](/docs/assets/images/deploystack/iac-lifecycle.webp)

## Update Flow

As the app GitHub repository owner, an update flow gives you control over the generation of Infrastructure as Code (IaC) templates. The flow allows you to regenerate IaC templates by changing, for example, the `.deploystack/docker-compose.yml` file.

All IaC templates are stored in public and open-source repository: [https://github.com/deploystackio/deploy-templates](https://github.com/deploystackio/deploy-templates).

### Prerequisites for activating the flow

1. You have installed the [DeployStack GitHub app](/docs/deploystack/github-application.md).
2. You have created the `.deploystack/docker-run.txt` or `.deploystack/docker-compose.yml` file.

The choice between `docker-run.txt` or `docker-compose.yml` depends on the submission process used to DeployStack. When submitting to DeployStack, you can choose two methods -> Docker Run or Docker Compose.

### Example flow

Let's say you want to change your image tag from "deploystack/awesomeapp:v1" to "deploystack/awesomeapp:v2-next".

![DeployStack IaC Lifecycle](/docs/assets/images/deploystack/deploystack-iac-flow-via-github-app.webp)

1. To do this, you will edit the file `.deploy stack/docker-run.txt` and change your new docker tag
2. GitHub will send an event to the DeployStack backend with the change of the file `.deploy stack/docker-run.txt` because you have the DeployStack GitHub app installed.
3. DeployStack backend validates the change, and if everything test passes
4. By using [docker-to-iac module](https://github.com/deploystackio/docker-to-iac), DeployStack backend will generate the new IaC templates for your application and store them in our repository [https://github.com/deploystackio/deploy-templates](https://github.com/deploystackio/deploy-templates)

## Update Triggers

Expand Down