Skip to content

Instantly share code, notes, and snippets.

View danielsdeleo's full-sized avatar

Dan DeLeo danielsdeleo

View GitHub Profile
# Author:: Adam Jacob <adam@opscode.com>
# Author:: Joshua Timberman <joshua@opscode.com>
#
# Copyright 2009-2010, Opscode, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
1) Just getting the install process down....
a) bootstrapping a server is really confusing
- you need to install a bunch of libraries
- you need to install a bunch of gems
- you need to install chef-solo
- you need to tell chef-solo to turn into a chef-server
b) validation.pem
- so basically, you have to realize that this is a temporary key but you kind of have to manually install it on any new machine? No better way to do this?
2) Cookbooks, how do you manage them?
- I had difficulty in understanding that chef server is just a process (or group of them) and then you give it cookbooks to work with
# Check to see if there is a entry in /etc/fstab. Last entry for a volume wins.
enabled = false
::File.foreach("/etc/fstab") do |line|
case line
when /^[#\s]/
next
when /^#{device_fstab_regex}\s+#{Regexp.escape(@new_resource.mount_point)}\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/
enabled = true
@current_resource.fstype($1)
@current_resource.options($2)
# from rsyslog::default.rb:
# move this into the provider....
# service "rsyslog" do
# supports :restart => true, :reload => true
# action [:enable, :start]
# end
# from rsyslog/providers/imfile.rb: