最近项目要使用puppet,趁机赶紧学习下。
在家里的机器中搭建puppet环境,使用两台ubuntu 14.04;

准备工作

时间同步

两台设备先进行时间同步,我把要安装master的机器作为NTP服务器,client向master同步下时间;
这个不会的可以搜下NTP的配置;

配置/etc/hosts

把hostname改好,并添加到/etc/hosts中,master和client都添加到hosts中,这样才能根据hostname进行访问;

安装

  1. apt-get update
    这个是同步源索引,后面才能下载到最新的包。
  2. apt-get install puppetmaster
    master的安装

  3. apt-get install puppet
    client的安装

安装完了通过puppet --version查看版本

配置文件

默认即可,有时间再补充;

master的启动

puppet master --verbose --no-daemonize
这样启动后就能看到日志的输出;

client 的启动

puppet agent --test --server=xxx
启动后会看到如下信息
Info: Creating a new SSL key for yourhostname
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for yourhostname
Info: Certificate Request fingerprint (SHA256): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Info: Caching certificate for ca
Exiting; no certificate found and waitforcert is disabled

签发

在上一步,client向master发起了证书签批请求,在master上通过命令puppet cert list -a就能看到待签发的信息;
"yourhostname" (SHA256) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
如果yourhostname前面有个“+”就表示已签发;
对于未签发的可以通过命令puppet cert sign hostname或者puppet cert sign --all(签发所有)进行签发;

证书与ssl删除

master节点删除证书

puppet cert --clean hostname

删除ssl

根据puppet.conf目录中的sslpath字段,删除ssl,然后启动agent,会重新生成ssl,master节点也一样;

agent重新向master注册

  • agent操作:
    删除ssl证书,rm -rf /etc/puppet/ssl

  • master操作:
    清除对应agent的认证,puppet cert clean agentHostname

最新文章

  1. 使用Visual Studio SDK制作GLSL词法着色插件
  2. JavaScript对象的chapterIII
  3. [MongDB] 主从架构--官方极力不推荐
  4. Android的各种Drawable 讲解 大全
  5. sublime配置文件
  6. 分析器错误消息: 类型“test.test.testx”不明确: 它可能来自程序集“F:\testProject\bin\test.test.DLL”或程序集“F:\testProject\bin \testProject.DLL”。请在类型名称中显式指定程序集。
  7. SqlServer正在执行的sql语句
  8. linux僵死进程的产生与避免
  9. VS2010 IE10 调试时报“未能将脚本调试器附加到计算机”,已经附加了一个进程
  10. 系统报错 hppatusg01
  11. Git合并多个Commit
  12. ural 1989 subplindromes
  13. python从入门到实践-10章文件和异常(括号问题)
  14. Problem after converting keras model into Tensorflow pb - 将keras模型转换为Tensorflow pb后的问题
  15. μC/OS-II 任务的同步与通信 --- 消息邮箱
  16. 《Java大学教程》—第18章 高级图形编程
  17. JAVA多线程之volatile 与 synchronized 的比较
  18. 【转载】Android RecyclerView 使用完全解析 体验艺术般的控件
  19. 关于RNA-Seq数据去接头(Adapter)这事需要讲一讲
  20. spring boot 入门一 构建spring boot 工程

热门文章

  1. 链家笔试链家——找寻最小消费获取最大平均分java
  2. verilog系统函数用法
  3. 测试mktime和localtime_r性能及优化方法
  4. #ing#我的日常知识管理160421
  5. Swift:在Safari中打开App
  6. faceswap安装说明
  7. centos yum command
  8. 快速掌握Java中Lambda表达式的用法
  9. POJ1269求两个直线的关系平行,重合,相交
  10. VLC简介及使用说明