TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Structuring Your Infrastructure as Code

100 pointsby jaxxstormalmost 2 years ago

6 comments

redeuxalmost 2 years ago
I also think about layers when I set up IaC, but I&#x27;m more focused on how things connect and relate rather than sticking strictly to the OSI stack model. In my mind, it&#x27;s all about grouping things that might influence each other. This approach usually leads me to think in three layers: foundation, shared services, and applications.<p>Starting at the bottom, the foundation layer holds the basics like networking, storage, accounts, and permissions. The shared services layer is where I place tools like certificate managers and secret storage. I keep services that interact closely together, while separating those that work more independently. At the top, I lay out the applications. This is where I slot in services like auto-scaling groups, individual server instances, load balancers (depending on whether they&#x27;re communal or specific), and pods in platforms like Kubernetes. Depending on the complexity of the environment there may be 1 or multiples of each layer.<p>By structuring IaC this way, I find it’s clearer and more intuitive.
评论 #37194728 未加载
crabbonealmost 2 years ago
I was looking for the explanation about how this grouping is like the OSI model, but found none...<p>Also, I think where OP uses &quot;principal&quot; they mean &quot;principle&quot;.<p>The whole article reads as an advertorial for Pulumi. :|<p>OP also never bothers to ask themselves questions like &quot;what if I&#x27;m wrong?&quot; or &quot;what to do with this obvious claim that doesn&#x27;t add up?&quot;.<p>For example: why is &quot;Data&quot; layer below &quot;Compute&quot;? -- that&#x27;s the kind of question that&#x27;s never addressed by OP. I mean, most people in the industry wouldn&#x27;t think about this as being layers, and definitely not being one on top of the other. To convince someone you need to give a very solid argument here... but there&#x27;s nothing there...
评论 #37194044 未加载
评论 #37195118 未加载
评论 #37194158 未加载
评论 #37194432 未加载
msiealmost 2 years ago
I don&#x27;t believe everything should be in code. I think code is too verbose and a config file just make sense in many cases.
评论 #37194298 未加载
评论 #37195033 未加载
agumonkeyalmost 2 years ago
the recent years often remind me of alan kay talking of objects made up of object talking to objects, i wonder if IaC amongst other trends is not an incarnation of that on a wide scale
评论 #37194282 未加载
martini333almost 2 years ago
Great read, but could benefit from some proofreading...
评论 #37195638 未加载
lijokalmost 2 years ago
This has to be the worst take on IAC organization I have ever seen. I would have never thought someone would try to apply the osi model to infra code management.<p>How long does it take to deploy a new service with this approach? A week?
评论 #37193060 未加载
评论 #37193491 未加载
评论 #37187466 未加载
评论 #37193650 未加载
评论 #37194449 未加载
评论 #37192920 未加载