My understanding of the DevOps

 

A, DevOps intentions

       What is DevOps? To answer this question, we must first define personnel involved in the process of DevOps who is ? That development teams and IT operations teams ! So, what is the intention of DevOps is it? That is between the two teams, establish good communication and collaboration, faster and more reliable to create high-quality software !

       In fact, not cooperation between these two teams to help deliver better software, but unity between "development" and "operation and maintenance" team lead to improved software and faster delivery. Let us not forget the role of DevOps automation tools in achieving played.

       Development and operation and maintenance "one" feeling is a combination of skill and practice between developers and operations engineers, and the bridge due to automation (DevOps) tool implementation. Large Internet companies around the world have adopted DevOps approach to radically improved performance, security, and team dynamics.

       In this article, let us see what is DevOps, why is it so important! We will first trace the evolution of software development methods result in DevOps, and then explore what is DevOps its life cycle, and by evaluating the world's top companies, take a look at how to use DevOps to advantage.

Second, the evolution of software development

       Over the years, DevOps developed from existing software development strategies / methods, in order to respond to business needs. Let's briefly look at how these models are evolving, and they are best suited scene.

       Slow and cumbersome waterfall model evolved into agile software development team to complete the development in a short time, it does not last even more than two weeks. Such a short release cycle to help the development team to handle customer feedback and bug-fix it merged into the next release together.

       Although this method is agile SCRUM development brings agility, but it has lost in the operation and maintenance aspects of the speed of Agile practices. Between the developers and the lack of operation and maintenance engineers collaborate still slows down the development process and release.

       DevOps approach is based on better collaboration and faster delivery needs arising . DevOps allowed to fix and solve problems faster delivery with less complex problems continued software .

       Now that we understand the development of DevOps, let's take a closer look at what DevOps Yes.

Third, what is DevOps

       DevOps is a software development method , involves the entire software development life cycle of sustained development, continuous testing, continuous integration, continuous deployment and ongoing monitoring . These activities can only be achieved in DevOps, not agile or waterfall, which is why the top Internet companies choose DevOps as the forward direction of its business objectives. DevOps preferred method is to develop high-quality software in a shorter development cycles, can improve customer satisfaction.

       Without knowing DevOps lifecycle, understanding of DevOps will be one-sided. Now let's take a look at DevOps lifecycle, and to explore the software development phase shown how they are associated with the lower figure.

3.1, sustained development

       This is DevOps lifecycle software ever developed stage. The difference is that with the waterfall model, software deliverables are broken down into multiple tasks node short development cycle, developed and delivered in a very short period of time.

       This phase includes coding and building stages , and using Git and SVN and other tools to maintain different versions of the code , as well as Ant, Maven, Gradle and other tools to build / package code into executable files , these files can be forwarded to the automated test system test.

3.2 for test

       At this stage, the development of the software will be continuously tested bug. For continuous testing, automated testing tools, such as Selenium, TestNG, JUnit and so on. These tools allow the quality management system is fully tested in parallel a plurality of code libraries, functions to ensure that no defects. At this stage, Docker containers using real-time simulation "test environment" is also the first choice. Once the code by testing, it will continue to integrate with existing code.

3.3 Continuous Integration

       This new feature is support for code integrated with existing code phase. Because the software is constantly developing, constantly updated code required to integrate and successfully integrated with the system to reflect the needs of the end user changes. Code changes should also make sure there are no errors runtime environment, allowing us to test changes and check how it reacts with other changes occur.

       Jenkins is a very popular tool for continuous integration . Use Jenkins, can be extracted from the git repository of the latest revision of the code, and generates a build eventually be deployed to the test or production server. You can set it to when a change occurs in the git repository automatically trigger a new building, you can manually trigger when you click the button.

3.4, continued deployment

       It is to deploy the code to the stages of the production environment. Here, we ensure that the correct code is deployed on all servers. If you add any features or introduce new features, it should be ready for more website traffic. Therefore, the system operation and maintenance personnel are also responsible for the expansion server to accommodate more users.

       Since the new code is the continuous deployment, the configuration management tools can quickly and frequently performed tasks. Puppet, Chef, SaltStack and Ansible are some of the popular tools used in this phase.

       Container tools during the deployment phase also plays an important role. Docker and Vagrant is a popular tool that helps achieve consistency in the development, testing, staging and production environments. In addition, they also help to easily expand and shrink instances.

