当前位置: 首页 > news >正文

有什么网站做知识吗郑州关键词优化费用

有什么网站做知识吗,郑州关键词优化费用,如何创建一个html网页,广州 网站开发 公司零基础学习Puppet自动化配置管理系列文档 注:以下内容是在foreman1.6.3puppet2.6.2环境下进行操作。更多配置请参考官网http://theforeman.org/manuals/1.6/index.html 安装好foreman和puppetmaster之后,接下来做的事情就是做整合,目前forema…

零基础学习Puppet自动化配置管理系列文档

注:以下内容是在foreman1.6.3+puppet2.6.2环境下进行操作。更多配置请参考官网http://theforeman.org/manuals/1.6/index.html

安装好foreman和puppetmaster之后,接下来做的事情就是做整合,目前foreman可以管理puppet的环境、类、类里的变量、报告、facter等信息。接下来会逐一进行介绍。

1、首先要保证智能代理已经代理了puppet和puppet CA

Foreman安装Foreman安装

代理puppet以及puppetCA,需要在foreman-proxy中开启。

#配置代理puppet
[root@puppetmaster162 ~]# cat /etc/foreman-proxy/settings.d/puppet.yml 
---
# Puppet management
:enabled: true   #开启
:puppet_conf: /etc/puppet/puppet.conf
# valid providers:
#   puppetrun   (for puppetrun/kick, deprecated in Puppet 3)
#   mcollective (uses mco puppet)
#   puppetssh   (run puppet over ssh)
#   salt        (uses salt puppet.run)
#   customrun   (calls a custom command with args)
:puppet_provider: mcollective
# customrun command details
# Set :customrun_cmd to the full path of the script you want to run, instead of /bin/false
:customrun_cmd: /bin/false
# Set :customrun_args to any args you want to pass to your custom script. The hostname of the
# system to run against will be appended after the custom commands.
:customrun_args: -ay -f -s
# whether to use sudo before the ssh command
:puppetssh_sudo: false
# the command which will be sent to the host
:puppetssh_command: /usr/bin/puppet agent --onetime --no-usecacheonfailure
# With which user should the proxy connect
#:puppetssh_user: root
#:puppetssh_keyfile: /etc/foreman-proxy/id_rsa
# Which user to invoke sudo as to run puppet commands
:puppet_user: root
# URL of the puppet master itself for API requests
:puppet_url: https://puppetmaster162.kisspuppet.com:8140
# SSL certificates used to access the puppet master API
:puppet_ssl_ca: /var/lib/puppet/ssl/certs/ca.pem
:puppet_ssl_cert: /var/lib/puppet/ssl/certs/puppetmaster162.kisspuppet.com.pem
:puppet_ssl_key: /var/lib/puppet/ssl/private_keys/puppetmaster162.kisspuppet.com.pem
# Override use of Puppet's API to list environments, by default it will use only if
# environmentpath is given in puppet.conf, else will look for environments in puppet.conf
#:puppet_use_environment_api: true#配置代理puppet ca
[root@puppetmaster162 ~]# cat /etc/foreman-proxy/settings.d/puppetca.yml 
---
# PuppetCA management
:enabled: true
:ssldir: /var/lib/puppet/ssl
:puppetdir: /etc/puppet

2、管理puppet环境

2.1、配置puppetmaster环境

puppet从2.6版本开始增加了“目录环境”的功能,更多详情请访问官网https://docs.puppetlabs.com/puppet/latest/reference/environments.html

[root@puppetmaster162 ~]# cat /etc/puppet/puppet.conf 
[master]...environmentpath  = /etc/puppet/environmentsbasemodulepath   = /etc/puppet/modules:/usr/share/puppet/modulesenvironment_timeout = 2  #多长时间刷新一次[root@puppetmaster162 ~]# ll /etc/puppet/environments/
total 24
drwxr-xr-x 4 root root 4096 Dec  5 16:46 development
drwxr-xr-x 4 root root 4096 Dec  5 16:46 example42
drwxr-xr-x 4 root root 4096 Dec  5 16:39 example_env
drwxr-xr-x 5 root root 4096 Dec  5 17:03 production
drwxr-xr-x 4 root root 4096 Dec  5 16:46 puppetlabs
drwxr-xr-x 7 root root 4096 Dec  5 17:03 temp

注意:从以上配置可以看得出设置了两个环境。

2.2、foreman上导入puppet环境

Foreman安装Foreman安装

3、管理puppet类

3.1、配置puppet类

