diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile new file mode 100644 index 0000000..71d5bab --- /dev/null +++ b/vagrant/Vagrantfile @@ -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 diff --git a/vagrant/puppet/manifests/default.pp b/vagrant/puppet/manifests/default.pp new file mode 100644 index 0000000..4230732 --- /dev/null +++ b/vagrant/puppet/manifests/default.pp @@ -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', +} diff --git a/vagrant/puppet/modules/.gitkeep b/vagrant/puppet/modules/.gitkeep new file mode 100644 index 0000000..e69de29