Skip to content

Instantly share code, notes, and snippets.

View someara's full-sized avatar

Sean OMeara someara

View GitHub Profile
request => {:path=>"/v1.0/512133/servers.json", :host=>"servers.api.rackspacecloud.com", :body=>"{\"server\":{\"name\":\"1-centos-rscloud.afistfulofservers.net\",\"imageId\":51,\"flavorId\":1}}", :method=>"POST", :expects=>202, :headers=>{"X-Auth-Token"=>"526f6b17-6e92-4024-b008-067f91166817", "Content-Type"=>"application/json", "Content-Length"=>86, "Host"=>"servers.api.rackspacecloud.com"}}
response => #<Excon::Response:0x101e5fbd0 @body="\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html>\n <head>\n <title>503 Service Unavailable</title>\n </head>\n <body>\n <h1>Error 503 Service Unavailable</h1>\n <p>Service Unavailable</p>\n <h3>Guru Meditation:</h3>\n <p>XID: 272869562</p>\n <address>\n <a href=\"http://www.varnish-cache.org/\">Varnish</a>\n </address>\n </body>\n</html>\n", @status=503, @headers={"Retry-After"=>"0", "X-Varnish"=>"272869562", "Via"=>"1.
ec2-174-129-61-139.compute-1.amazonaws.com Package configuration
ec2-174-129-61-139.compute-1.amazonaws.com
ec2-174-129-61-139.compute-1.amazonaws.com
ec2-174-129-61-139.compute-1.amazonaws.com
e┌──────────────────────┤ Configuring rabbitmq-server ├──────────────────────┐
e│ │
e│ Upgrading from 1.5.4 and below. │
e│ │
e│ You are upgrading from a release prior to 1.6.0. When the RabbitMQ │
e│ server detects the presence of an old database, it moves it to a backup │
navi:~$ knife rackspace image list
ID Name Updated
29 Windows Server 2003 R2 SP2 x86 2010-01-26T12:07:32-06:00
41 Oracle EL JeOS Release 5 Update 3 2010-09-20T09:08:35-05:00
62 Red Hat Enterprise Linux 5.5 2010-09-27T10:58:11-05:00
53 Fedora 13 (Goddard) 2010-06-27T20:13:08-05:00
187811 CentOS 5.4 2009-12-16T01:02:17-06:00
4 Debian 5.0 (lenny) 2009-08-26T14:59:52-05:00
10 Ubuntu 8.04.2 LTS (hardy) 2009-08-26T14:59:54-05:00
17 Fedora 12 (Constantine) 2009-12-15T15:43:59-06:00
@someara
someara / gist:657414
Created November 1, 2010 01:09
knife.rb
log_level :info
log_location STDOUT
node_name 'chef-server/clients/something'
cache_type 'BasicFile'
cache_options( :path => "yourshithere/.chef/checksums" )
cookbook_path [ "yourshithere/cookbooks" ]
client_key '/create/on/chef-server-webui/something.pem'
chef_server_url "http://yourshithere:4000"
@someara
someara / gist:673693
Created November 12, 2010 03:40
chef hostname
bash -c '
echo <%= @config[:chef_node_name] %> > /tmp/chef_node_name
cat /tmp/chef_node_name | cut -d. -f1 > /tmp/proper_hostname
cat /tmp/chef_node_name | cut -d. -f2 | tr -d "\n" > /tmp/proper_dnsdomainname
echo -n "." >> /tmp/proper_dnsdomainname
cat /tmp/chef_node_name | cut -d. -f3 >> /tmp/proper_dnsdomainname
IPV4ADDR=`ip addr | grep eth0 | grep "inet " | cut -d " " -f 6 | cut -d \/ -f 1`
@someara
someara / gist:810282
Created February 3, 2011 21:47
why you shouldn't upgrade system ruby
[root@centos5-1 ~]# repoquery --whatrequires --alldeps --resolve ruby | wc -l
66
[root@centos5-1 ~]# repoquery --whatrequires --alldeps --resolve "ruby(abi) = 1.8" | wc -l
64
[root@centos5-1 ~]#
fedora13-1:~# repoquery --whatrequires --alldeps --resolve ruby | wc -l
175
fedora13-1:~# repoquery --whatrequires --alldeps --resolve "ruby(abi) = 1.8" | wc -l
byte-compiling build/bdist.linux-x86_64/egg/tracscreenshots/tags.py to tags.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracscreenshots/api.py to api.pyc
File "build/bdist.linux-x86_64/egg/tracscreenshots/api.py", line 53
'where' : (' WHERE ' + where) if where else ''}
^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/tracscreenshots/db/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracscreenshots/db/db4.py to db4.pyc
@someara
someara / gist:872443
Created March 16, 2011 12:55
chef repo .gitignore
.chef/client.rb
.chef/knife.rb
.chef/checksums
*.pem
tmp/*
.rake_test_cache
*.swp
*.swo
*~
metadata.json
payment-1:~# cat /usr/bin/payment
#!/bin/bash
set -e
trap "kill 0" SIGINT SIGTERM EXIT
if [ -f /etc/sysconfig/payment ]; then
. /etc/sysconfig/payment
fi
#!/bin/bash
set -e
set -x
trap "echo EXITING THE SCRIPT" EXIT
export RAILS_ENV="mind"
set +e
/usr/local/bin/rvm-shell 'default' -c '