3.5, continuous monitoring

       This is DevOps lifecycle critical stage, intended to improve software quality through performance monitoring software. This participatory approach involving the operations team who will monitor user activity in any improper conduct error / system. This can also be achieved by using a dedicated monitoring tool, the tool will continue to monitor application performance and outstanding problems.

       Some popular tools using Splunk, ELK Stack, Nagios, NewRelic and Sensu. These tools help to closely monitor the application and the server to proactively check the system operating conditions. They can also increase productivity and improve system reliability, reducing IT support costs. Any major problems found are reported to the development team so that it can be repaired in the continued development stage.

       The DevOps stage continuous cycle until the desired product quality. The following chart will show which tools can be used at any stage DevOps lifecycle.

       Now that we have identified the importance of DevOps, and understand its different stages and DevOps tools involved, and now let's look at a case study of Facebook, and understand why they turned from DevOps agility. We will use the use cases of the new features Facebook has launched these new features lead to re-evaluate its Facebook product delivery and use DevOps approach.

Four, DevOps case studies

       Once, Facebook to several million users around the world launched a series of new features - Timeline, recommendation and music features. After the release of huge traffic generated on the Facebook cause the server to crash. It launched a large-scale extraordinary gain of function in response to the user, which led to new features produce uncontrollable results, so that they did not anticipate.

       This has led Facebook to re-evaluate and adjust the strategy, so that Facebook launched a dark-start technology. Use DevOps principles, Facebook created the following method for their new release.

Facebook dark-start technology

       暗启动是在新功能完全发布给所有用户之前,逐步将新功能,推广到选定的一组用户的过程。 这允许开发团队尽早获得用户反馈,测试错误,并且还可以测试基础架构性能。 这种发布方法是持续交付的直接结果,有助于实现更快,更迭代的版本,确保应用程序性能不会受到影响,并且用户可以很好地更新该版本。

       在暗启动技术中,新功能通过专用的部署管道发布给小型用户群。 在上面给出的Facebook暗启动图表中,您可以看到只打开了一个部署管道,将新功能部署到一组选定用户。 此时剩余的数百条管道全部关闭。

       持续监视部署功能的特定用户群,以收集反馈并识别错误。 这些错误和反馈将被纳入开发,测试和部署在同一用户群中,直到功能变得稳定。 一旦实现稳定性,通过启用其他部署管道,将逐步在其他用户群上部署这些功能。

       Facebook通过将代码包装在功能标记或功能切换中来实现此目的,该切换用于控制谁可以看到新功能以及何时查看。与此同时,模拟向用户启动代码的全部效果,在向用户开放全部功能之前,可以及早的暴露应用程序基础架构的痛点和区域,功能稳定后,将通过多个版本将其部署到其余用户。

       通过这种方式,Facebook拥有一个受控或稳定的机制,可以为其庞大的用户群开发新功能。相反,如果功能没有得到很好的响应,他们可以选择完全回滚部署。这也帮助他们为部署准备服务器,因为他们可以预测网站上的用户活动,并相应地扩展服务器。上面给出的图表描述了Facebook的暗启动过程。

五、总结

       微信,淘宝,以及许多领先的科技巨头,在向所有人发布之前,都使用暗发布逐渐向一小部分用户发布和测试新功能。

       DevOps的目的是更快速,更可靠地创建质量更好的软件,同时开发,运维团队之间进行更多的沟通和协作。 它是一个自动化过程,允许快速,安全和高质量的软件开发和发布,同时保持所有利益相关者在一个循环中。 这就是DevOps获得越来越多的大型互联网公司青睐的真正原因。

 

发布了12 篇原创文章 · 获赞 19 · 访问量 8711

Guess you like

Origin blog.csdn.net/liuhuiteng/article/details/93595317