Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -xe
# Run this script from machine with the credintials and the latest api tools installed
EBS_DEVICE='/dev/sdh'
INSTANCE_ID=$1
AKI=${2:-'aki-5f15f636'}
ARI=${3:-'ari-0915f660'}
ARCH=${4:-'i386'}
SIZE=${5:-10}
require 'rubygems'
require 'eventmachine'
$stdout.sync = true
$stderr.sync = true
EM.run {
EM.add_periodic_timer(0.1) {
$stdout.write "stdout\n"
# Cookbook Name:: s3fs
# Recipe:: default
if ['solo', 'app', 'util', 'app_master'].include?(node[:instance_role])
http_request "reporting for s3fs" do
url node[:reporting_url]
message :message => "configuring s3fs"
action :post
epic_fail true
require 'rubygems'
require 'eventmachine'
module Console
PROMPT = "\n>> ".freeze
def post_init
send_data PROMPT
send_data "\0"
end