How can I manage nodes without having to pay for chef manage

#1

I'm new to chef and I'm trying to set it up to run a bunch of different nodes. Everything that I'm finding online are using chef manage to manage their chef server and I know you eventually have to pay for that. I'm just wondering if I'm able to set it up completely for free and manage as many nodes as I want without using any GUI, and is there a way to configure the config.rb/knife.rb file so that the different nodes can connect to the chef server without having to download the starter kit?

Thanks.

#2

with the knife tool from the chef-workstation package and the chef-server-ctl binary on the chef server you can manage the server without a gui.

#3

Am I able to configure the knife file without downloading the starter kit?

#4

yes but it is a bit of manual work.

Basically it is (from the top of my head):

  • create org with chef-server-ctl

  • create a user with chef-server-ctl on the server and copy the private key you get to a local file in your .chef/ dir (name it <username>.pem to make things easier)

  • you may have to add that user as admin to the org, if you cannot do it during user creation. But check the chef-server-ctl help

  • create a knife.rb in your .chef/ that contains at least something like this:

    current_dir = File.dirname(_FILE_)
    log_level :info
    log_location STDOUT
    node_name "<username>"
    client_key "#{current_dir}/<username>.pem"
    chef_server_url "https://<your chef server url>/organizations/<your org short name>"
    cookbook_path ["#{current_dir}/../cookbooks"]
    # if you use vaults do a "chef gem install knife-vault" and add these lines
    knife[:vault_mode] = 'client'
    knife[:vault_admins] = %w(<username>)

  • do a "knife node list" or something to check if your knife.rb works

your dir structure in the chef repo is something like this idealy

<chef-repo>/
    .chef/
    cookbooks/
    roles/
    data_bags/
    nodes/
    environments/

hope that helps

#5

If you are a private user you can use the manage gui for free btw

#6

thanks, I'm implementing this now. Won't I have to eventually pay for it if I exceed 25 nodes?

#7

This is not correct, it is still a commercial product and using more than 25 nodes would violate the license.