(基于Python的自动化运维系统)AutomaticoperationandmaintenancesystembasedonPython内容摘要自动化运维系统能够为运维人员提供对大规模服务器群集进行可视化运维操作的平台,通过自动化运维系统运维人员可以更直观清晰的了解和记录主机信息,并进行管理。本文设计并实现了一个自动化运维系统。系统设计开发使用VIM开发工具,Python开发语言,MySQL数据库,使用了集中化运维管理工具SaltStack,基于web.py的架构完成,该系统设计实现的功能包括:账户管理,主机管理,已加入SaltStack的主机信息采集,Master监控,本系统同时提供对于远程主机的命令管理。关键词:Python;SaltStack;自动化运维AbstractTheautomatedoperationandmaintenancesystemcanprovideaplatformfortheoperationandmaintenancepersonneltovisualizetheoperationandmaintenanceoflarge-scaleserverclusters.Throughtheautomaticoperationandmaintenancesystem,theoperationandmaintenancepersonnelcanunderstandandrecordthehostinformationmoreintuitivelyandclearly,andmanageit.Thispaperdesignsandimplementsanautomatedoperationandmaintenancesystem.ThesystemdesignanddevelopmentusesVIMdevelopmenttools,Pythondevelopmentlanguage,MySQLdatabase,andusesthecentralizedoperationandmaintenancemanagementtoolSaltStack,whichiscompletedbasedontheweb.pyarchitecture.Thefunctionsdesignedandimplementedbythesysteminclude:accountmanagement,hostmanagement,andhasjoinedSaltStackThehostinformationcollection,Mastermonitoring,thesystemalsoprovidescommandmanagementfortheremotehost.Keywords:Python;Saltstack;Automatedoperations目录第一章绪论..................................................11.1研究意义与目的.........................................11.2研究背景和现状.........................................11.3系统内容综述与论文结构..................................21.3.1本文主要内容........................................21.3.2本文主要结构........................................2第二章系统分析与设计........................................42.1需求分析...............................................42.2系统总体设计............................................42.2.1开发结构设计........................................42.2.2系统架构设计........................................42.2.3总体功能架构........................................52.3SaltStack综述.........................................62.3.1简介................................................62.3.2SaltStack基本原理..................................62.3.3SaltStack的部署架构................................72.3.4为何选择SaltStack..................................92.4开发技术综述............................................92.4.1Python编程语言.....................................92.4.2web.py框架........................................102.4.3Mako模板..........................................102.4.4psutil库..........................................102.4.5Dmidecode工具.....................................102.4.6MySQL数据库.......................................102.5系统所需环境及数据库设计...............................102.5.1系统运行时所需环境................................112.5.2环境配置...........................................112.5.3数据库表分析.......................................112.5.4概念模型设计.......................................122.5.5数据库表结构设计...................................12第三章自动化运维系统的详细设计与实现.......................153.1用户模块的设计与实现...................................153.1.1登陆注册流程..............................