chef on davidchua https://dchua.com/tags/chef/ Recent content in chef on davidchua Hugo -- gohugo.io en-us Tue, 24 Mar 2015 00:00:00 +0000 Configuring Chef https://dchua.com/posts/2015-03-24-configuring-chef/ Tue, 24 Mar 2015 00:00:00 +0000 https://dchua.com/posts/2015-03-24-configuring-chef/ Preparing Cookbooks Lets prepare a cookbook. Uploading a cookbook $ knife cookbook upload -a Databags Creating a databag $ knife data_bag create 'users' Uploading a databag $ knife data_bag from file users path/to/data_bag/files Bootstraping Create a new node In order to bootstrap a server to get and use chef, ensure that you have ssh access to your server already. You can define which user to login as using the –ssh-user command below. Setting up Chef https://dchua.com/posts/2015-03-24-setting-up-chef/ Tue, 24 Mar 2015 00:00:00 +0000 https://dchua.com/posts/2015-03-24-setting-up-chef/ Prerequisite: Chef 12.1.x Setting up Chef-Server Download Chef on your Chef-Server $ wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/chef-server-core_12.0.5-1_amd64.deb $ sudo dpkg -i chef-server-core_*.deb $ sudo chef-server-ctl reconfigure Install Opscode-Manage Web interface for Chef management (highly recommended) Note: Opscode-Manage will run on port 80 so keep that free. # On Chef-server $ chef-server-ctl install opscode-manage $ opscode-manage-ctl reconfigure $ chef-server-ctl reconfigure Setup your User and Organization Users are an account that will be used to connect to Chef-server.