Skip to content

Commit

Permalink
feat(post): add new post for deep dive on terraform github runners
Browse files Browse the repository at this point in the history
Signed-off-by: Bruce Becker <[email protected]>
  • Loading branch information
brucellino committed Jan 13, 2024
1 parent abb8a93 commit 20185dc
Show file tree
Hide file tree
Showing 5 changed files with 643 additions and 10 deletions.
69 changes: 69 additions & 0 deletions _includes/diagrams/github-runners-cloudflare-diagram.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<pre class="mermaid">
---
title: Github Runners on Demand Workflow, showing Github Actions, Repo triggers, Cloudflare and Nomad (in Hashi@Home)
flowchartConfig:
width: 100%
config:
theme: base
themeVariables:
background: "#d8dee9"
fontFamily: "Roboto Mono"
primaryColor: "#88c0d0"
secondaryColor: "#81a1c1"
tertiaryColor: "#ebcb8b"
primaryTextColor: "#2e3440"
secondaryTextColor: "#3b4252"
primaryBorderColor: "#7C0000"
lineColor: "#F8B229"
fontSize: "20px"
---
flowchart TB
commit(Commit)
repo(Git Repo)
webhook(Repo Webhook)
action_workflow(Github Action workflow)
action_job(Github Action job)
runner(Github Self-Hosted runner)
listener(Webhook receiver)
worker([Cloudflare Worker])
tunnel(Cloudflare tunnel)
cf_app(Cloudflare Application)
nomad_job(Nomad Parametrized job)
nomad(Nomad Dispatch API)

%% triggers %%
subgraph Triggers["fa:fa-github Triggers"]
direction LR
commit-- Push update to -->repo
commit-- Trigger -->action_workflow
end

%% webhook flow %%
subgraph Webhooks
direction TB
repo-- Emit -->webhook
subgraph Cloudflare["fab:fa-cloudflare"]
direction LR
webhook-- POST -->listener
listener-- Route -->cf_app
zta-- Protect -->cf_app
cf_app-- Invoke -->worker
worker-- POST -->tunnel
end

subgraph Nomad
direction LR
tunnel-- Expose -->nomad
nomad-- Schedule -->nomad_job
nomad_job-- Instantiates -->runner
end
end

%% actions flow %%
subgraph Actions["fa:fa-github Actions"]
action_workflow-- Schedules -->action_job
action_job-- Requests -->runner
runner-- Executes -->action_job
action_job-- Notifies Status -->commit
end
</pre>
9 changes: 0 additions & 9 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,3 @@
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
<script>
$(document).ready(function () {
mermaid.initialize({
startOnLoad: true,
theme: "forest",
});
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
});
</script>
10 changes: 10 additions & 0 deletions _includes/mermaid.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{% comment %}
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
{% endcomment %}
<script>
$(document).ready(function () {
mermaid.initialize({
startOnLoad:true,
theme: "default",
fontSize: "28px",
sequence: {
actorFontSize: "28",
actorFontFamily: "IBM Plex Mono",
messageFontSize: "28",
messageFontFamily: "IBM Plex Mono",
showSequenceNumbers: false,
}
});
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
});
Expand Down
2 changes: 1 addition & 1 deletion _posts/2023-11-29-github-runners-on-demand.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ I am looking forward to seeing how far I can push this with Asciidoctor and Stru

### Reducing rework

Taken individually, this may seem like sterile navel gazing, but if we can keep the design, code and docs in a single place, and communicate effectively to the target audience, I have a suspicion that this will help significantly in getting things done right the first time, without resorting to interminable meetings and begrudging rework.
Taken individually, this may seem like sterile navel gazing, but if we can keep the design, code and docs in a single place, and communicate effectively to the target audience, I have a suspicion that this will help significantly in getting things done right the first time, without resorting to interminable meetings and begrudging rework

## References and Footnotes

Expand Down
Loading

0 comments on commit 20185dc

Please sign in to comment.