Skip to main content

Posts

Showing posts with the label environment

Chef: Roles and Environments

Bootstrap another node with your chef-server. If you get the following error: Failed to read the private key /etc/chef/validation.pem: # In the same error logs you will see a line: Delete your validation key in order to use your user credentials instead Please check that you don't have any validation.pem key in /etc/chef, if any, then delete it. You can verify by executing one of the following: knife client list knife node show chef-node2 Create a new cookbook postgresql: chef generate cookbook cookbooks/postgresql Edit cookbooks/postgresql/recipes/default.rb [code] package 'postgresql-server' do notifies :run, 'execute[postgresql-init]' end execute 'postgresql-init' do command 'postgresql-setup initdb' action :nothing end service 'postgresql' do action [:enable, :start] end <span data-mce-type="bookmark" id="mce_SELREST_start" data-mce-style="overflow:h...

Chef: Nodes and Search

Now login to your chef-node/chef-client and type ohai.  Ohai is automatically bootstraped when we install chef. You will get an output similar to below: ...... "OPEN_MAX": 1024, "PAGESIZE": 4096, "PAGE_SIZE": 4096, "PASS_MAX": 8192, "PTHREAD_DESTRUCTOR_ITERATIONS": 4, "PTHREAD_KEYS_MAX": 1024, "PTHREAD_STACK_MIN": 16384, "PTHREAD_THREADS_MAX": null, "SCHAR_MAX": 127, "SCHAR_MIN": -128, "SHRT_MAX": 32767, "SHRT_MIN": -32768, "SSIZE_MAX": 32767, "TTY_NAME_MAX": 32, "TZNAME_MAX": 6, "UCHAR_MAX": 255, "UINT_MAX": 4294967295, "UIO_MAXIOV": 1024, "ULONG_MAX": 18446744073709551615, "USHRT_MAX": 65535, "WORD_BIT": 32, "_AVPHYS_PAGES": 768366, "_NPROCESSORS_CONF": 2, "_NPROCESSORS_ONLN": 2, "_PHYS_PAGES": 970577, "_POSIX_ARG_MAX": 2097...