GCE project cheffian-supermarket
Install and configure api_fqdn:
apt-get update
curl https://packagecloud.io/install/repositories/chef/stable/script.deb | bash
GCE project cheffian-supermarket
Install and configure api_fqdn:
apt-get update
curl https://packagecloud.io/install/repositories/chef/stable/script.deb | bash
aws ec2 describe-subnets --filter "Name=tag:Name,Values=isa-w2a" | |
aws ec2 describe-vpcs --filter "Name=tag:Name,Values=chef_ha_vpc" | |
aws ec2 describe-internet-gateways --filter "Name=tag:Name,Values=chef_ha_vpc" | |
aws ec2 detach-internet-gateway --internet-gateway-id igw-bb7daade --vpc-id vpc-4dea4228 | |
aws ec2 delete-internet-gateway --internet-gateway-id igw-bb7daade |
The web side of the company is doing something like the environment cookbook pattern, where each rev of an application has its own environment, and there ~150 apps. If I'm understanding this correctly, that means there are maybe ~500-1000 environments. So how does a heartbleed-type fix get rolled out? Just overwrite the existing cookbook? Iterate over the environments and update them with the new
Here's some of my thinking attributes:
use default levels, except when you can't
think of attributes in two ways
avoid ruby logic in attributes/default.rb
openssl s_client -connect chefserver.com:443 -showcerts 2>/dev/null </dev/null | openssl x509 -outform PEM > /etc/chef/chef_server.pem | |
chmod 444 /etc/chef_server.pem | |
cat <<END>>/etc/chef/client.rb | |
ssl_ca_file '/etc/chef/cheef_server.pem' | |
END |
chef-server-ctl install opscode-manage fails with undefined method
uri' for LWRP resource apt_repository from cookbook apt`
chef-server 12.0.7 updated to 12.1.1 ubuntu 14.04
launch powershell with admin privileges | |
run: | |
Install-Package -name git -provider chocolatey | |
Install-Package -name chefdk -minimumVersion 0.6.0.1 -provider chocolatey | |
Install-Package -name atom -provider chocolatey | |
Open powershell window as user | |
apm install linter |
# launch powershell with admin privileges | |
# run: | |
# install chocolately | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
# update to WMF 5 & powershell version 5 | |
choco upgrade powershell -pre | |
# reboot machine | |
# launch powershell with admin privileges |
# save as /some/path/to/plugin/mycpu.rb | |
# ohai -d /some/path/to/plugin cpu | |
Ohai.plugin(:Cpu) do | |
provides "cpu" | |
collect_data do | |
cpu[:cores] = cpu[:total] * cpu["0"]["cores"].to_i | |
end | |
end |
# Credit to Sean: http://ertw.com/blog/2012/05/02/controlling-hipchat-status-through-applescript/ | |
# I link this to a Quicksilver trigger so I can press 'Shift-Option-L' when I Leave | |
tell application "System Events" to tell UI element "HipChat" of list 1 of process "Dock" | |
perform action "AXShowMenu" | |
delay 0.5 | |
click menu item "Status" of menu 1 | |
click menu item "Away" of menu 1 of menu item "Status" of menu 1 | |
end tell | |
activate application "ScreenSaverEngine" |