Skip to content

Instantly share code, notes, and snippets.

View mattray's full-sized avatar
🇦🇺
in Sydney

Matt Ray mattray

🇦🇺
in Sydney
View GitHub Profile
@mattray
mattray / OUTPUT
Created December 14, 2010 21:13
apt_repository LWRP
mray@ubuntu1004:/etc/apt/sources.list.d$ sudo chef-client
[Tue, 14 Dec 2010 15:05:49 -0600] INFO: Starting Chef Run (Version 0.9.12)
[Tue, 14 Dec 2010 15:05:51 -0600] INFO: Storing updated cookbooks/apt/providers/repository.rb in the cache.
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: Ran execute[apt-get update] successfully
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: Zenoss Server: http://dev.zenoss.org/deb main stable
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: APT 1:false
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: APT 2::deb
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: APT 3::deb
[Tue, 14 Dec 2010 15:05:53 -0600] INFO: APT 4::deb
[Tue, 14 Dec 2010 15:05:53 -0600] ERROR: apt_repository[deb http://dev.zenoss.org/deb main stable] (/var/chef/cache/cookbooks/zenoss/recipes/server.rb:26:in `from_file') had an error:
@mattray
mattray / gist:744048
Created December 16, 2010 21:28
zenoss::server
[Thu, 16 Dec 2010 14:46:42 -0600] INFO: Starting Chef Run (Version 0.9.12)
[Thu, 16 Dec 2010 14:46:43 -0600] INFO: Removing cookbooks/getting-started/recipes/default.rb from the cache; its cookbook is no longer needed on this client.
[Thu, 16 Dec 2010 14:46:43 -0600] INFO: Removing cookbooks/getting-started/metadata.rb from the cache; its cookbook is no longer needed on this client.
[Thu, 16 Dec 2010 14:46:43 -0600] INFO: Removing cookbooks/getting-started/metadata.json from the cache; its cookbook is no longer needed on this client.
[Thu, 16 Dec 2010 14:46:43 -0600] INFO: Removing cookbooks/getting-started/templates/default/chef-getting-started.txt.erb from the cache; its cookbook is no longer needed on this client.
[Thu, 16 Dec 2010 14:46:43 -0600] INFO: Removing cookbooks/getting-started/README.rdoc from the cache; its cookbook is no longer needed on this client.
[Thu, 16 Dec 2010 14:46:44 -0600] INFO: Storing updated cookbooks/zenoss/recipes/server.rb in the cache.
[Thu, 16 Dec 2010 14:46:45 -0600] INFO:
/Devices/Server/SSH/Linux/MySQL zCommandUsername='ubuntu', setSystems='/DB', zDeviceTemplates=[ 'Device', 'MySQLSSH', 'b_fping' ], zMySqlUsername='root', zMySqlPassword='4ynjMYDMQHfe', zChefRole='mysql'
ec2-184-72-248-3.compute-1.amazonaws.com zKeyPath='/home/zenoss/.ssh/gameday-shared-east.pem'
ec2-75-101-175-86.compute-1.amazonaws.com zKeyPath='/home/zenoss/.ssh/gameday-shared-east.pem'
ec2-184-72-6-135.us-west-1.compute.amazonaws.com zKeyPath='/home/zenoss/.ssh/gameday-shared-west.pem'
ec2-184-72-8-8.us-west-1.compute.amazonaws.com zKeyPath='/home/zenoss/.ssh/gameday-shared-west.pem'
1) https://github.com/mattray/cookbooks/commit/708fcd2f246c5f80316539d65df288313ff840f5
2) https://github.com/mattray/cookbooks/commit/6f466d0ad52089ea488eb001231f0dd626682f8f
3) https://github.com/mattray/cookbooks/commit/a6b00a71524d3e4de78aea2f8b151f27002f1599 (included renaming a Zenoss file)
4) https://github.com/mattray/cookbooks/commit/04ee95be1fc2bef475c00f140b059d46fd145580
$ knife cookbook upload apache2
INFO: Saving apache2
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
INFO: Generating Metadata
INFO: Uploading files
INFO: Uploading /Users/mray/ws/chef-repo/cookbooks/apache2/recipes/mod_auth_digest.rb (checksum hex = 2f33fab3bde2a39d8a68fc0824a881a8) to https://s3.amazonaws.com/opscode-platform-production-data/organization-0a90a319b5a04be3b69f527f6657dd17/sandbox-8ba05b07fc5743f9a3a87275f82db013/checksum-2f33fab3bde2a39d8a68fc0824a881a8?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1293034459&Signature=I0x7n7n%2FeBTrnmwAzlRCmQtCZcg%3D
INFO: Uploading /Users/mray/ws/chef-repo/cookbooks/apache2/templates/default/mod_auth_openid.rb.erb (checksum hex = e438e3ed68630263c50bf6d93eb32ed8) to https://s3.amazonaws.com/opscode-platform-production-data/organization-0a90a319b5a04be3b69f527f6657dd17/sandbox-8ba05b07fc5743f9a3a87275f82db013/checksum-e438e3ed68630263c50bf6d93eb32ed8?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1293034459&Signature=U8PPK9a6zeGgHcea%2FsZ4S
git status
# On branch master
nothing to commit (working directory clean)
mray@morbo[11:19](master)[] ~/Opscode/pbi-tse/pbis/Conferences
$ git push origin master
To [email protected]:mattray/pbi-tse.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:mattray/pbi-tse.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
mray@ubuntu1004:~$ sudo chef-client
[Wed, 29 Dec 2010 16:13:42 -0600] INFO: Starting Chef Run (Version 0.9.12)
[Wed, 29 Dec 2010 16:13:44 -0600] INFO: Storing updated cookbooks/zenoss/providers/zendmd.rb in the cache.
[Wed, 29 Dec 2010 16:13:45 -0600] INFO: Ran execute[apt-get update] successfully
[Wed, 29 Dec 2010 16:13:47 -0600] INFO: ROLE: role[Austin]
[Wed, 29 Dec 2010 16:13:47 -0600] INFO: DESCRIPTION: Opscode Austin
[Wed, 29 Dec 2010 16:13:47 -0600] INFO: OVERRIDE_ATTRIBUTES: zenossdeviceaddress1005 W 38th Street
Austin, TX 78705locationAustin
[Wed, 29 Dec 2010 16:13:47 -0600] INFO: DEFAULT_ATTRIBUTES:
[Wed, 29 Dec 2010 16:13:47 -0600] INFO: ROLE: role[Seattle]
tmux start-server
tmux new-session -d -s morbo -n "#1"
tmux new-window -t morbo:2 -n "#2"
tmux new-window -t morbo:3 -n "#3"
tmux new-window -t morbo:4 -n "#4"
tmux new-window -t morbo:5 -n "#5"
tmux new-window -t morbo:6 -n "#6"
tmux new-window -t morbo:7 -n "#7"
tmux new-window -t morbo:8 -n "#8"
tmux new-window -t morbo:9 -n "#9"
@mattray
mattray / gist:823478
Created February 12, 2011 03:42
euca-describe-groups
cmd = Chef::ShellOut.new("sudo -i -u #{node[:nova][:creds][:user]} euca-describe-groups")
groups = cmd.run_command
execute "euca-authorize -P icmp -t -1:-1 default" do
user node[:nova][:creds][:user]
not_if {groups.stdout.include?("icmp")}
end
execute "euca-authorize -P tcp -p 22 default" do
user node[:nova][:creds][:user]
@mattray
mattray / gist:895334
Created March 30, 2011 21:22
knife cookbook list
$ knife cookbook list
Showing latest versions. Use --show-all to list all available versions.
/Library/Ruby/Gems/1.8/gems/chef-0.10.0.beta.1/lib/chef/knife.rb:416:in `rest': uninitialized constant Chef::REST (NameError)
from /Library/Ruby/Gems/1.8/gems/chef-0.10.0.beta.1/lib/chef/knife/cookbook_list.rb:43:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.10.0.beta.1/lib/chef/knife.rb:157:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.10.0.beta.1/lib/chef/application/knife.rb:119:in `run'
from /Library/Ruby/Gems/1.8/gems/chef-0.10.0.beta.1/bin/knife:25
from /usr/bin/knife:19:in `load'
from /usr/bin/knife:19