Screencast Chef - Part 2 Electives

  • emachnic
  • 3658 views
Badge-student

Locked Content

A subscription is required for viewing this video. Enroll now to get full access to all Code School courses and content.

Enroll Now Sign in

Comments

  1. Jordan B. Sanders said

    Very helpful video Evan! I really don't know how you kept it together when talking about Berkshelf, haha!

  2. Faculty

    Evan Machnic said

    Haha, thanks for the kind words Jordan.

  3. swfreeman said

    Evan, may I ask how your config your terminal & vim? I really like the theme you're using and the status line of vim. Thanks.

  4. Faculty

    Evan Machnic said

    SWFREEMAN, in short, I use Powerline (https://github.com/Lokaltog/powerline). I've tried vim-airline and tmux-powerline as well but I figured since I was using essentially the same thing in two places that I may as well go whole hog.

    The theme is Tomorrow based on base16 (https://github.com/chriskempson/base16). This is what I use for screencasts but typically use Tomorrow Night Eighties for normal development. I am finishing up a Vim/Tmux screencast so be on the lookout for that.

  5. Nathaniel Watts said

    Loving the video so far! however, when trying to setup the Berksfile to use the custom nginx stuff - I get this error:

    An error occurred while reading the Berksfile:

    no metadata.rb or metadata.json found at /Users/watts/code/chef/code_tv_chef/cookbooks/code_tv

    There is very much a metadata.rb file within that directory.

  6. patrickdavey said

    Looking forward to the next part - great work. Would you consider providing a screencast on how you can use chef to setup a VPS (linode, Digital Ocean etc?), covering things like configuring ssh, security (failtoban, iptables etc.). That really would be super helpful!

  7. Mohamad El-Husseini said

    Thanks Evan, this was a create screen cast. Was a third screen cast ever released in this series? You allude to this in the end, but I've not seen anything in the list.

  8. Faculty

    Evan Machnic said

    It does look like the third one was never published. I'll see what's up.

  9. Mohamad El-Husseini said

    Thanks! Evan, at 9.35 in the video, in the vagrant file, you included a recipe for apt. Why? Isn't it already part of the community nginx cookbook?

  10. Faculty

    Evan Machnic said

    I think I listed apt explicitly because I needed it to run first, but I can't remember right now.

  11. exuperok said

    Hello, as i was following your instructions, i tried init berkshelf in the code_tv_chef directory i got this error message '...metadata.rb' does not appear to be a valid cookbook. Does it have a metadata.rb?' how do i solve this?

  12. Faculty

    Evan Machnic said

    Exuperok, please see this doc about cookbook metadata http://docs.opscode.com/essentials_cookbook_metadata.html

  13. exuperok said

    thanks Evan, i carefully read that documentation page, but was not able to find information about the error message that i get when i run berks init command... it is searching metadata.rb in the wrong directory which is strange since i followed your instructions correctly

  14. Gurban Haydarov said

    Thanks for the screencast. I have a problem installing. when I vagrant up, it gives me error: docker provider: * One of "build_dir" or "image" must be set

    It is setting default provider to docker for some reason, I am trying to change it, but no luck, any ideas?

  15. Gurban Haydarov said

    never mind figured it out, had to install virtual box.

  16. Edward Taylor said

    Hi Evan - I have run into the same problem as EXUPEROK. Initiating Berkself is failing as it cannot find the metadata.rb file. would it be possible for you to publish a copy of the local code that you used in this screen cast?

  17. Faculty

    Evan Machnic said

    Edward et al,

    Can you please try with version 2.x of Berkshelf? I think that behavior may have changed in 3.x.

  18. exuperok said

    the only way for me to make the command "berks init" work is to execute in the nginx folder under cookbooks... which is not the expected behavior i presume... i have Berkshelf 3.1.2, Ruby 2.1.1p76, vagrant 1.5.4 and i followed every step of "screencast 2"

  19. exuperok said

    Hello Evan, i forgot to mention this is the content of my berksfile "source "https://api.berkshelf.com"

    metadata" instead of site :opscode

  20. exuperok said

    Can use the wrapper pattern without using berkshelf?

  21. Bala said

    When I run: $ berks install

    I get the following error:

    Resolving cookbook dependencies... Fetching '' from source at . The following error occurred while reading the cookbook `': Ridley::Errors::MissingNameAttribute: The metadata at '/Users/zepho/projects/codetv/1' does not contain a 'name' attribute. While Chef does not strictly enforce this requirement, Ridley cannot continue without a valid metadata 'name' entry. zepho-mac-pro:1 zepho$ berks install An error occurred while reading the Berksfile:

    Could not parse `/Users/zepho/projects/codetv/1/metadata.rb': No such file or directory @ rb_sysopen - /Users/zepho/projects/codetv/1/README.md zepho-mac-pro:1 zepho$ cd cookbooks/ zepho-mac-pro:cookbooks zepho$ berks install An error occurred while reading the Berksfile:

    Could not open or read: '/Users/zepho/projects/codetv/1/cookbooks/metadata.rb'

    Any ideas on how to fix this problem.

About This Screencast

In this second part of our Chef series, we setup an Ubuntu Linux machine using Chef, ready our local machine for development, write our first cookbook, test it, and learn some best practices.

You need to be an enrolled student in order to view this video and subscribe.

Enroll Now