Vagrant.configure('2') do |config| env = ENV.to_hash config.vm.box = 'bosh-stemcell' config.ssh.username = 'ubuntu' config.vm.define :local do |local| local.vm.box_url = 'https://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-vagrant-boxes/bosh-stemcell-virtualbox.box' local.vm.provider :virtualbox do |virtualbox| virtualbox.customize ['modifyvm', :id, '--cpus', '2'] virtualbox.customize ['modifyvm', :id, '--memory', '2048'] end end config.vm.define :remote do |remote| remote.vm.box_url = 'https://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-vagrant-boxes/bosh-stemcell-aws.box' remote.vm.provider :aws do |aws, override| aws.instance_type = 'c1.medium' aws.access_key_id = env.fetch('BOSH_AWS_ACCESS_KEY_ID') aws.secret_access_key = env.fetch('BOSH_AWS_SECRET_ACCESS_KEY') aws.keypair_name = 'bosh' aws.security_groups = ['bosh-stemcell'] aws.tags = { 'Name' => 'bosh-stemcell' } override.ssh.username = 'ubuntu' override.ssh.private_key_path = '~/.ssh/id_rsa_bosh' end end config.vm.provision :shell do |shell| shell.inline = <<-BASH sudo mkdir -p /mnt/stemcells sudo chown -R ubuntu /mnt/stemcells BASH end config.omnibus.chef_version = :latest config.berkshelf.enabled = true config.vm.provision :chef_solo do |chef| chef.run_list = %w(recipe[golang]) chef.json = { go: { version: '1.1.2', } } end config.vm.synced_folder '../', '/bosh' end