Skip to content

Instantly share code, notes, and snippets.

@igama
Created November 14, 2012 09:01
Show Gist options
  • Save igama/4071093 to your computer and use it in GitHub Desktop.
Save igama/4071093 to your computer and use it in GitHub Desktop.
Vagrantfile
Vagrant::Config.run do |config|
# Основа виртуалки
config.vm.box = 'ubuntu12'
config.vm.box_url = 'http://dl.dropbox.com/u/1537815/precise64.box'
# IP виртуалки
config.vm.network :hostonly, '33.33.33.33'
# Исолзвать ли экран виртуалки
# config.vm.boot_mode = :gui
# Если не windows расшариваем папки
#if !RUBY_PLATFORM.include? 'mswin'
#config.vm.share_folder('v-root', '/vagrant', '.', :nfs => true)
#config.vm.share_folder('instudies', '/instudies', '~/instudies/project', :nfs => true, :extra => 'dmode=770,fmode=770')
#end
def Kernel.is_windows?
# Detect if we are running on Windows
processor, platform, *rest = RUBY_PLATFORM.split("-")
platform == 'mingw32'
end
nfs = !Kernel.is_windows?
config.vm.share_folder('v-root', '/vagrant', '.', :nfs => nfs)
config.vm.share_folder 'instudies', '/instudies', 'd:/Alexey/Work/instudies/project', :nfs => nfs
# Подключаем манифесты
config.vm.provision :puppet do |puppet|
puppet.manifests_path = 'puppet/manifests'
puppet.module_path = 'puppet/modules'
puppet.options = [
'--verbose',
'--debug'
]
end
# Настройки оперативной памяти
config.vm.customize ['modifyvm', :id, '--memory', 512]
# Настройки потребления процессора
config.vm.customize ['modifyvm', :id, '--cpuexecutioncap', 80]
# Настройки потребления процессора
config.vm.customize ['modifyvm', :id, '--cpus', 1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment