我们都听说过自动化,但这是什么意思?

拿我的个人Google日历(我也可以检查我的workGoogle日历,但是那在哪里有趣?)。作为一名创造性作家,我一直在寻找出版物可以将我的作品发送到的。许多人只接受特定提交窗口中的故事 - 我在访问他们的网站并发现他们对新作品的关闭后发现。

我不相信我会记得在32天内回来,而是拿出手机并在Google日历中快速记录。然后,它会提醒我提交窗口打开的那一天,因此我可以将故事添加到编辑队列中。Google日历不仅为我跟踪这些日期,而且我还可以根据我的时间表在特定时间设置警报。

Download Now: Free Intro Guide to HTML & CSS

Google日历周的视图

图像源

此功能比我相信自己常规检查它的传统日历更好(这几乎是有问题的)。例如,我会在下午6:00设置一个提醒Strange Horizons为了提交意见而打开,因为我将不再上班,并且可以在短时间内提交一件作品。如果活动或任务要进行更多准备,我可以提前设置警报,例如婚礼前一周。

DevOps生命周期可以自动化,就像我如何自动化写作意见一样。在这篇文章中,我们分解了DevOps Automation是什么,实施它的最佳实践以及通过自动化工作流可以实现的目标。

DevOps and Automation

DevOps和自动化混合在一起那么的自然t it's easy to assume they're synonymous. In fact, automation is a core value of DevOps and supports the other values of the DevOps philosophy. With standardized notifications and reporting, communication improves between individual stakeholders. Automated handoffs now move the product through the pipeline for quicker turnarounds instead of team members transferring the code manually.

不仅可以通过DevOps自动化来改善流程,而且团队满意度也会提高。例如,自动化工具检查应用程序日志以识别潜在问题,从而使操作团队成员不得不手动筛选数百个状态更新。

现在,团队成员可以专注于解决问题而不是识别问题,而是标记更快,并且人为错误的风险大大降低了。当DevOps Automation实施得当时,每个人都会受益。

现在我们知道了DevOps自动化是什么,让我们研究如何实施此策略以优化软件开发生命周期。bob电竞官方下载

Building Automation for DevOps in Your Company

那么,您如何开始自动化DevOps生命周期?计划是确保成功推出的关键。首先,绘制您现有的DevOps管道以识别工具链和流程中的空白。这些信息应该使您对自动化的存在的位置有一个好主意。

Next, compare this map with any existing data you have on turnaround time, iterations, and other metrics that are important to your team. This data should provide additional insights into where automation can produce the most impact and help set measurable goals in the following step. If you do not have all the data that you would like, address this in your automation strategy.

现在您已经有了目标和数据来告知您的方法,现在该决定自动化策略的目标了。这些应该是可衡量的基准测试,因此您可以确定您的推出是否达到了期望。

理想情况下,您的方法应该有助于实现DevOps的一个或多个更大的好处:

  • 标准化
  • Flexibility
  • 一致性
  • Speed
  • 可伸缩性

现在,您已经了解了管道的完整图片并已经确定了您的目标,可以选择目标自动化的区域。

What should you automate?

每个组织和团队都是独一无二的,但是DevOps管道中有几个阶段,团队通常会自动化:

  • bob电竞官方下载软件测试
  • Infrastructure management
  • Monitoring and reporting

We'll cover each of these sections in more detail below.

DevOps Automated Software Testing

bob电竞官方下载软件测试is a subset of DevOps automation focused on streamlining the testing process for applications before releasing them to the IT operations team. This process is an important piece of the DevOps lifecycle for catching and fixing issuesthe application is deployed to users. Naturally, automation will more thoroughly cover every aspect of an application and its features versus human inspection. Automation also scales to simulate thousands of users for stress testing software.

bob电竞官方下载根据范围,软件测试分为几个不同的类别:

  • 单位测试:检查各个源代码以确保每个功能按预期
  • 集成测试:检查代码组,以确保它们按预期合作
  • 端到端测试:检查整个应用程序以确保其按预期工作
  • 探索性测试: examining the entire application in anunmethodicalapproach to mirror user interactions (since one user will probably not use every single feature of your application)

DEVOPS自动化软件测试策略的真实示例是使用Test.ai之类的框架来模拟用户行为bob电竞官方下载并确定UI中的任何错误以在部署前修复。

自动化基础架构管理

Once you have finished testing your application, it's time to deploy it. However, provisioning servers and networks can require a lot of manual work between the initial setup, configuration management, and maintenance.

幸运的是,DevOps自动化提供了解决方案。bob电竞官方下载软件定义的基础架构(SDI)意味着工具负责这些任务而不是人类。SDI不仅释放了团队成员,而且还提供了我们之前看到的许多其他好处:规模,一致性和速度。

A real-life example of DevOps automated infrastructure management is using tools such as AWS CodeDeploy to create software environments using predefined templates. These tools allow teams to deploy new applications and push out updates to existing applications instantaneously.

自动监控和报告

您的应用程序现在已经有效,但是工作尚未完成。DEVOPS生命周期的关键部分是监视已部署的应用程序是否有麻烦的迹象。在这种情况下,麻烦可以是从错误到停机到的任何事情cyber-attacks;每当您的应用程序不按预期的方式行事时。

Rather than depending on user feedback — at which point the issue is already disrupting their experience — DevOps teams will implement automated monitoring and reporting for early warnings.

第一步是定义这些工具的标准,并为不同动作设定阈值。监视工具将检查是否有警告标志的不同参数,例如服务器请求的平均响应时间。某些问题可能是常规的,优先级较低,因此您可以在工具中协调解决方案的响应。

对于高阶问题,星期一itoring tools should flag these for human intervention with appropriate context to help the operations team respond. Assigning levels of priority to each alert will also help guide operator responses, so you should focus on basing levels of priority around the issue's impact on the application. Alarm fatigue is a real phenomenon; we've all received an email marked "URGENT" only to find out it was not critical.

DEVOPS自动监视和报告的真实示例是实现Splunk之类的服务,以监视您的应用程序网络以检测入侵。根据您的参数,Splunk将阻止不良演员在警报过程中更深地渗透到网络中,从而减轻可能导致人类操作员做出反应时间的损害。

您如何使DevOps生命周期自动化?

Returning to my Google Calendar example, good automation depends on good tools. If Google Calendar wasn't flexible and responsive to my needs (e.g. I couldn't adjust the reminder notification time), I might be更糟的是跟踪应用程序中的提交日期。您已经看到了DevOps自动化工具highlighted in the earlier sections, so let's dive into some best practices for selecting the right tool for the job.

Let's run through each of these points.

1. Focus on tools that will integrate with other systems.

有许多用于解决特定用例的工具,而唯一的重点是它们完美地解决了问题。但是,DevOps的最佳工具将与其他工具一起提供集成和插件,以便代码和信息可以在DevOps生命周期的阶段之间流动。

For example, you finish building the application and commit the production code to GitHub. Jira is integrated with GitHub so that all you need to do is check the task off within GitHub. Now the testing team is automatically notified that the task is completed so they can start testing the application.

2. Focus on reusable code and strategies.

A great DevOps tool will not only satisfy one use case but extend to others as well. The more universal the tool, the more return on the price and onboarding time invested.

想象一下,需要打开20个不同的应用程序来完成您的日常任务。您自然会浪费时间在它们之间来回移动与合并和集中式工具堆栈之间的来回移动。

3. Prioritize open-source tools.

开源工具不仅在大多数情况下是免费的,而且还提供了超出成本节省的其他收益。首先,这些工具提供了更大的可见性“在引擎盖下”,因此您的团队对他们的功能的工作方式有了更大的了解。

其次,开源工具具有文档和专用的用户组,可简化入职和培训过程。这些特权将开源工具与专有工具区分开来,您可能需要专门的培训来学习界面。

4.选择代码和操作系统“不可知论”的工具。

A central value of DevOps is remaining adaptive to new approaches, so don't allow yourself to be siloed by tools that only work under specific environments. For example, if your testing tool only reviews Python, then that's another con for transitioning to JavaScript — even if JavaScript would provide greater functionality in the long run.

或者,如果您的工具仅在Linux中运行,那么这将是从过渡到Mac OS的另一个中断。显然,重要的是要权衡大规模变化的成本和收益,并确保短期破坏不会超过长期收益。无论如何,通过选择一种可以适应团队策略的工具来节省自己的头痛,而不是相反。

这些最佳实践中的一个共同主题是灵活性,但是DevOps自动化中心在标准化中的许多好处。虽然这两个值似乎是矛盾的,但它们完全相互补充。关键是要在正在进行的过程中实现标准化,同时随着技术的发展而保持灵活的新方法。在工作流程适应性时,您的产品对客户和用户都是一致的。

实现DevOps自动化的好处

自动化的目标是在提高团队满意度的同时取得更大的成果。Google日历可以帮助我将作品发送给更多出版物,如果我错过了杂志的提交窗口,就会消除失望。

在DevOps的范围内,自动化有助于团队在消除琐碎任务的同时实现更大的一致性,速度和规模。员工也对自己的工作感到更加满意,并能够将精力集中在高阶任务上。借助数据支持的仔细计划,您可以为团队获得这些好处,并为软件开发流程增添收益。bob电竞官方下载

New Call-to-action

css introduction

最初发布于2021年11月16日7:00:00 AM,更新于2021年11月16日

话题:

Developer Operations