Macで vagrant + vagrant cloud


1. vagrant 1.5以降にupgrade
2. vagrant cloudのアカウント作成
3. vagrant cloudにログイン
4. vagrant cloudのboxをaddする

vagrant 1.5 以降にupgrade

% brew cask install vagrant

% vagrant -v
Vagrant 1.6.3

% vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.1.0, system)

vagrant cloud のアカウント作成

vagrant cloud からアカウント作成

vagrant cloud にログイン

% vagrant login
In a moment we'll ask for your username and password to Vagrant Cloud.
After authenticating, we will store an access token locally. Your
login details will be transmitted over a secure connection, and are
never stored on disk locally.

If you don't have a Vagrant Cloud account, sign up at

Username or Email: YOUR USERNAME
Password (will be hidden):
You're now logged in!

vagrant cloud の boxを追加

% vagrant box add chef/debian-7.4
vagrant box add chef/debian-7.4
==> box: Loading metadata for box 'chef/debian-7.4'
	box: URL:
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) virtualbox
2) vmware_desktop

Enter your choice: 1
==> box: Adding box 'chef/debian-7.4' (v1.0.0) for provider: virtualbox
	box: Downloading:
==> box: Successfully added box 'chef/debian-7.4' (v1.0.0) for 'virtualbox'!

vagrant up する


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "chef/debian-7.4"
  config.vm.box_url = "" :forwarded_port, guest: 80, host: 8080
  config.vm.provision "shell", inline: <<-EOT
	aptitude update
	apt-get install -y apache2
	rm -rf /var/www
	ln -fs /vagrant /var/www
	echo "<h1>Hello, Vagrant Cloud.</h1>" > /vagrant/index.html

% vagrant up


わすれっぽいきみえ - 2014-04-05 - vagrantのboxをvagrant cloudからもらってくる

Qiita - Mac OS XでVagrantとChefを使った環境構築のまとめ