Skip to content
View gist:63ec5219cb8e9af2c5a7
tox -e py27
py27 develop-inst-nodeps: /Users/jodewey/git/mutate
py27 runtests: PYTHONHASHSEED='1829504779'
py27 runtests: commands[0] | nosetests
{"asctime": "2014-05-25 16:01:27,441", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "target", "source": "source"}
.{"asctime": "2014-05-25 16:01:27,442", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "/tmp/foo.raw", "source": "/tmp/foo.qcow2"}
.{"asctime": "2014-05-25 16:01:27,442", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "target", "source": "source"}
.{"asctime": "2014-05-25 16:01:27,443", "funcName": "create", "levelname": "DEBUG", "message": "Uploading image", "module": "image", "image_file": "image_file"}
.{"asctime": "2014-05-25 16:01:27,443", "funcName": "create", "levelname": "DEBUG", "message": "Uploading image", "module": "image", "image_file": "/tmp/foo.raw"}
.{"asctime": "20
View accounts.rb
20 user 'nsqd' do
21 action :create
22 system true
23 end
25 user 'nsqlookupd' do
26 action :create
27 system true
28 end
View gist:11193855
[2014-04-21T06:27:48+00:00] INFO: execute[debconf] ran successfully
[2014-04-21T06:31:05+00:00] INFO: directory[/opt/apache] created directory /opt/apache
[2014-04-21T06:31:05+00:00] INFO: user[kafka] created
[2014-04-21T06:31:05+00:00] INFO: directory[/opt/apache/kafka] created directory /opt/apache/kafka
[2014-04-21T06:31:50+00:00] INFO: remote_file[/var/chef/cache/kafka.tgz] updated
[2014-04-21T06:31:50+00:00] INFO: remote_file[/var/chef/cache/kafka.tgz] not queuing delayed action run on execute[unpack /var/chef/cache/kafka.tgz] (delayed), as it's already been queued
[2014-04-21T06:31:50+00:00] INFO: template[/etc/init/zookeeper.conf] updated content
[2014-04-21T06:31:50+00:00] INFO: service[zookeeper] started
[2014-04-21T06:31:50+00:00] INFO: directory[/opt/apache/kafka] sending run action to execute[unpack /var/chef/cache/kafka.tgz] (delayed)
[2014-04-21T06:31:51+00:00] INFO: execute[unpack /var/chef/cache/kafka.tgz] ran successfully
View gist:11018218

Creating a self-signed CA

$ openssl req -new -x509 -nodes -days 365 -out CA.crt -keyout CA.key -subj '/CN=Test CA'
$ openssl req -new -nodes -out cert.req -keyout cert.key -subj '/CN=*.openstack.local'
$ openssl x509 -req -in cert.req -CA CA.crt -CAkey CA.key -CAcreateserial -days 365 -out cert.crt

View the expiration date for an x509 certificate. Unless passing the -days flag when creating the CA cert, it will default to '30', as defined by the default_crl_days option in /etc/ssl/openssl.cnf.

$ openssl x509 -text -in CA.crt
View gist:9925465
name: /Common/monitoring-nagios-active-passive-pools
rule: >
if { [active_members active_pool_name_80_pl] >= 1 } {
pool active_pool_name_80_pl
} else {
pool backup_pool_name_80_pl
View gist:9128909
2014-02-21 04:34:34,784 INFO serf1: ['serf1', 'serf2', 'serf3'] joined
2014-02-21 04:34:34,883 INFO serf3: ['serf3', 'serf2', 'serf1'] joined
2014-02-21 04:34:34,787 INFO Added to serf1 on eth1:1/24_tribe
2014-02-21 04:34:34,789 INFO Added to serf1 on eth1:2/24_tribe
2014-02-21 04:34:34,790 INFO Added to serf1 on eth1:3/24_tribe
2014-02-21 04:34:34,964 INFO serf2: ['serf2', 'serf1', 'serf3'] joined
root@serf1:~# service serf stop
serf stop/waiting
View gist:6647881
openstack_base_patch "ui.js" do
cwd "/usr/share/novnc"
notifies :restart, "service[nova-novncproxy]", :immediately
View gist:6647272
if [[ -z "$CHECKSUM" ]]; then
echo "Usage: $0 md5 file"
exit 1
elif [[ -z "$FILE" ]]; then
echo "Usage: $0 md5 file"
View network_addr.rb
# Author:: Joshua Timberman (<>)
# Copyright:: Copyright (c) 2011 Opscode, Inc.
# License:: Apache License, Version 2.0
# 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
View gist:4004735
execute "create swapfile" do
command <<-eof
dd if=/dev/zero of=#{swap_location} bs=1M count=#{swap_size_megs} &&
chmod 600 #{swap_location} &&
mkswap #{swap_location}
not_if { File.exists?("#{swap_location}") }
Something went wrong with that request. Please try again.