Won't Python's ops all be unemployed? (Benefits included)

Source: Internet
Author: User
Tags cpu usage high cpu usage saltstack

导言:2017年无疑是Python最火的一年,为什么Python这么火,这里面功劳最大的或许就是AlphaGo了,你知道吗?AlphaGo是用Python开发的哦!从技术领先的运维工具到人工智能学习程序,你都能看到Python的身影。那么对于运维来说,不会Python就将要失业吗?我想看了作者对在Linux 系统运维中Python都有哪些应用的分析你就会知道Python对运维的重要性了。
Python analysis at this stage

At this stage, mastering a development language has become an essential skill for senior OPS engineers. If you do not develop, then you do not fully understand the business process of your system, then you will not be able to help debug and optimize the development of human development programs. Developers sometimes pay little attention to performance-related issues, who will do it? Still have to do the OPS.

Don't believe me? Give me a chestnut. A business is on-line, resulting in high CPU usage and high memory consumption. What to do? Is this an operation to solve or to develop?

If you do not develop, you may only be able to find the process level, that is, which process consumes so much, and then what? Usually directly to the developer to deal with, the developer confused the problem, unable to deliver the problem why do you realize the value of your operation?

In addition, the larger companies, servers are hundreds of, thousands, even tens of thousands of units, in this case how to do automated operation and maintenance? Write a script for loop with SHELL? Oh, take a break, how many shell scripts do you use to manage shell scripts? The shell script is also suitable for simple system administration work.

Building complex automation tasks has to be done with a dedicated development language. The existing open source software such as Puppet\saltstack\zabbix\nagio this kind of software is many.

But these are independent system software, in the operation and maintenance automation of the pursuit of unified management today, cross-platform maintenance can you endure it? Do not do custom, do not do two times development feasible? But you don't, what do you do? Looking for the development department? The development department does not understand the operation and maintenance of the actual business logic, written out of the rotten, rotten to not be used, this work will finally have to be entrusted to the operation and maintenance developers to do.

Second, will not be operational development, you can not write the operation and maintenance platform \ Complex operations tools, all to find some open-source software to patchwork, if so, please do not complain about your low salary, your work is not taken seriously.

Then why is Python?

PYTHON first is a very cow B glue language, to meet the vast majority of automated operation and maintenance needs, but also can do the back-end C/S architecture, and can use the web framework to quickly develop a high-speed web interface, but also to do machine learning, only when you have the ability to make a set of operations and maintenance automation system, Your value is reflected, you are qualified to talk to the boss, otherwise, or honestly go back to install the machine.

Common applications of Python in Linux operations first, static file server

Focus on practicing using Redux to manage state. Front-end API and backend interaction, data encapsulation, state change and so on.

Second, the Python development of the Jumpserver springboard machine


Jumpserver Springboard is an open-source Springboard (Fortress Machine) system written by Python, which realizes the function of the springboard machine. Based on the SSH protocol, the client does not need to install the agent.

Enterprises are mainly used to solve:
Visual Security Management

    • Characteristics:
      Fully open source, GPL licensed, Python authoring, Django Development Framework, easy to re-develop

    • The basic function of the springboard machine is realized:
      Certification, authorization, audit. Integrated with ansible, batch commands, and more. Powerful.

The popular point is to monitor who has done what on the server and so on. Video playback, command search, real-time monitoring, batch upload and download.

Third: magedu distributed monitoring system developed by Python


The automatic operation and maintenance perspective as the starting point, automatic function, monitoring alarm, performance tuning, combined with saltstack implementation of automated configuration management and other content of a full range of in-depth analysis.

Enterprises are mainly used to solve:
Automatic monitoring of common system services, applications, network equipment and so on. Distributed monitoring of more servers, sub-regional monitoring and re-aggregation. Zabbix monitoring is combined with Python custom monitoring scripts.

    • Monitoring System Requirements Analysis:
      Monitor common system services, applications, network equipment, etc. can monitor multiple different services on a single host, different service monitoring interval may be different? The same service on different host monitoring interval, alarm threshold can be different? Alarm level? Data visualization, how to make a simple and beautiful user interface? How to realize single machine support 5000+ machines monitoring requirements? What type of communication is adopted? Active or passive?

IV: The CMDB of the magedu developed by Python

Enterprises are mainly used to solve:
Project function, collect hardware data, API, page management. Statistical assets, such as server storage location, account number on the server, and so on.

    • The development of the CMDB needs to include three parts:
      Acquisition of hardware data, API, page management.

    • The process for executing the service is as follows:
      The client of the server collects the hardware data and sends the hardware information to the API,API responsible for saving the acquired data to the database, and the daemon is responsible for the configuration and presentation of the server information.

V: Python-developed task scheduling system

The multiprocessing module of the Python Task Scheduler system not only supports multiple processes, but also managers sub-modules to distribute multiple processes across multiple machines.

enterprises are mainly used to solve: Batch management crontab scheduled tasks. Principle users through the Web page set tasks, transfer to the task scheduling system server client, the client collects data feedback to the server side, the server side according to the task specific content scheduling backend cluster Server to do scheduled tasks.

A service process can act as a dispatcher, distributing tasks across multiple processes of other machines and relying on network traffic. Think of it, just wondering if you can use this module to implement a simple job scheduling system.

Sixth: Python Operational process System

A platform for scheduling and monitoring workflows written in the Python language is used internally to create, monitor, and tune data pipelines. Any workflow can be run on a platform written using Python.

enterprises are mainly used to solve: The popular point is to standardize operation and maintenance operations, to join the approval, step-by-step operation concept.

is a tool that allows workflow developers to easily create, maintain, and periodically schedule a running workflow (that is, to acyclic graphs or to become dags). These workflows include use cases spanning multiple departments such as data storage, growth analysis, email delivery, A/B testing, and so on.

The platform has the ability to interact with Hive, Presto, MySQL, HDFS, Postgres, and S3, and provides hooks to make the system very scalable. In addition to a command-line interface, the tool provides a Web-based user interface that allows you to visualize pipeline dependencies, monitor progress, trigger tasks, and more.

A little summary.

The combination of several actual projects can be understood into, operation and maintenance process system, is standardized operation and maintenance of each step, after approval, through the call task scheduling system to customize the batch operation. During the operation of the task scheduling system, the server details, IP address, user name, password, etc. can be obtained through the CMDB asset management system.

If it is necessary for operations personnel to directly log on to the server operation, it is necessary to log on to the server through a springboard machine, record who landed which server, specifically what to do and so on.

Above is a common five kinds of applications, please point!

Python automation mainly helps enterprises to solve the daily complex work affairs, data, visual monitoring of daily business operations.

Welcome to exchange and add!

This article is submitted by efficient operation and maintenance of the original author, the efficient operation and maintenance community is committed to accompany your career, with you happy growth.

Won't Python's ops all be unemployed? (Benefits included)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.