Skip to content

Instantly share code, notes, and snippets.

@pesblog
Last active December 21, 2015 19:09
Show Gist options
  • Save pesblog/6352302 to your computer and use it in GitHub Desktop.
Save pesblog/6352302 to your computer and use it in GitHub Desktop.
cd /some/where

vagrant init <boxName>
vagrant up
vagrant ssh-config --host <hostName> >> ~/.ssh/config

knife solo init <repoName>
cd <repoName>
git init
git add .
git commit -m "first commit"

knife solo prepare <hostName>
git add nodes/<hostName>.json
git commit -m "add node json file"

knife cookbook create nginx -o site-cookbooks

# よしなに編集する
vi site-cookbooks/nginx/recipes/default.rb

# recipe[nginx]を足す
vi nodes/<hostName>.json  

knife solo cook <hostName>

git add site-cookbooks/nginx
git add nodes/<hostName>.json
git commit -m "Add nginx recipe"

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment