展示HN:在OCaml中自举的Terraform编排

1作者: sausagefeet4 个月前原帖
我们是马尔科姆和乔什,两个工程师,在阅读了《独立公司》这本书后,决定自创一家公司。(如果你还没读过,这本书非常适合那些想要建立可持续业务而不是追求指数增长的人。)我们从未打算建立一家专注于Terraform的公司。我们只想要独立和一种生活方式的商业模式,结果却走到了这里。 Terrateam是一个开源工具,可以在拉取请求中运行和应用Terraform计划。可以将其视为专为处理大型单体代码库和灵活工作流程而设计的Terraform编排工具。 几年前,我们在尝试如何启动一家公司。我们不想依赖风险投资。我们希望获得独立和可持续的业务,即使它增长缓慢。这就是我们的目标。 我们最初尝试了很多东西,比如Package Depot、Curl Bash,以及一个叫“Hosted Atlantis”的项目。结果都没有真正奏效。但Terraform总是不断回到我们的视野中。老实说,我们并不是超级粉丝。整天编写HCL并没有让我们感到兴奋。但围绕Terraform的编排问题是不可避免的。Atlantis(默认的开源解决方案)在处理单体代码库时会遇到瓶颈。Terraform Cloud则昂贵且不够灵活。GitHub Actions也不够稳定。我们知道这些都是实际存在的痛点。 于是我们开始构建Terrateam。起初,它基本上是“OCaml版的Atlantis”,因为我喜欢编写OCaml,而类型系统让我在进行大规模重构时更有信心。回想起来,我们尝试了一次做太多事情,且没有明确区分。但随着时间的推移,我们逐渐理清了思路。 Terrateam的优势在于: - 单体代码库,得益于标签系统,让你可以通过自定义工作流程、策略和访问控制,针对基础设施中最低层的部分进行操作。我们有团队在数万个目录的大型代码库中运行Terrateam,标签系统使得运行保持隔离和可管理。 - 一切直接在拉取请求中运行,无需额外的用户界面。我们认为额外的仪表板是一个不必要的上下文切换,尽管当拉取请求过于受限时,我们仍会提供一个。 - 我们是自筹资金、以盈利为目的的开源项目。我们的大多数竞争对手都是闭源的,依赖风险投资,并专注于大型企业。我们则瞄准中型市场。这些团队需要编排,但不想花费六位数的预算,也不想在预算会议上讨论,或将工程师转移到构建和维护自己的系统上。Terraform编排的重要性足以值得付费,但大多数团队不应该自己去构建和维护这个问题。 至于人工智能,我们尚不清楚它的适用位置。今天我们认为,编排仍然是一个人类工作流程,涉及人员审核计划、执行政策和批准变更。也许未来人工智能会增强这一过程,但我们目前的重点是确保基础功能的可靠性。基础设施的变更应该是有意为之的。 获得关注仍然是最困难的部分。我们没有大规模的营销预算。我们不是默认的开源选择,因为Atlantis仍然占据这一位置。但我们构建了真正的团队在生产环境中使用的工具,我们认为这里的工程和商业问题足够有趣,值得分享。 代码库: [https://github.com/terrateamio/terrateam](https://github.com/terrateamio/terrateam) 我们非常欢迎反馈,尤其是来自那些尝试自创基础设施工具、思考开发工具市场推广策略或在大规模使用Terraform时遇到挑战的人。
查看原文
We are Malcolm and Josh, two engineers who wanted to bootstrap a business after reading the book Company of One. (If you haven&#x27;t read it, it is a great book about building something sustainable instead of chasing exponential growth.) We never set out to build a Terraform company. We just wanted independence, a lifestyle business, and ended up here.<p>Terrateam is an open source tool that runs Terraform plans and applies inside pull requests. Think of it as Terraform orchestration designed to handle large monorepos and flexible workflows.<p>A few years ago we were trying to figure out how to start a company. We did not want VC money. We wanted independence and something sustainable, even if it grew slowly. That was the goal.<p>We tried a bunch of things first, Package Depot, Curl Bash, and something called &quot;Hosted Atlantis.&quot; None of it really worked. But Terraform kept coming back into the picture. Honestly, we were not superfans. Writing HCL all day never excited us. But the orchestration problems around Terraform were unavoidable. Atlantis (the default OSS solution) would choke on monorepos. Terraform Cloud was expensive and rigid. GitHub Actions were brittle. We knew these were real pain points.<p>So we started building Terrateam. At first it was basically &quot;Atlantis in OCaml&quot; because I like writing OCaml and the type system gave me confidence in big refactors. Looking back, we tried to do too much at once and we did not differentiate clearly. But over time, we have figured it out.<p>What works well with Terrateam:<p>Monorepos, thanks to a tag system that lets you target the lowest possible piece of your infrastructure with custom workflows, policies, and access controls. We have teams running Terrateam across enormous repos with tens of thousands of directories, and the tag system keeps runs isolated and manageable Everything runs directly in PRs with no required UI. We think extra dashboards are an unnecessary context switch, although we still provide one when PRs are too constrained We are bootstrapped, for profit, and open source. Most of our competitors are closed source, VC funded, and focused on large enterprise. We are aiming at the mid-market instead. These are the teams that need orchestration, but do not want to spend six figures, talk about it in budget meetings. or divert engineers to build and maintain their own system. Terraform orchestration is important enough to pay for, but not the kind of problem most teams should be building and maintaining themselves.<p>As for AI, we do not yet know where it fits. Today we believe orchestration is still a human workflow, with people reviewing plans, enforcing policies, and approving changes. Maybe AI augments that in the future, but our focus is on making the fundamentals reliable right now. Infrastructure changes should be intentional.<p>Getting noticed is still the hardest part. We do not have a big marketing budget. We are not the default open source choice because Atlantis still is. But we have built something that real teams use in production, and we think the engineering and business problems here are interesting enough to be worth sharing.<p>Repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;terrateamio&#x2F;terrateam" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;terrateamio&#x2F;terrateam</a><p>We would love feedback, especially from others who have tried to bootstrap infra tools, thought about GTM for devtools, or fought Terraform at scale.