Code Monkey home page Code Monkey logo

chef's Introduction

My Chef recipes, cookbooks, etc.

image

Install Ruby & Git for chef-solo

Ubuntu

$ sudo apt-get update
$ sudo aptitude install ruby1.9.1-dev git build-essential
$ sudo gem install bundler

Setup

$ git clone --recurse-submodules [email protected]:banyan/chef.git
$ cd ~/chef
$ bundle install --path .bundle/gems

Run Chef

$ sudo ln -s /path/to/chef /root/chef # execute as root
# pwd
/root/chef
# bundle exec chef-solo -c config/solo.rb -j json/secure_ruby_app.json # choose proper json

Run Chef as normal user

$ pwd
/home/banyan/chef
$ rbenv sudo bundle exec chef-solo -c config/solo.rb -j json/secure_ruby_app.json # choose proper json

Create Cookbooks

Generate Cookbook Template

$ cd ~/chef
$ bundle exec knife cookbook create NEW_COOKBOOK_NAME --cookbook-path cookbooks

or Use my tiny wrapper - chef-cooker

$ sudo gem install chef-cooker
$ chef-cooker NEW_COOKBOOK_NAME

Add Recipe

$ vi role/PROPER_ROLE.rb

run_list(
  "recipe[NEW_COOKBOOK_NAME]", # add cookbook name
  "recipe[xmllibs]",
  "recipe[git]",
    ...

Note

  • When use secure role,
    • default ssh port will be changed from 22 to 10022 (22 will be shutdown)
    • Don't forget to change Security Group when using EC2.

License

  • The MIT License (MIT)
  • Copyright (c) 2012- Kohei Hasegawa

chef's People

Contributors

banyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chef's Issues

個人用の chef-solo では、package ごとに cookbooks を作ったほうがいいか

  • 問題
    • 例えば、base みたいな cookbooks を作ってそこに tree とかを書いたほうがいいか、それとも package ごとに cookbooks を用意したほうがいいか?
  • 用途
    • VPS や EC2 の構築用であくまで個人用の chef-solo (なるべくミニマムに保ちたい)
  • メリット・デメリット
    • package 毎に cookbooks があったほうが視界はいい気がする
    • package 毎に cookbooks を用意するのはめんどくさい

@lamanotrama

このあたり教えてもらえるとありがたいです:octocat:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.