mongodb分布式部署_使用Kubernetes和MongoDB Atlas进行现代分布式应用程序部署

mongodb分布式部署

Storytelling is one of the parts of being a Developer Advocate that I enjoy. Sometimes the stories are about the special moments when the team comes together to keep a system running or build it faster. But there are less than glorious tales to be told about the software deployments I’ve been involved in. And for situations where we needed to deploy several times a day, now we are talking nightmares.

讲故事是成为我所喜欢的开发者倡导者的一部分。 有时,这些故事是关于团队聚集在一起以保持系统运行或更快构建的特殊时刻。 但是,关于我所参与的软件部署,没有比这更辉煌的故事了。对于我们每天需要部署几次的情况,现在我们正在做噩梦。

For some time, I worked at a company that believed that deploying to production several times a day was ideal for project velocity. Our team was working to ensure that advertising software across our media platform was always being updated and released. One of the issues was a lack of real automation in the process of applying new code to our application servers.

一段时间以来,我在一家公司工作,我认为一天进行几次生产部署是项目速度的理想选择。 我们的团队正在努力确保整个媒体平台上的广告软件始终得到更新和发布。 问题之一是在将新代码应用于我们的应用服务器的过程中缺乏真正的自动化。

What both ops and development teams had in common was a desire for improved ease and agility around application and configuration deployments. In this article, I’ll present some of my experiences and cover how MongoDB Atlas and Kubernetes can be leveraged together to simplify the process of deploying and managing applications and their underlying dependencies.

运维团队和开发团队的共同点是希望围绕应用程序和配置部署提高易用性和敏捷性。 在本文中,我将介绍一些经验,并介绍如何将MongoDB Atlas和Kubernetes一起使用,以简化部署和管理应用程序及其底层依赖项的过程。

Let's talk about how a typical software deployment unfolded:

让我们讨论一下典型的软件部署是如何进行的:

  1. The developer would send in a ticket asking for the deployment

    开发人员将发送票证以要求部署
  2. The developer and I would agree upon a time to deploy the latest software revision

    我和开发人员会商定时间来部署最新的软件版本
  3. We would modify an existing bash script with the appropriate git repository version info

    我们将使用适当的git仓库版本信息修改现有的bash脚本
  4. We’d need to manually back up the old deployment

    我们需要手动备份旧的部署
  5. We’d need to manually create a backup of our current database

    我们需要手动创建当前数据库的备份
  6. We’d watch the bash script perform this "Deploy" on about six servers in parallel

    我们将观看bash脚本在大约六台服务器上并行执行此“部署”
  7. Wave a dead chicken over my keyboard

    在我的键盘上挥动一只死鸡

Some of these deployments would fail, requiring a return to the previous version of the application code. This process to "rollback" to a prior version would involve me manually copying the repository to the older version, performing manual database restores, and finally confirming with the team that used this system that all was working properly. It was a real mess and I really wasn't in a position to change it.

其中一些部署将失败,需要返回到应用程序代码的先前版本。 这个“回滚”到先前版本的过程将涉及到我手动将存储库复制到较早的版本,执行手动数据库还原,最后与使用该系统的团队确认所有工作正常。 这真是一团糟,我真的无能为力。

I eventually moved into a position which gave me greater visibility into what other teams of developers, specifically those in the open source space, were doing for software deployments. I noticed that — surprise! — people were no longer interested in doing the same work over and over again.

最终,我进入了一个职位,使我对其他开发人员团队(尤其是开源领域的其他团队)在进行软件部署方面的工作有了更大的了解。 我注意到了-感到惊讶! -人们不再对一遍又一遍地进行相同的工作感兴趣。

Developers and their supporting ops teams have been given keys to a whole new world in the last few years by utilizing containers and automation platforms. Rather than doing manual work required to produce the environment that your app will live in, you can deploy applications quickly thanks to tools like Kubernetes.

通过使用容器和自动化平台,在过去的几年中,开发人员及其支持的操作团队已获得了通往全新世界的钥匙。 借助Kubernetes之类的工具,您可以快速部署应用程序,而无需执行产生应用程序将要生存的环境所需的手动工作。

什么是Kubernetes? ( What's Kubernetes? )

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. Kubernetes can help reduce the amount of work your team will have to do when deploying your application. Along with MongoDB Atlas, you can build scalable and resilient applications that stand up to high traffic or can easily be scaled down to reduce costs. Kubernetes runs just about anywhere and can use almost any infrastructure. If you're using a public cloud, a hybrid cloud or even a bare metal solution, you can leverage Kubernetes to quickly deploy and scale your applications.

Kubernetes是一个开源系统,用于自动化容器化应用程序的部署,扩展和管理。 Kubernetes可以帮助减少团队在部署应用程序时必须要做的工作量。 与MongoDB Atlas一起,您可以构建可扩展且具有弹性的应用程序,这些应用程序可以承受高流量,也可以轻松缩小规模以降低成本。 Kubernetes几乎可以在任何地方运行,并且可以使用几乎任何基础架构。 如果您正在使用公共云,混合云甚至是裸机解决方案,则可以利用Kubernetes快速部署和扩展应用程序。

The Google Kubernetes Engine is built into the Google Cloud Platform and helps you quickly deploy your containerized applications.

Google Kubernetes Engine内置在Google Cloud Platform中,可帮助您快速部署容器化的应用程序。

For the purposes of this tutorial, I will upload our image to GCP and then deploy to a Kubernetes cluster so I can quickly scale up or down our application as needed. When I create new versions of our app or make incremental changes, I can simply create a new image and deploy again with Kubernetes.

在本教程中,我将映像上传到GCP,然后部署到Kubernetes集群,以便可以根据需要快速扩展或缩小应用程序。 当我创建应用程序的新版本或进行增量更改时,我可以简单地创建一个新映像并再次使用Kubernetes进行部署。

为什么选择Kubernetes的Atlas? ( Why Atlas with Kubernetes? )

By using these tools together for your MongoDB Application, you can quickly produce and deploy applications without worrying much about infrastructure management. Atlas provides you with a persistent data-store for your application data without the need to manage the actual database software, replication, upgrades, or monitoring. All of these feat

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值