我(一个在 vagrant 中苦苦挣扎的新手)已经为开发设置了一个 vagrant 环境。我已经获得了流浪文件
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :puppet do |puppet|
puppet.module_path = "config/puppet/modules"
puppet.manifests_path = "config/puppet/manifests"
puppet.manifest_file = "base.pp"
end
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
config/puppet/manifests 包含以下 base.pp 文件
Exec {
path => "/usr/bin:/bin:/usr/sbin:/sbin"
}
stage { 'first':
before => Stage['main']
}
class {
'system': stage => first;
'mysql': stage => main;
'apache': stage => main;
'php': stage=> main;
'git': stage=> main;
'cake': stage=> main;
}
和 config/puppet/modules 包含目录 apache、cake、git、mysql、php 和 system。
到目前为止我所做的是
1) Installed VirtualBox
2) Installed Vagrant
3) Vagrant up (as specified everywhere in net)
我得到的是
1) a virtualbox (having no GUI)
2) SSH connection to virtaul box
3) and a shared folder.
现在我有一些问题,以便我能很好地理解它
1) Am i going in right direction in order to setup vagrant?
2) What is precise64.box(just console box), can't i add ubuntu as a box and everything set up(i.e. php, apache n other modules specified in puppet modules) in that ubuntu?
3) Where does puppet install all these modules? in Host(Windows) or in Guest(precise64)?
4) What config.vm.network :forwarded_port, guest: 80, host: 8080 do?
5) what does shared folder do? and where does the shared folder reside in virtual box(precise64) and what i could/should do with this shared folder?
6) where do i install Netbeans/Eclipse in order to develop my code?
7) Any references/blog that describe vagrant and its advantages in and out?
我试图理解但无法弄清楚如何理解 vagrant(作为开发人员)并开发一些东西。任何帮助或解释都将是可观的,我想这些可能是任何新手都难以理解的最常见的观点。