VagrantCloudのBoxを試してみる

VagrantVagrant CloudのBoxを追加してみる。

Vagrant Cloud
https://vagrantcloud.com/

Macにはvagrantはインストールした状態。

インストールするBOX

今回は、Chefの提供しているCentOS6.5をインストールしてみる。

chef/centos-6.5
https://vagrantcloud.com/chef/boxes/centos-6.5

手順

とりあえず適当なディレクトリを作って移動する。

$ mkdir test
$ cd test

initで初期化して、upで起動する。

$ vagrant init chef/centos-6.5
$ vagrant up

Boxがまだ追加されてない場合は勝手に追加される。
そのため、初回はBoxのダウンロードで時間がかかる。

下記のコマンドでBoxの追加だけすることもできる
$ vagrant box add chef/centos-6.5

確認

CentOSが起動しているのが確認できる。

$ vagrant ssh
centos$ cat /etc/redhat-release
CentOS release 6.5 (Final)

今後はVagrantbox.esよりVagrantCloudのBoxを使うのが良さそう。

A list of base boxes for Vagrant - Vagrantbox.es
http://www.vagrantbox.es/