|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
| 5 | +VAGRANTFILE_API_VERSION = "2" |
| 6 | + |
| 7 | +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
| 8 | + # All Vagrant configuration is done here. The most common configuration |
| 9 | + # options are documented and commented below. For a complete reference, |
| 10 | + # please see the online documentation at vagrantup.com. |
| 11 | + |
| 12 | + # Every Vagrant virtual environment requires a box to build off of. |
| 13 | + config.vm.box = "ipeerbox" |
| 14 | + |
| 15 | + config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box" |
| 16 | + |
| 17 | + config.vm.define "ipeerdev" do |t| |
| 18 | + end |
| 19 | + |
| 20 | + config.vm.provision "puppet" do |puppet| |
| 21 | + puppet.manifests_path = "puppet" |
| 22 | + puppet.manifest_file = "dev.pp" |
| 23 | + puppet.module_path = "puppet/modules" |
| 24 | + puppet.options = "--environment development" |
| 25 | + end |
| 26 | + |
| 27 | + config.vm.provision :shell, :path => "puppet/bootstrap.sh" |
| 28 | + |
| 29 | + config.vm.network :forwarded_port, host: 2000, guest: 2000 |
| 30 | + |
| 31 | + # The url from where the 'config.vm.box' box will be fetched if it |
| 32 | + # doesn't already exist on the user's system. |
| 33 | + # config.vm.box_url = "http://domain.com/path/to/above.box" |
| 34 | + |
| 35 | + # Create a forwarded port mapping which allows access to a specific port |
| 36 | + # within the machine from a port on the host machine. In the example below, |
| 37 | + # accessing "localhost:8080" will access port 80 on the guest machine. |
| 38 | + # config.vm.network :forwarded_port, guest: 80, host: 8080 |
| 39 | + |
| 40 | + # Create a private network, which allows host-only access to the machine |
| 41 | + # using a specific IP. |
| 42 | + # config.vm.network :private_network, ip: "192.168.33.10" |
| 43 | + |
| 44 | + # Create a public network, which generally matched to bridged network. |
| 45 | + # Bridged networks make the machine appear as another physical device on |
| 46 | + # your network. |
| 47 | + # config.vm.network :public_network |
| 48 | + |
| 49 | + # If true, then any SSH connections made will enable agent forwarding. |
| 50 | + # Default value: false |
| 51 | + # config.ssh.forward_agent = true |
| 52 | + |
| 53 | + # Share an additional folder to the guest VM. The first argument is |
| 54 | + # the path on the host to the actual folder. The second argument is |
| 55 | + # the path on the guest to mount the folder. And the optional third |
| 56 | + # argument is a set of non-required options. |
| 57 | + config.vm.synced_folder ".", "/var/www", id: "vagrant-root", |
| 58 | + mount_options: ["dmode=777,fmode=666"] |
| 59 | + |
| 60 | + # Provider-specific configuration so you can fine-tune various |
| 61 | + # backing providers for Vagrant. These expose provider-specific options. |
| 62 | + # Example for VirtualBox: |
| 63 | + # |
| 64 | + # config.vm.provider :virtualbox do |vb| |
| 65 | + # # Don't boot with headless mode |
| 66 | + # vb.gui = true |
| 67 | + # |
| 68 | + # # Use VBoxManage to customize the VM. For example to change memory: |
| 69 | + # vb.customize ["modifyvm", :id, "--memory", "1024"] |
| 70 | + # end |
| 71 | + # |
| 72 | + # View the documentation for the provider you're using for more |
| 73 | + # information on available options. |
| 74 | + |
| 75 | + # Enable provisioning with Puppet stand alone. Puppet manifests |
| 76 | + # are contained in a directory path relative to this Vagrantfile. |
| 77 | + # You will need to create the manifests directory and a manifest in |
| 78 | + # the file base.pp in the manifests_path directory. |
| 79 | + # |
| 80 | + # An example Puppet manifest to provision the message of the day: |
| 81 | + # |
| 82 | + # # group { "puppet": |
| 83 | + # # ensure => "present", |
| 84 | + # # } |
| 85 | + # # |
| 86 | + # # File { owner => 0, group => 0, mode => 0644 } |
| 87 | + # # |
| 88 | + # # file { '/etc/motd': |
| 89 | + # # content => "Welcome to your Vagrant-built virtual machine! |
| 90 | + # # Managed by Puppet.\n" |
| 91 | + # # } |
| 92 | + # |
| 93 | + # config.vm.provision :puppet do |puppet| |
| 94 | + # puppet.manifests_path = "manifests" |
| 95 | + # puppet.manifest_file = "site.pp" |
| 96 | + # end |
| 97 | + |
| 98 | + # Enable provisioning with chef solo, specifying a cookbooks path, roles |
| 99 | + # path, and data_bags path (all relative to this Vagrantfile), and adding |
| 100 | + # some recipes and/or roles. |
| 101 | + # |
| 102 | + # config.vm.provision :chef_solo do |chef| |
| 103 | + # chef.cookbooks_path = "../my-recipes/cookbooks" |
| 104 | + # chef.roles_path = "../my-recipes/roles" |
| 105 | + # chef.data_bags_path = "../my-recipes/data_bags" |
| 106 | + # chef.add_recipe "mysql" |
| 107 | + # chef.add_role "web" |
| 108 | + # |
| 109 | + # # You may also specify custom JSON attributes: |
| 110 | + # chef.json = { :mysql_password => "foo" } |
| 111 | + # end |
| 112 | + |
| 113 | + # Enable provisioning with chef server, specifying the chef server URL, |
| 114 | + # and the path to the validation key (relative to this Vagrantfile). |
| 115 | + # |
| 116 | + # The Opscode Platform uses HTTPS. Substitute your organization for |
| 117 | + # ORGNAME in the URL and validation key. |
| 118 | + # |
| 119 | + # If you have your own Chef Server, use the appropriate URL, which may be |
| 120 | + # HTTP instead of HTTPS depending on your configuration. Also change the |
| 121 | + # validation key to validation.pem. |
| 122 | + # |
| 123 | + # config.vm.provision :chef_client do |chef| |
| 124 | + # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" |
| 125 | + # chef.validation_key_path = "ORGNAME-validator.pem" |
| 126 | + # end |
| 127 | + # |
| 128 | + # If you're using the Opscode platform, your validator client is |
| 129 | + # ORGNAME-validator, replacing ORGNAME with your organization name. |
| 130 | + # |
| 131 | + # If you have your own Chef Server, the default validation client name is |
| 132 | + # chef-validator, unless you changed the configuration. |
| 133 | + # |
| 134 | + # chef.validation_client_name = "ORGNAME-validator" |
| 135 | +end |
0 commit comments