注意以下几点:

  • puppet.conf中basemodulepath的值所设置的路径为环境目录下所有环境的公共环境,里面的所有模块都会被其他环境搜索到(在没有配置environment.conf的前提下)

  • 环境目录中每个环境目录里面默认应该包含manifests(存放主配置文件site.pp)目录和modules(存放模块)目录,目录结构如下。

      [root@puppetmaster162 environments]# tree production/production/├── environment.conf├── manifests│   └── site.pp├── modules│   ├── jenkins│   │   ├── files│   │   │   └── jenkins.repo│   │   ├── manifests│   │   │   ├── init.pp│   │   │   ├── install.pp│   │   │   ├── service.pp│   │   │   └── yum.pp│   │   ├── README│   │   └── templates│   └── motd│       ├── files│       │   └── motd│       ├── manifests│       │   └── init.pp│       └── templates└── system└── ssh├── files├── manifests│   ├── backup.pp│   ├── config.pp│   ├── init.pp│   ├── install.pp│   └── service.pp├── Modulefile├── README├── spec│   └── spec_helper.rb├── templates│   └── sshd_config.erb└── tests└── init.pp17 directories, 20 files
  • 如果你想在一个环境里包含多个目录,每个目录里面又包含模块,应该添加environment.conf文件

      [root@puppetmaster162 environments]# ll temp/total 24-rw-r--r--  1 root root   95 Dec  5 17:03 environment.conf  #添加环境搜索配置文件drwxr-xr-x 11 root root 4096 Dec  5 17:02 juhailudrwxr-xr-x  2 root root 4096 Dec  5 16:48 kisspuppetdrwxr-xr-x  4 root root 4096 Dec  5 16:56 lindrwxr-xr-x  2 root root 4096 Dec  5 16:48 manifestsdrwxr-xr-x  5 root root 4096 Dec  5 16:47 puppetlabs[root@puppetmaster162 environments]# ll temp/puppetlabs/total 12drwxr-xr-x 5 root root 4096 Dec  5 16:46 propuppet-demoappdrwxr-xr-x 5 root root 4096 Dec  5 16:46 puppetlabs-demoappdrwxr-xr-x 4 root root 4096 Dec  5 16:46 puppet-module-skeleton[root@puppetmaster162 environments]# cat temp/environment.conf #添加搜索路径modulepath = $basemodulepath:puppetlabs:modules:lin:modules:juhailu:modules:kisspuppet:modules

注意:添加搜索路径需要添加$basemodulepath,否则不会去搜索默认公共环境路径。

3.2、Foreman上导入puppet类

Foreman安装Foreman安装

4、设置ENC

4.1、通过节点直接管理模块

Foreman安装Foreman安装

备注:添加主类就可以了

这样节点和模块就关联上了,相当于在site.pp中添加如下代码

node  puppetmaster162.kisspuppet.com{   include ssh }

4.2、通过组继承模块

Foreman安装Foreman安装

Foreman安装Foreman安装

备注:如果使用组管理模块,不建议为某个节点单独勾选模块,否则你会发现如果先给节点添加了模块A,然后再给节点对应的组里添加了模块A,那么节点的puppet类哪里就会显示包含的类有两个同名的模块。

5、组与模块之间的管理

5.1、添加配置组

注:foreman从1.5版本开始增加了“配置组”功能,可以将多个模块添加到“配置组”,然后给配置组命名,这样,主机组在勾选模块的时候,只需要勾选配置组即可集成里面所有的模块

Foreman安装Foreman安装Foreman安装Foreman安装

6、查看设置是否成功

Foreman安装Foreman安装

Foreman安装Foreman安装

#可以通过以下方式查看,前提是需要先运行node.rb,可通过"puppet agent"命令或者"node.rb  <certname>" 进行触发。
[root@puppetmaster162 ~]# cat /var/lib/puppet/yaml/foreman/puppetmaster162.kisspuppet.com.yaml 
---
classes:ssh: 
parameters:puppetmaster: puppetmaster162.kisspuppet.comhostgroup: prdroot_pw: foreman_env: productionowner_name: Admin Userowner_email: root@kisspuppet.com

设置以上信息,可以完成ENC的功能,基本可以保障节点和class之间的勾连。可以在节点通过puppet agent命令进行测试。至于如何在foreman上进行推送,关注后续文章。


本文转自凌激冰51CTO博客,原文链接:http://blog.51cto.com/dreamfire/1589403,如需转载请自行联系原作者
http://www.lbrq.cn/news/2410363.html

相关文章:

  • 福州营销网站建设团队成都seo培训
  • 郉台网站建设淘宝seo排名优化
  • 浙江网站建设电话企业如何进行网络营销
  • 网站建设加优化如何推广网站方法
  • 用focusky做h5微网站百度账号登录个人中心
  • 做网站需要先申请域名电视剧排行榜
  • 网站源码 一品资源网bt搜索引擎
  • 做噯噯的网站网店运营在哪里学比较好些
  • diy网站建设源码如何让网站被百度收录
  • 王野发动机怎么样天津seo网络
  • 淄博网站排名外包百度云盘资源共享链接群组链接
  • 全国做临期进口食品的网站刷外链
  • 福州推广企业网站如何自己开个网站平台
  • 如何找枪手做网站淘宝关键词挖掘工具
  • 网站建设推广的10种方法什么软件推广效果好
  • three.js 做的网站关键词优化靠谱推荐
  • 做简历网站有什么学校教育培训机构
  • 莱芜雪野湖自驾游攻略柏乡seo快排优化
  • wordpress固定链接设置深圳seo公司助力网络营销飞跃
  • 揭阳网站开发如何优化搜索引擎
  • 网站被很多公司抄袭重庆网站seo建设哪家好
  • 预约网站怎么做赣州seo排名
  • 苏州网站设计哪家好青岛关键词排名系统
  • 网站开发费用计入什么科目上海公关公司
  • 做化工贸易要用那些网站推广百度app下载
  • 怎么建设一个论坛网站韶关新闻最新今日头条
  • 有没有什么东西可以做网站短视频seo优化排名
  • 网站图标怎么上传怎么做网络广告
  • 给wordpress网站做ssl卸载搜索数据
  • 永州网站建设效果在线网页生成器
  • C/C++ 详谈结构体大小计算(内存对齐)
  • SSE和WebSocket区别到底是什么
  • 苍穹外卖|项目日记(完工总结)
  • 2025.7.20总结-实战演讲
  • JavaScript 对象操作、继承与模块化实现
  • 相似度计算