Skip to content

Instantly share code, notes, and snippets.

@danapplegate
Last active September 14, 2015 22:54
Show Gist options
  • Select an option

  • Save danapplegate/11a8c9d8c16280e1de38 to your computer and use it in GitHub Desktop.

Select an option

Save danapplegate/11a8c9d8c16280e1de38 to your computer and use it in GitHub Desktop.

Revisions

  1. danapplegate revised this gist Sep 14, 2015. 1 changed file with 83 additions and 0 deletions.
    83 changes: 83 additions & 0 deletions Vagrantfile.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,83 @@
    base_path = 'htdocs/protected/config'

    Vagrant::Config.run do |config|

    config.vm.define :web, primary: true do |web_config|
    web_config.vm.box = 'my_company'

    web_config.vm.box_url = 'http://files.vagrantup.com/precise64.box'

    web_config.vm.network :hostonly, '192.168.33.10'

    web_config.vm.forward_port 3306, 3306

    unless ENV['EC2_HOME'].nil?
    web_config.vm.share_folder 'ec2-home', ENV['EC2_HOME'], ENV['EC2_HOME'], :nfs => true
    end

    web_config.vm.share_folder 'host-home', '/home/host-user', '~', :nfs => true
    web_config.vm.share_folder 'vagrant-root', '/vagrant', '.', :nfs => true


    web_config.vm.provision :chef_solo do |chef|
    chef.version = "11.10"
    chef.cookbooks_path = "#{base_path}/cookbooks"
    chef.log_level = :debug

    chef.json = {
    :git => {
    :version => '1.7.9.5'
    },
    :mysql => {
    :server_root_password => '',
    :server_repl_password => '',
    :server_debian_password => '',
    :allow_remote_root => true
    },
    :php_fpm => {
    :listen_to => 'port',
    :php_ini => {
    :display_errors => 'On'
    }
    },
    :my_company => {
    :database_dir => '/data/mysql',
    },
    :php => {
    :install_method => 'source',
    :version => '5.5.10',
    :checksum => 'abf751810593844e0897007797210828b193a213d9b204f203e0331019cadb90'
    },
    :memcached => {
    :memory => 48,
    :port => 11211,
    :udp_port => 11211,
    :listen => '127.0.0.1'
    }
    }

    chef.add_recipe 'php'
    chef.add_recipe 'composer'
    chef.add_recipe 'my_company::php'
    chef.add_recipe 'my_company::php-fpm'
    chef.add_recipe 'curl'
    chef.add_recipe 'nginx'
    chef.add_recipe 'my_company::data_cleanup'
    chef.add_recipe 'mysql::client'
    chef.add_recipe 'mysql::server'
    chef.add_recipe 'my_company::resque_setup'
    chef.add_recipe 'java'

    chef.add_recipe 'nodejs'
    chef.add_recipe 'my_company::composer-self-update'
    chef.add_recipe 'my_company::local'
    chef.add_recipe 'my_company::xdebug'
    chef.add_recipe 'my_company::ffmpeg_install'
    chef.add_recipe 'memcached'
    chef.add_recipe 'redisio::install'
    chef.add_recipe 'redisio::enable'
    chef.add_recipe 'my_company::ffmpeg_install'
    end

    end
    end
  2. danapplegate created this gist Sep 14, 2015.
    7,040 changes: 7,040 additions & 0 deletions vagrant-up-output.txt
    7,040 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.