This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.ssh.forward_agent = true | |
config.vm.provision :shell, :inline => <<EOF | |
apt-get update | |
apt-get install -y git-core redis-server curl libssl0.9.8 make g++ | |
mkdir -p -m 0550 /root/.ssh/ | |
echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/chef/embedded/bin/ruby | |
require 'net/http' | |
require 'json' | |
require 'yaml' | |
STDOUT.sync = true | |
config = YAML.load_file(ARGV[0]) | |
http = Net::HTTP.new("127.0.0.1", 4243) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:12.04 | |
CMD curl -O http://www.akins.org/nginx/nginx_1.2.8-2.ubuntu.12.04_amd64.deb | |
CMD dpkg -i nginx_1.2.8-2.ubuntu.12.04_amd64.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# should be /etc/sv/my-awesome-containerized-app/log/run | |
# create a lumberjack ( https://github.com/jordansissel/lumberjack ) config like | |
# | |
# { | |
# ..put server stuff here... | |
# "files": [ | |
# { | |
# "paths": [ "-" ], | |
# "fields": { "type": "stdin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# should be /etc/sv/my-awesome-containerized-app/log/run | |
# create a lumberjack ( https://github.com/jordansissel/lumberjack ) config like | |
# | |
# { | |
# ..put serevr stuff here... | |
# "files": [ | |
# { | |
# "paths": [ "-" ], | |
# "fields": { "type": "stdin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "ridley" | |
require "multi_json" | |
require 'pp' | |
require 'chef_zero/server' | |
plan = MultiJson.load(IO.read(ARGV[0])) | |
#pp plan | |
environment = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
if [[ ! -f /root/.ssh/authorized_keys ]]; then | |
authorized_keys=$(/usr/sbin/mdata-get root_authorized_keys) | |
if [[ -n ${authorized_keys} ]]; then | |
mkdir -p /root/.ssh | |
echo -e "${authorized_keys}" > /root/.ssh/authorized_keys | |
chmod 700 /root/.ssh | |
chmod 600 /root/.ssh/authorized_keys | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www www; | |
worker_processes 1; | |
worker_rlimit_nofile 8256; | |
events { | |
worker_connections 8192; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Generate jekyll site" | |
task :generate do | |
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) | |
puts "## Generating Site with Jekyll" | |
system "bundle exec compass compile --css-dir #{source_dir}/stylesheets" | |
system "bundle exec jekyll" | |
Find.find "public" do |path| | |
if FileTest.file?(path) and path.match(/\.(css|js|html|xml|txt)$/) | |
system "gzip -c #{path} > #{path}.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#some defaults | |
PROJECT_VERSION=0.1.0 | |
NODE_VERSION=0.10.5 | |
PROJECT=$(basename $(pwd)) | |
if [ -r .node_version ]; then | |
. .node_version | |
fi |