Last active
August 29, 2015 14:14
-
-
Save saxsir/b75276c8412372474868 to your computer and use it in GitHub Desktop.
1つのVagrantfileで複数のVMを立ち上げる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Refs http://www.vagrantbox.es/ | |
config.vm.box = "https://f0fff3908f081cb6461b407be80daf97f07ac418.googledrive.com/host/0BwtuV7VyVTSkUG1PM3pCeDJ4dVE/centos7.box" | |
# Refs http://qiita.com/hapicky/items/a7f9d56588f96d005fad | |
# 初回起動時はコメントアウト | |
# config.vbguest.auto_update = false | |
config.vm.define :web do |web| | |
web.vm.network :private_network, ip: "192.168.33.10" | |
web.vm.hostname = "www.localhost" | |
web.vm.provider "virtualbox" do |vb| | |
vb.name = "www.localhost" | |
vb.memory = 1024 | |
end | |
end | |
config.vm.define :db do |db| | |
db.vm.network :private_network, ip: "192.168.33.20" | |
db.vm.hostname = "db.localhost" | |
db.vm.provider "virtualbox" do |vb| | |
vb.name = "db.localhost" | |
vb.memory = 1024 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment