Shopify的Isospin工具背后的故事

You may have read that Shopify has built an in-house cloud development platform named Spin. In that post, we covered the history of the platform and how it powers our everyday work. In this post, we’ll take a deeper dive into one specific aspect of Spin: Isospin, Shopify’s systemd-based tooling that forms the core of how we run applications within Spin.

你可能已经读过Shopify建立了一个名为Spin的内部云开发平台。在那篇文章中,我们介绍了该平台的历史以及它是如何为我们的日常工作提供动力的。在这篇文章中,我们将深入探讨Spin的一个具体方面:Isospin,Shopify的基于systemd的工具,构成了我们在Spin中运行应用程序的核心。

The initial implementation of Spin used the time-honored POSS (Pile of Shell Scripts) design pattern. As we moved to a model where all of our applications ran in a single Linux VM, we were quickly outgrowing our tooling⁠—not to mention the added complexity of managing multiple applications within a single machine. Decisions such as what dependency services to run, in what part of the boot process, and how many copies to run became much more difficult as we ran many applications together within the same instance. Specifically, we needed a way to:

Spin的最初实施采用了历史悠久的POSS(Pile of Shell Scripts)设计模式。当我们转移到一个模型,所有的应用程序都在一个单一的Linux虚拟机中运行时,我们很快就超出了我们的工具,更不用说在一台机器中管理多个应用程序的额外复杂性。当我们在同一实例中同时运行许多应用程序时,诸如运行哪些依赖性服务、在启动过程的哪个部分以及运行多少个副本等决定变得更加困难。具体来说,我们需要一种方法来。

  • split up an application into its component parts
  • 将一个应用程序拆成其组成部分
  • specify the dependencies between those parts
  • 指定这些部分之间的依赖关系
  • have those jobs be scheduled at the appropriate times
  • 让这些工作安排在适当的时间
  • isolate services and processes from each other.
  • 将服务和进程相互隔离。

At a certain point, stepping back, an obvious answer began to emerge. The needs we were describing weren’t merely solvable, they were already solved—by something we were already using. We were describing services, the same as any other services run by the OS. There were already tools to solve this built right into the OS. Why not leverage that?

在某一点上,退一步讲,一个明显的答案开始出现了。我们所描述的需求不仅仅是可以解决的,它们已经被我们已经在使用的东西所解决了。我们描述的是服务,与操作系统运行的任何其他服务一样。在操作系统中已经有了解决这个问题的工具。为什么不利用这一点呢?

A Lightning Tour of systemd

systemd的闪电之旅

systemd’s service management wo...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.123.1. UTC+08:00, 2024-03-29 07:11
浙ICP备14020137号-1 $访客地图$