Skip to content

Instantly share code, notes, and snippets.

@petems
Created January 21, 2015 15:54
Show Gist options
  • Save petems/74456ea4bc6bcbe0903f to your computer and use it in GitHub Desktop.
Save petems/74456ea4bc6bcbe0903f to your computer and use it in GitHub Desktop.
OSX Vagrant Stuff
HOSTS:
osx-10.9-x86_64:
roles:
- master
platform: osx-10.9-x86_64
box : osx-mavericks
box_url : http://files.dryga.com/boxes/osx-mavericks-0.1.0.box
hypervisor : vagrant
CONFIG:
type: foss
#!/bin/sh
# Error with trying to use keychain:
# Boxen Keychain Helper: Encountered error code: -25308
#Error: User interaction is not allowed.
#/opt/boxen/repo/.bundle/ruby/2.0.0/gems/boxen-2.7.0/lib/boxen/keychain.rb:48:in `set': Can't save GitHub API Token in the keychain. (Boxen::Error)
# from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/boxen-2.7.0/lib/boxen/keychain.rb:30:in `token='
# from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/boxen-2.7.0/lib/boxen/config.rb:73:in `save'
# from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/boxen-2.7.0/lib/boxen/cli.rb:48:in `run'
# from ./script/boxen:165:in `<main>'
#
security unlock-keychain
# password to unlock default: vagrant

OSX Vagrant Notes

OSX Vagrant notes to take along the way as I get beaker working with boxen

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "osx-mavericks"
config.vm.box_url = "http://files.dryga.com/boxes/osx-mavericks-0.1.0.box"
config.vm.network 'private_network', ip: '10.0.1.10'
config.vm.synced_folder '.', '/vagrant', :nfs => true
config.vm.provider "virtualbox" do |v|
v.gui = true
# VM does not boot with message: hfs mounted macintosh hd on device root_device
v.customize ["modifyvm", :id, "--cpuidset", "1","000206a7","02100800","1fbae3bf","bfebfbff"]
end
end
#!/usr/bin/env expect -f
# Used to agree to Xcode automatically
set timeout -1
spawn sudo xcodebuild -license
expect {
"Password"
{
stty -echo
expect_user -re "(.*)\n"
stty echo
set pass $expect_out(1,string)
send -- "vagrant\r"
exp_continue
}
"incorrect password attempts"
{
exit 1
}
"Hit the Enter key to view the license agreements"
{
send "\r"
exp_continue
}
"Press 'space' for more"
{
send " "
exp_continue
}
"By typing 'agree'"
{
send "agree\r"
exp_continue
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment