我正在尝试使用 Vagrant 启动并配置一个 EC2 实例,它成功创建了该实例,然后我可以使用vagrant ssh
SSH 进入它,但 Puppet 似乎没有执行任何配置。
运行时vagrant up --provider=aws --provision
我得到以下输出
Bringing machine 'default' up with 'aws' provider...
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
[default] Warning! The AWS provider doesn't support any of the Vagrant
high-level network configurations (`config.vm.network`). They
will be silently ignored.
[default] Launching an instance with the following settings...
[default] -- Type: m1.small
[default] -- AMI: ami-a73264ce
[default] -- Region: us-east-1
[default] -- Keypair: banderton
[default] -- Block Device Mapping: []
[default] -- Terminate On Shutdown: false
[default] Waiting for SSH to become available...
[default] Machine is booted and ready for use!
[default] Rsyncing folder: /Users/benanderton/development/projects/my-project/aws/ => /vagrant
[default] Rsyncing folder: /Users/benanderton/development/projects/my-project/aws/manifests/ => /tmp/vagrant-puppet/manifests
[default] Rsyncing folder: /Users/benanderton/development/projects/my-project/aws/modules/ => /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.
An error occurred while executing the action on the 'default'
machine. Please handle this error then try again:
No error message
然后我可以使用 SSH 进入实例vagrant ssh
,但我的任何配置都没有发生,所以我假设发生了错误,但没有给我任何与它们相关的有用信息。
我的 Vagrantfile 如下;
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu_aws"
config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "REDACTED"
aws.secret_access_key = "REDACTED"
aws.keypair_name = "banderton"
override.ssh.private_key_path = "~/.ssh/banderton.pem"
override.ssh.username = "ubuntu"
aws.ami = "ami-a73264ce"
end
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.options = ['--verbose']
end
end
我的 Puppet 清单如下;
package { [
'build-essential',
'vim',
'curl',
'git-core',
'nano',
'freetds-bin'
]:
ensure => 'installed',
}
未安装任何软件包。
答案1
“无错误消息”问题应该已在 Vagrant 1.3.5 中修复。但您应该能够通过启用更多日志记录来查看实际错误:
VAGRANT_LOG=info vagrant up --provider=aws --provision
对于偶数模式调试日志,使用VAGRANT_LOG=debug
。