cfengine

linux运维人员必会运维工具

爷,独闯天下 提交于 2020-08-06 09:57:38
linux运维人员必会开源运维工具体系 说明:不同的技术人员,不同的阶段确定知识边界非常重要,否则,就像马拉车,不知道终点在哪,累死也达不到目标。例如拿8K要学多少,拿15K要学多少。一个新手也许只想拿8k结果 各种学, 学了2年,发现都学了,结果8k还是拿不到,归根结底,没边界瞎学,熊瞎子掰苞米,掰一个丢一个,学知识是有周期的,学太多又拖太长和没学差不多,2016年5月更新! 新手必会用 深×××(8-15k) 标记,老鸟必会 深××× + 浅蓝色(15-25K)标记 ============================================== 操作系统: Centos ,Ubuntu,Redhat,suse , Freebsd 网站服务: nginx ,apache , lighttpd, php , tomcat , resin 数据 库: MySQL ,Mysql-proxy, MariaDB , PostgreSQL DB中间件: MyCat , atlas, cobar ,amoeba,MySQL-proxy 代理相关: lvs,keepalived , haproxy , nginx , heartbeat 网站缓存: squid , nginx , varnish NOSQL库: memcached , memcachedb, MongoDB

001. Ansible简介

只愿长相守 提交于 2020-04-18 00:28:48
一 简介 Ansible是一款极其简单的自动化运维工具, 基于Python开发, 集合了众多运维工具(puppet, cfengine, chef, func, fabric)的优点。 实现了批量系统配置, 批量程序部署, 批量运行命令等功能。 Ansible是基于模块工作的, 本身没有批量部署的能力。真正具有批量部署的是ansible所运行的模块, Ansible只是提供一种框架。主要包括: Play books:任务剧本(任务集),编排定义Ansible任务集的配置文件,由Ansible依次执行多个任务,通常是JSON格式的YML文件; Host inventory: Ansible管理主机的清单,指定操作的主机, 是一个配置文件里面定义监控的主机; Modules:各种模块核心模块, command模块等,也包括自定义模块; Connection plugins: 负责和被监控端实现通信; Plugins:模块功能的补充,如连接类型插件、循环插件、变量插件等,可借助于插件完成更丰富的功能。 二 工作机制 用户使用Ansible或Playbook,在服务器中断输入Ansible的Ad-Hoc命令集或Playbook; Ansible遵循预先编排的规则将Playbooks逐条拆解为Play; Play组织成Ansible可识别的任务(Task);

自动化运维工具Ansible-基础介绍(一)

走远了吗. 提交于 2020-04-13 11:54:16
【今日推荐】:为什么一到面试就懵逼!>>> 自动化运维工具Ansible-基础介绍 1、简介 ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。ansible是基于模块工作的,本身没有批量部署的能力。真正具有批量部署的是ansible所运行的模块,ansible只是提供一种框架。主要包括: (1)、连接插件connection plugins:负责和被监控端实现通信; (2)、host inventory:指定操作的主机,是一个配置文件里面定义监控的主机; (3)、各种模块核心模块、command模块、自定义模块; (4)、借助于插件完成记录日志邮件等功能; (5)、playbook:剧本执行多个任务时,非必需可以让节点一次性运行多个任务。 2、特性 (1)、no agents:不需要在被管控主机上安装任何客户端; (2)、no server:无服务器端,使用时直接运行命令即可; (3)、modules in any languages:基于模块工作,可使用任意语言开发模块; (4)、yaml not code:使用yaml语言定制剧本playbook; (5)、ssh by default:基于SSH工作; (6)

CFEngine - set variable if a specific package version is installed

本秂侑毒 提交于 2019-12-25 08:13:41
问题 A script needs to support two servers, Fedora and Centos, with different versions of httpd (Apache). CFEngine is used to create the configuration file and it needs to put different sections to the file depending on which httpd version is installed in the system. How can I set a variable to true/false depending on which version is installed so that I can then generate the file appropriately? All the examples I could find only deal with installing, upgrading or removing packages. 回答1: You could

cfEngine3 - class if package is installed

醉酒当歌 提交于 2019-12-25 00:04:51
问题 how can i set a class if a package is installed ? Background : i want to trigger a file modification only if a package is installed (optional in a specific version). My (example) code unfortunately doesn't work : vars: "cfengine_rpm" data => packagesmatching("cfengine-nova", ".*", ".*", ".*"); "cfengine_rpm_installed" slist => getindices(cfengine_rpm); classes: "cfengine_installed" expression => some("cfengine", cfengine_rpm_installed); reports: cfengine_installed:: "cfEngine is installed ";

Host group on CFEngine

爷,独闯天下 提交于 2019-12-13 18:26:36
问题 I have to write a policy for defining various Host groups, for a particular thing it should check set of parameters according to host group. For example I have 2 different set of web cluster, On one cluster httpd.conf is kept under /usr/local/apache/httpd.conf and for another set it is kept under /etc/httpd/httpd.conf . I have a policy to check file changes of these configuration but I want a way in which I can define for a particular host group where exactly it should check. Any Hint, help

Configuration Management for Windows [closed]

拜拜、爱过 提交于 2019-11-29 19:19:25
Are there any tools for windows like that *nix world has? I am looking for something like Chef or Puppet . I have found cfEngine but it still looks very *nix centric. Ideally it would be open source, and command line driven. The idea is to put together an automated infrastructure with windows based servers. Our current IT department does not allow non-windows servers. Chef is supported on Windows by Opscode. While we don't run Windows for any of our infrastructure, we do have developers who are continually improving our Windows support. We also get community contributions, and most of the

Configuration Management for Windows [closed]

爱⌒轻易说出口 提交于 2019-11-28 13:45:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Are there any tools for windows like that *nix world has? I am looking for something like Chef or Puppet. I have found cfEngine but it still looks very *nix centric. Ideally it would be open source, and command line driven. The idea is to put together an automated infrastructure with windows based servers. Our