Knifer Sutherland

This is a little knife plugin that should help you when connecting to your chef nodes. If you constantly have to do knife status or some other way to get the addresses of your servers. Then this gem is just for you! BUY NOW! for only $9.99 or wait and GET IT FOR FREEEE!

Wait why does the name remind me of Keither Sutherland? Well it's simple, every time I run knife commands I think of the show 24 which starred Keither Sutherland and I think about him kicking terroists asses! It's a weird memory map.

Installing It

It's really easy and works with ruby-2.0 and ruby-1.9.3

$ gem install knife_sutherland

Using It

Navigate to your chef server directory, where you keep all your files for chef and execute it like this. Make sure to use sudo so it can have permission to write to the /etc/hosts file.

$ sudo knife hosts_file

You should see some ip addresses and hosts flash by and when you go look at your hosts file it should be populated with the nodes of your chef servers.

Adding prodweb  12.21.0.1
Adding prodweb2 12.21.0.2
Adding stagweb  12.21.0.3
Adding stagweb2 12.21.0.4
Adding qaweb    12.21.0.5
Adding qaweb2   12.21.0.6
# /etc/hosts
127.0.0.1    localhost
# ghost start
12.21.0.1    prodweb
12.21.0.2    prodweb2
12.21.0.3    stagweb
12.21.0.4    stagweb2
12.21.0.5    qaweb
12.21.0.6    qaweb2
# ghost end

Your existing hosts file should still be ok and any new hosts that are added are going to be between the #ghost start and #ghost end so.

Contributing

  1. Fork
  2. Create a topic branch - git checkout -b my_branch
  3. Push to your branch - git push origin my_branch
  4. Create a Pull Request from your branch
  5. That's it!