数据中心基础设施自动化运维之puppet专项
http://forge.puppetlabs.com/treydock/yum_cron 【puppet功能扩展forge】
http://docs.puppetlabs.com/references/latest/type 【puppet 资源类型】
Every resource has a type, a title, and a set of attributes:
general form of a resource declaration is:
The resource type, in lower-case
An opening curly brace
The title, which is a string
A colon
Optionally, any number of attribute and value pairs, each of which consists of:
An attribute name, which is a bare word
A => (arrow, fat comma, or hash rocket)
A value, which can be any data type, depending on what the attribute requires
A trailing comma (note that the comma is optional after the final attribute/value pair)
Optionally, a semicolon, followed by another title, colon, and attribute block
A closing curly brace
core of the Puppet language is declaring resources;
Groups of resources can be organized into classes;
catalog will be in memory as a Ruby object, transmitted as JSON, and persisted to disk as YAML;
case $operatingsystem {
centos, redhat: { $service_name = 'ntpd' }
debian, ubuntu: { $service_name = 'ntp' }
}
package { 'ntp':
ensure => installed,
}
service { 'ntp':
name => $service_name,
ensure => running,
enable => true,
subscribe => File['ntp.conf'],
}
file { 'ntp.conf':
path => '/etc/ntp.conf',
ensure => file,
require => Package['ntp'],
source => "puppet:///modules/ntp/ntp.conf",
# This source file would be located on the puppet master at
# /etc/puppetlabs/puppet/modules/ntp/files/ntp.conf (in Puppet Enterprise)
# or
# /etc/puppet/modules/ntp/files/ntp.conf (in open source Puppet)
}
数据中心基础设施自动化运维之puppet专项的更多相关文章
- 企业级自动化运维工具---puppet详解
本文收录在Linux运维企业架构实战系列 1.认识puppet 1.1 引入 puppet是什么,咱们先不用专业的名词解释它,咱们先描述一些工作场景,看明白这些工作场景,自然会知道puppet是什么. ...
- 项目10.2-企业级自动化运维工具---puppet详解
1.认识puppet 1.1 引入 puppet是什么,咱们先不用专业的名词解释它,咱们先描述一些工作场景,看明白这些工作场景,自然会知道puppet是什么. (1)场景一: 管理员想要在100台服务 ...
- 自动化运维工具——puppet详解(一)
一.puppet 介绍 1.puppet是什么 puppet是一个IT基础设施自动化管理工具,它能够帮助系统管理员管理基础设施的整个生命周期: 供应(provisioning).配置(configur ...
- 自动化运维工具——puppet详解(二)
一.class 类 1)什么是类? 类是puppet中命名的代码模块,常用于定义一组通用目标的资源,可在puppet全局调用: 类可以被继承,也可以包含子类: 具体定义的语法如下: class NAM ...
- 自动化运维工具 ~puppet~
一.模板的应用 到目前为止,资源申报.定义类.声明类等所有功能都只能一个manifest文件中实现,但这却非有效的基于puppet管理IT资源架构的方式.实践 中,一般需要把manifest文件分解成 ...
- 自动化运维之puppet的学习(如何找到你需要的模块)
https://forge.puppetlabs.com/ puppet 模块下载 http://kisspuppet.com/2014/01/14/puppet_forge_modules/ pu ...
- centos6.5环境自动化运维之puppet实现nginx反向代理功能及puppet安装配置详解
puppet是一种Linux.Unix.windows平台的集中配置管理系统,使用自有的puppet描述语言,可管理配置文件.用户.cron任务.软件包.系统服务等.puppet把这些系统实体称之为资 ...
- 自动化运维工具之Puppet基础入门
一.简介 puppet是什么?它能做什么? puppet是一个IT基础设施自动化运维工具,它能够帮助系统管理员管理基础设施的整个生命周期:比如,安装服务,提供配置文件,启动服务等等一系列操作:基于pu ...
- 自动化运维之Saltstack
第三十八课 自动化运维之Saltstack 目录 一.自动化运维介绍 二. saltstack安装 三. 启动saltstack服务 四. saltstack配置认证 五. saltstack远程执行 ...
随机推荐
- 关于Mysql数据库longblob格式数据的插入com.mysql.jdbc.PreparedStatement.setBinaryStream(ILjava/io/InputStream;J)V问题分析
当数据库字段为blob类型时 ,我们如果使用PreparedStatement中的setBinaryStream(int,InputStream,int)方法需要注意 在向blob字段类型中插入数据时 ...
- 面向站长和网站管理员的Web缓存加速指南
详细了解HTTP缓存控制及为什么要缓存. 英文版: http://www.mnot.net/cache_docs/ 中文版:http://www.chedong.com/tech/cache_docs ...
- Kinetic使用注意点--blob
new Blob(config) 参数: config:包含所有配置项的对象. { points: "存放路径点的数组,可以用一层数组[a,b,c,d].二层数组[[a,b],[c,d]]或 ...
- JQuery插件,傻傻分不清!
不多说,直接上代码! 第一种 extend <!-- extend 扩展jQuery,其实就是增加一个静态方法 --> $.extend({ sayH ...
- 增加字体和颜色样式-------CSS
通过使用CSS,控制文本的字体,风格和颜色 1.基本操作: body{ font-family: Verdana, Geneva, Tahoma, sans-serif } body{ font-si ...
- 在JSP中使用BootStrap
1. 下载BootStrap,然后再Jsp标签中添加如下标签: <html> <head lang="zh-cn"> <meta charset=&q ...
- .net和MVC中的json值和List<T>和DataTable的一些转换
1.List<T>集合转换为Json值 List<ReportModel> dtList = new List<ReportModel>(); JsonResult ...
- use-a, has-a, is-a和实现关系
use-a关系 如果类A与类B是 use-a 关系,则A具有类型为B.B&.const B&.B*.const B*的一个成员,或者是可以轻易以上述对象之一 返回一个B的函数.于是A可 ...
- Qt for PC,Qt for iOS,Qt for Android (居士的博客)
http://blog.csdn.net/Esonpo/article/details/38081607 http://blog.csdn.net/Esonpo/article/details/380 ...
- 分析Java的类加载器与ClassLoader(二):classpath与查找类字节码的顺序,分析ExtClassLoader与AppClassLoader的源码
先回顾一下classpath classpath的作用: classpath的作用是指定查找类的路径:当使用java命令执行一个类(类中的main方法)时,会从classpath中进行查找这个类. 指 ...