Skip to content
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
nagios.failover:
name: /Common/monitoring-nagios-active-passive-pools
rule: >
when CLIENT_ACCEPTED {
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 1.1.1.1/24 to serf1 on eth1:1/24_tribe
2014-02-21 04:34:34,789 INFO Added 2.2.2.2/24 to serf1 on eth1:2/24_tribe
2014-02-21 04:34:34,790 INFO Added 3.3.3.3/24 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
end
View gist:6647272
#!/bin/sh
CHECKSUM=$1
FILE=$2
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 (<joshua@opscode.com>)
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
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}
eof
not_if { File.exists?("#{swap_location}") }
end
View gist:3996907
describe "gems" do
it "has chef installed" do
Gem::Specification.find_by_name('chef').name.must_equal "chef"
end
end
View gist:3837277
# Trying to get tests in this cookbook to work... https://github.com/retr0h/cookbook-sol
emopop:sol(master)☭% ls cookbooks
chef_handler reboot-handler
# Doesn't look at ./cookbooks/
describe "sol::default" do
let(:chef_run) { ChefSpec::ChefRunner.new.converge "sol::default" }
describe "ttyS1" do
Something went wrong with that request. Please try again.