Created
January 14, 2014 05:05
-
-
Save ngtk/8413371 to your computer and use it in GitHub Desktop.
ChefとVagrantで楽しいクッキング ref: http://qiita.com/ngtk/items/aee1de7243b1405b6568
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| site :opscode | |
| cookbook 'nginx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ vagrant -v | |
| Vagrant 1.4.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mkdir vagrant-centos | |
| $ cd vagrant-centos | |
| $ vagrant init centos-chef https://s3.amazonaws.com/itmat-public/centos-6.3-chef-10.14.2.box |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ vagrant plugin install vagrant-berkshelf | |
| $ gem install berkshelf | |
| $ vi Berksfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ berks install --path=vendor/cookbooks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ vagrant up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ...... | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| ...... | |
| ...... | |
| config.berkshelf.enabled = true | |
| config.vm.provision :chef_solo do |chef| | |
| chef.cookbooks_path = "./vendor/cookbooks" | |
| chef.add_recipe "nginx" | |
| end | |
| end | |
| ...... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment