puppet的使用:安装puppet
最近项目要使用puppet,趁机赶紧学习下。
在家里的机器中搭建puppet环境,使用两台ubuntu 14.04;
准备工作
时间同步
两台设备先进行时间同步,我把要安装master的机器作为NTP服务器,client向master同步下时间;
这个不会的可以搜下NTP的配置;
配置/etc/hosts
把hostname改好,并添加到/etc/hosts中,master和client都添加到hosts中,这样才能根据hostname进行访问;
安装
- apt-get update
这个是同步源索引,后面才能下载到最新的包。 apt-get install puppetmaster
master的安装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/sslmaster操作:
清除对应agent的认证,puppet cert clean agentHostname
最新文章
- 使用Visual Studio SDK制作GLSL词法着色插件
- JavaScript对象的chapterIII
- [MongDB] 主从架构--官方极力不推荐
- Android的各种Drawable 讲解 大全
- sublime配置文件
- 分析器错误消息: 类型“test.test.testx”不明确: 它可能来自程序集“F:\testProject\bin\test.test.DLL”或程序集“F:\testProject\bin \testProject.DLL”。请在类型名称中显式指定程序集。
- SqlServer正在执行的sql语句
- linux僵死进程的产生与避免
- VS2010 IE10 调试时报“未能将脚本调试器附加到计算机”,已经附加了一个进程
- 系统报错 hppatusg01
- Git合并多个Commit
- ural 1989 subplindromes
- python从入门到实践-10章文件和异常(括号问题)
- Problem after converting keras model into Tensorflow pb - 将keras模型转换为Tensorflow pb后的问题
- μC/OS-II 任务的同步与通信 --- 消息邮箱
- 《Java大学教程》—第18章 高级图形编程
- JAVA多线程之volatile 与 synchronized 的比较
- 【转载】Android RecyclerView 使用完全解析 体验艺术般的控件
- 关于RNA-Seq数据去接头(Adapter)这事需要讲一讲
- spring boot 入门一 构建spring boot 工程