|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +Vagrant.configure("2") do |config| |
| 5 | + # All Vagrant configuration is done here. The most common configuration |
| 6 | + # options are documented and commented below. For a complete reference, |
| 7 | + # please see the online documentation at vagrantup.com. |
| 8 | + |
| 9 | + config.vm.hostname = "gitlab-berkshelf" |
| 10 | + |
| 11 | + # Every Vagrant virtual environment requires a box to build off of. |
| 12 | + config.vm.box = "Berkshelf-CentOS-6.3-x86_64-minimal" |
| 13 | + |
| 14 | + # The url from where the 'config.vm.box' box will be fetched if it |
| 15 | + # doesn't already exist on the user's system. |
| 16 | + config.vm.box_url = "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box" |
| 17 | + |
| 18 | + # Assign this VM to a host-only network IP, allowing you to access it |
| 19 | + # via the IP. Host-only networks can talk to the host machine as well as |
| 20 | + # any other machines on the same network, but cannot be accessed (through this |
| 21 | + # network interface) by any external networks. |
| 22 | + config.vm.network :private_network, ip: "33.33.33.10" |
| 23 | + |
| 24 | + # Create a public network, which generally matched to bridged network. |
| 25 | + # Bridged networks make the machine appear as another physical device on |
| 26 | + # your network. |
| 27 | + |
| 28 | + # config.vm.network :public_network |
| 29 | + |
| 30 | + # Create a forwarded port mapping which allows access to a specific port |
| 31 | + # within the machine from a port on the host machine. In the example below, |
| 32 | + # accessing "localhost:8080" will access port 80 on the guest machine. |
| 33 | + |
| 34 | + # Share an additional folder to the guest VM. The first argument is |
| 35 | + # the path on the host to the actual folder. The second argument is |
| 36 | + # the path on the guest to mount the folder. And the optional third |
| 37 | + # argument is a set of non-required options. |
| 38 | + # config.vm.synced_folder "../data", "/vagrant_data" |
| 39 | + |
| 40 | + # Provider-specific configuration so you can fine-tune various |
| 41 | + # backing providers for Vagrant. These expose provider-specific options. |
| 42 | + # Example for VirtualBox: |
| 43 | + # |
| 44 | + # config.vm.provider :virtualbox do |vb| |
| 45 | + # # Don't boot with headless mode |
| 46 | + # vb.gui = true |
| 47 | + # |
| 48 | + # # Use VBoxManage to customize the VM. For example to change memory: |
| 49 | + # vb.customize ["modifyvm", :id, "--memory", "1024"] |
| 50 | + # end |
| 51 | + # |
| 52 | + # View the documentation for the provider you're using for more |
| 53 | + # information on available options. |
| 54 | + |
| 55 | + config.ssh.max_tries = 40 |
| 56 | + config.ssh.timeout = 120 |
| 57 | + |
| 58 | + # The path to the Berksfile to use with Vagrant Berkshelf |
| 59 | + # config.berkshelf.berksfile_path = "./Berksfile" |
| 60 | + |
| 61 | + # An array of symbols representing groups of cookbook described in the Vagrantfile |
| 62 | + # to exclusively install and copy to Vagrant's shelf. |
| 63 | + # config.berkshelf.only = [] |
| 64 | + |
| 65 | + # An array of symbols representing groups of cookbook described in the Vagrantfile |
| 66 | + # to skip installing and copying to Vagrant's shelf. |
| 67 | + # config.berkshelf.except = [] |
| 68 | + |
| 69 | + config.vm.provision :chef_solo do |chef| |
| 70 | + chef.json = { |
| 71 | + :mysql => { |
| 72 | + :server_root_password => 'rootpass', |
| 73 | + :server_debian_password => 'debpass', |
| 74 | + :server_repl_password => 'replpass' |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | + chef.run_list = [ |
| 79 | + "recipe[gitlab::default]" |
| 80 | + ] |
| 81 | + end |
| 82 | +end |
0 commit comments