git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
#!/bin/bash | |
cd "$(dirname "$0")" | |
source .qstr.bash | |
echo -ne "Content-Type: video/x-matroska\r\n\r\n" | |
if [ -f /tmp/tv.pid ]; then | |
if kill -0 $(cat /tmp/tv.pid) >/dev/null 2>&1; then | |
exit | |
fi |
/var/lib/docker/containers/*/*-json.log { | |
dateext | |
daily | |
rotate 365 | |
compress | |
delaycompress | |
missingok | |
} |
#!/bin/sh | |
# | |
# You should define BINTRAY_ACCOUNT and BINTRAY_APIKEY here or from the outside | |
# BINTRAY_ACCOUNT is you Bintray account and BINTRAY_APIKEY, API Key generated under your Bintray profile | |
# Redefine following variables to match your own usage | |
RPMS_DIR=RPMS/noarch | |
BINTRAY_ACCOUNT=hgomez | |
BINTRAY_REPO=devops-incubator-rpm |
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
# 9 workers and 1 master | |
worker_processes 9 | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app true | |
# Restart any workers that haven't responded in 30 seconds | |
timeout 30 |
require 'rubygems' | |
require 'merb-core' | |
require 'chef' | |
Chef::Config.from_file(File.join("/etc", "chef", "server.rb")) | |
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)), | |
:environment => ENV['RACK_ENV'], | |
:fork_for_class_load => false, | |
:init_file => File.dirname(__FILE__) / "config/init.rb") |
require 'merb-core' | |
require 'chef' | |
Chef::Config.from_file('/etc/chef/server.rb') | |
require 'chef/nanite' | |
require 'uuidtools' | |
Chef::Config[:nanite_identity] = "chef-#{UUIDTools::UUID.random_create.to_s}" | |
Chef::Nanite.in_event { Chef::Log.info "Nanite Booting..." } | |
time = 17 |
# ec2 ami-1515f67c | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem sources -a http://gemcutter.org # for nanite | |
sudo gem install cucumber merb-core nanite jeweler uuidtools json --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git |
before_restart "stage 1" do | |
puts "hi we are executing stage 1..." | |
puts "stage 1 done" | |
end | |
before_restart "stage 2" do | |
puts "hi we are executing stage 2..." | |
puts "stage 2 done" | |
end |
ruby_block "fire that shit up dawg" do | |
block do | |
fork do | |
fork do | |
exec "chef-solo zzzzzzzzzzz" | |
exit | |
end | |
exit | |
end | |
Chef::Application.fatal! "oh snap", 1 |