This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The scenario: | |
Customer is setting up DRBD chef server. They have 1 TB raid array, but only use around 2 GB of that | |
space for chef server. Our directions call out for setting up LVM at 80% of physical volume for bit | |
level replication. | |
Customer wanted to know if we can setup LVM for a much smaller chunk of the RAID so they can utilize | |
the rest of it for soemthing else, for example Nexus. | |
A: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## identifying cookbooks where metadata does not match folder name | |
dir | %{$folder=$_.basename -replace '-\d{1,}.\d{1,}.\d{1,}' | |
$meta_name= (cat $_\metadata.rb|select-string "name ") -replace 'name {1,}' -replace "'" | |
if ($folder -ne $meta_name){write-host $folder} | |
} | |
dir role_chef_client_* | %{$_.basename -replace '-\d{1,}.\d{1,}.\d{1,}'} | |
dir role_chef_client_* | %{(cat $_\metadata.rb|select-string "name ") -replace 'name {1,}' -replace "'"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Method 1 ### | |
$ knife role from file roles/windows_web.rb \ | |
--key .chef-test_user/test_user.pem \ | |
--user test_user | |
Benefits: | |
* Uses standard knife subcomands | |
* Out of the box | |
Caveats: | |
* Requires the users private keys on the jenkins machine. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/chef/embedded/bin/ruby | |
require 'json' | |
class Checker | |
def check | |
check_cookbook_metadata | |
check_node_sizes | |
check_bad_platform_metadata | |
check_bad_invitations | |
check_duplicates_in_groups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-Alias s "C:\Program Files\Sublime Text 3\sublime_text.exe" -force | |
new-alias ll 'dir' -force | |
$MaximumHistoryCount = 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ssl": {"verify": false}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
waffle.io | |
can put kanban on top of github. | |
can also roll up multiple github repos. | |
can do milestones based on lables or tags. | |
chet/test-driven-infrastructure | |
seems like a much better way of capturing of exactly what we're working on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.chef.io/knife_bootstrap.html#custom-templates | |
https://docs.chef.io/install_bootstrap.html | |
https://docs.chef.io/knife_bootstrap.html | |
https://github.com/chef/chef/blob/12.2.1/lib/chef/knife/bootstrap/templates/chef-full.erb | |
https://github.com/chef/chef/blob/11.6.2/lib/chef/knife/bootstrap/chef-full.erb | |
Blog: | |
https://www.chef.io/blog/2014/10/28/working-with-chef-behind-your-firewall/ | |
http://www.appneta.com/blog/customizing-chef-bootstrap-templates/ | |
http://www.tomduffield.com/bootstrapping-without-the-internet/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Its a cookbook class that we use to abstract cookbooks and their | |
dependencies. The key method to look at is dependency_hash which creates | |
a hash based on the dependencies of the cookbook. | |
We do not explicitly do a reverse dependency lookup but we can use this | |
hash to infer a change in dependencies from a change in any cookbook in | |
an environment. So the flow is: | |
1. I change cookbook A and it gets sent to the chef server and indexed | |
in berks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login as: chef | |
[email protected]'s password: | |
Last login: Tue Jun 2 10:54:38 2015 from 38.104.1.242 | |
_______________ | |
/ ___/ __/_ __/ | |
/ (_ / _/ / / | |
\___/___/ /_/ | |
_______ ___________ | |
/ __/ _ \/ __/ __/ _ \ | |
_\ \/ ___/ _// _// // / |