Chef infra 非常简单的流浪设置,有厨师或木偶

Chef infra 非常简单的流浪设置,有厨师或木偶,chef-infra,vagrant,puppet,chef-solo,Chef Infra,Vagrant,Puppet,Chef Solo,我正在尝试建立一个非常基本的流浪设置,基本上可以实现以下功能: 创建一个新的Precise64虚拟机并安装一个包列表(我只需要简单的东西,git、python、pip、virtualenv、VirtualEnvrapper和postgres)。最好让它运行一个简单的shell脚本,但我并不绝对需要它 我已经能够让Vagrant启动一个Precise64虚拟机,但要想同时使用Puppet和Chef进行资源调配是很困难的。Puppet或Chef(以较容易的为准)安装软件包(即运行sudo apt g

我正在尝试建立一个非常基本的流浪设置,基本上可以实现以下功能: 创建一个新的Precise64虚拟机并安装一个包列表(我只需要简单的东西,git、python、pip、virtualenv、VirtualEnvrapper和postgres)。最好让它运行一个简单的shell脚本,但我并不绝对需要它

我已经能够让Vagrant启动一个Precise64虚拟机,但要想同时使用Puppet和Chef进行资源调配是很困难的。Puppet或Chef(以较容易的为准)安装软件包(即运行
sudo apt get install
)的基本语法是什么

# /root/examples/ssh.pp
package { 'openssh-server':
  ensure => present,
  before => File['/etc/ssh/sshd_config'],
}
file { '/etc/ssh/sshd_config':
  ensure => file,
  mode   => 600,
  source => '/root/examples/sshd_config',
}
service { 'sshd':
  ensure     => running,
  enable     => true,
  subscribe  => File['/etc/ssh/sshd_config'],
}
您可以使用以下方法进行测试:

puppet apply --debug --noop /root/examples/ssh.pp
请参阅:这可能会有所帮助: