vagrant support

This commit is contained in:
Jimmy Zelinskie 2013-08-04 01:26:14 -04:00
parent 461761ae4a
commit c8c34df277
3 changed files with 48 additions and 0 deletions

20
vagrant/Vagrantfile vendored Normal file
View file

@ -0,0 +1,20 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :public_network
config.vm.network :forwarded_port, guest: 8000, host: 8080
config.vm.synced_folder "../", "/home/vagrant/chihaya/src/github.com/pushrax/chihaya"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--name", "chihaya"]
end
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "default.pp"
puppet.module_path = "puppet/modules"
end
end

View file

@ -0,0 +1,28 @@
Exec { path => '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/' }
exec { 'echo this works': }
group { 'puppet': ensure => 'present' }
exec { 'apt-get update':
command => '/usr/bin/apt-get update',
}
exec { 'add-apt-repository ppa:duh/golang && apt-get update':
alias => 'go_repo',
creates => '/etc/apt/sources.list.d/gophers-go-precise.list',
require => Package['python-software-properties'],
}
package { 'python-software-properties':
ensure => present,
require => Exec['apt-get update'],
}
package { 'golang':
ensure => present,
require => Exec['go_repo'],
}
exec { 'echo "export GOPATH=/home/vagrant/chihaya" > /etc/profile.d/gopath.sh':
creates => '/etc/profile.d/gopath.sh',
}

View file