Build Puppet Clusters with Vagrant
$ cd ~/docs/propuppetex/chapter3
$ cat Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos64"
config.vm.define "ppt" do |ppt|
ppt.vm.hostname = "puppet.boco.com.cn"
ppt.vm.network "private_network", ip: "192.168.50.3",
virtualbox__intnet: "gcptest-network"
ppt.vm.provider :virtualbox do |vbox|
vbox.customize ["modifyvm", :id, "--natnet1", "10.3/16"]
end
ppt.vm.provision :shell, path: "master.sh"
end
config.vm.define "web" do |web|
web.vm.hostname = "web.boco.com.cn"
web.vm.network "private_network", ip: "192.168.50.4",
virtualbox__intnet: "gcptest-network"
web.vm.provider :virtualbox do |vbox|
vbox.customize ["modifyvm", :id, "--natnet1", "10.3/16"]
end
web.vm.provision :shell, path: "web.sh"
end
end
$ cat master.sh
echo '*' > /etc/puppet/autosign.conf
sed -i '/[.*]/ a \ autosign = true' /etc/puppet/puppet.conf # add "autosign = true" in [main] and [agent]
echo "192.168.50.3 puppet.boco.com.cn puppet" >> /etc/hosts
echo "192.168.50.4 web.boco.com.cn web" >> /etc/hosts
mkdir /etc/puppet/manifests
cat > /etc/puppet/manifests/site.pp <<-EOF
node 'web' {
file { '/home/vagrant/aaa.conf':
content => 'this is made by puppet master!',
}
}
EOF
service iptables stop
$ cat web.sh
sed -i '1 a \ master = puppet' /etc/puppet/puppet.conf # add "master = puppet" after the line [main]
echo "192.168.50.3 puppet.boco.com.cn puppet" >> /etc/hosts
echo "192.168.50.4 web.boco.com.cn web" >> /etc/hosts
echo "proxy=http://10.21.3.31:8888" >> /etc/yum.conf
service iptables stop
Now run "puppet master --no-daemonize --verbose" on ppt, run "puppet agent --test" on web, you can file the file "aaa.conf" at /home/vagrant.
Build Puppet Clusters with Vagrant的更多相关文章
- 让 VAGRANT 启动并运行起来
这是一个帮助你快速入门Vagrant的初级教程.官方文档也可以很好的帮助你入门,但是本文更针对完全零基础的初学者并且会对某些问题直接切入正题. 本文在任何方面都不会取代官方文档,而且我建议读完本文的人 ...
- Create Virtual Machines with Vagrant and Puppet
Create the following puppet manifest and start VM with vagrant, you get a base production environmen ...
- vagrant
puppet chef ansible salt docker https://github.com/ansible/ansiblehttps://github.com/saltstack/salth ...
- Vagrant 快速入门
1. Vagrant功能: Vagrant uses Oracle’s VirtualBox to build configurable, lightweight, and portable virt ...
- Vagrant入门[转]
Vagrant是一个简单易用的部署工具,用英文说应该是orchestration tool.它能帮助开发人员迅速的构建一个开发环境,帮助测试人员构建测试环境. Vagrant的基本工作原理大致如下: ...
- vagrant打造自己的开发环境
vagrant打造自己的开发环境 缘由: 在网上看到斌哥,爽神都写了关于vagrant的博客,都在说很强大,所以很好奇这玩意怎么个强大,然后也就自己来一发玩玩看看. 真实缘由: 说实话是电脑配置太低, ...
- 使用 Vagrant 构建开发环境
使用 Vagrant 构建开发环境 摘要:本文描述了如使用 Vagrant 构建统一的开发环境. 问题 作为开发人员,我们通常面临的问题有: 开发环境需要手工安装配置,这包括操作系统(CentOS.U ...
- 使用 Vagrant + VirtualBox 快速构建 CentOS 下的 Docker 环境
Vagrant - 基础概念: Vagrant 是什么? Vagrant是一款用于在单个工作流程中构建和管理虚拟机环境的工具.凭借易于使用的工作流程和专注于自动化,Vagrant降低了开发环境设置时间 ...
- 超详细的 Vagrant 上手指南
搭建 Linux 虚拟机,别再用 VirtualBox 从 .iso 文件安装了. 概述 2020 年了,也许你已经习惯了 docker,习惯了在 XX 云上快速创建云主机,但是如果你想在个人电脑上安 ...
随机推荐
- LeSS 的诞生(一):大规模团队该何去何从
<敏捷宣言>发布后,"敏捷"被越来越多的小型开发团队认可.与此同时,另一个问题也逐渐暴露了出来:以 Scrum 为首的敏捷方法论对那些大规模的开发团队并不友好. 基于此 ...
- sonarqube 8.9版本配置收邮件提醒
# admin登陆系统后,进入我的账户(每个用户的配置过程类似) sonarqube 8.9版本配置发信请参考我的另一篇博文: 链接如下: https://www.cnblogs.com/cndevo ...
- Postgresql:postgres命令行导入sql文件
sql文件导入 psql -d jdbc -h localhost -p 5432 -U postgres -f /home/sql/test.sql #-d 数据库名称 #-h ip地址 #-p 端 ...
- ExtJs4学习(九)读写器reader、writer
Ext.data.reader.Json JSON Reader是用一个代理来读取服务端响应的JSON格式的返回值. 一般用于将结果加载成一个存储集-例如我们将创建一些如下东西: Ext.define ...
- SpringMVC(1)流程框架总体介绍
SpringMVC属于SpringFrameWork的后续产品,已经融合在Spring Web Flow里面.Spring 框架提供了构建 Web 应用程序的全功能MVC 模块,其功能和Strtus2 ...
- 23 shell 进程替换
0.shell进程替换的用法 1.使用进程替换的必要性 2.进程替换的本质 进程替换和命令替换非常相似.命令替换是把一个命令的输出结果赋值给另一个变量,例如dir_files=`ls -l`或date ...
- docker起不来报错:Failed to start Docker Application Container Engine.
报错信息如下: [root@localhost localdisk]# systemctl restart docker Job for docker.service failed because t ...
- Tuleap administration 管理员页面中项目的配置页面
1) 进入Administration界面,点击[Browse All] 2) 所有的项目会在项目页面中展示出来 3)在Details后面点击按钮,选择 [go to project administ ...
- Django 接口自动化测试平台
本项目工程 github 地址:https://github.com/juno3550/InterfaceAutoTestPlatform 0. 引言 1. 登录功能 2. 项目 3. 模块 4. 测 ...
- python -- 程序异常与调试(程序调试)
一.程序调试 A.使用assert语句检测程序代码中的错误. assert 表达式[, 参数] 如果表达式为True,则继续往下运行:如果为False,则抛出一个AssertionError异常,并且 ...