ruby 用于多机配置的Vagrantfile
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby 用于多机配置的Vagrantfile相关的知识,希望对你有一定的参考价值。
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.boot_timeout = 60
config.vm.provider "virtualbox" do |vb|
vb.memory = 512
vb.cpus = 1
vb.gui = false
end
config.vm.define "zipi" do |zipi|
zipi.vm.host_name = "zipi"
zipi.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
zipi.vm.network "private_network", ip: "192.168.32.10"
zipi.vm.network "public_network", auto_config: true, virtualbox__intnet: true
# zipi.vm.network "public_network", bridge: "en0: Wi-Fi (AirPort)", auto_config: true
end
config.vm.define "zape" do |zape|
zape.vm.host_name = "zape"
zape.vm.network "forwarded_port", guest: 80, host: 8081, auto_correct: true
zape.vm.network "private_network", ip: "192.168.32.11"
zape.vm.network "public_network", auto_config: true, virtualbox__intnet: true
# zape.vm.network "public_network", bridge: "en0: Wi-Fi (AirPort)", auto_config: true
end
end
以上是关于ruby 用于多机配置的Vagrantfile的主要内容,如果未能解决你的问题,请参考以下文章
ruby Vagrantfile Ornek #vagrant
ruby Vagrantfile:多机器
ruby 自定义Vagrantfile
ruby ubuntu / trusty64的最小Vagrantfile(14.04 LTS)
ruby 流浪多机
ruby IEテスト用仮想マシンのVagrantfile(事前にboxのインストールが必要)