17

我正在尝试建立一个多 VM Vagrant 环境,该环境启动一个OpenStack控制器和几个 OpenStack 计算节点,然后在计算节点上配置一两个 VM。

是的,我说的是在虚拟机上运行的虚拟机。听起来有点疯狂,但是这个多虚拟机 Vagrant 环境已经在https://github.com/lorin/openstack-ansible上创建并且它运行良好,正如我在http://wiki.greptilian.com/中描述的那样开放堆栈

但是,我只能从 GitHub 存储库及其相应的技术讲座中汲取灵感,因为它使用 Ansible 作为 Vagrant 配置器,而我需要使用 Puppet。

我想在https://github.com/puppetlabs/puppetlabs-openstack上为 OpenStack 使用官方 Puppet Labs 模块,但它使用 storeconfigs,所以我收到这样的错误,因为我的 Vagrantfile 不包含作为木偶大师:

warning: You cannot collect exported resources without storeconfigs being set; the collection will be ignored on line 142 in file /tmp/vagrant-puppet/modules-0/nova/manifests/init.pp

Resource type anchor doesn't exist at /tmp/vagrant-puppet/modules-0/nova/manifests/db/mysql.pp:18 on node controller.example.com.

我想我可以调整我的 Vagrantfile 以启动 Puppet master 以及 OpenStack 主机,但我不确定我会如何做到这一点,而且它似乎给 Vagrant 环境引入了额外的复杂性。

我想知道是否可以用“masterless” Puppet 来代替。http://semicomplete.com/presentations/puppet-at-loggly/puppet-at-loggly.pdf.html上的一篇文章表明这​​是可能的,说,“ puppet –environment prerun manifests/prerun.pp......使 storeconfigs 工作puppet –storeconfigs manifests/site.pp......这是主木偶运行”,但我对实现细节感到困惑。

谁能指出我运行“masterless”Puppet 但使用 storeconfigs 的 Vagrant 存储库?

4

1 回答 1

1

您需要使用所有 vagrant VM 都可以访问的数据库配置您的 storeconfigs。Loggly 使用 AmazonRDS,但您可以使用其他数据库作为puppet docs show。假设您有一个所有虚拟机都可以访问的数据库,并且您使用 storeconfigs 选项运行 puppet,并且您在 puppet 中配置了正确的数据库连接信息,那么您应该很好。

于 2013-12-09T19:05:42.877 回答