Skip to content

Instantly share code, notes, and snippets.

View ramarnat's full-sized avatar

Rohit Amarnath ramarnat

View GitHub Profile
[Wed, 19 Jan 2011 16:43:01 -0500] DEBUG: Processing aws_ebs_volume[vertica_catalog_01] on i-9f37e8f3
[Wed, 19 Jan 2011 16:43:01 -0500] DEBUG: Executing true
[Wed, 19 Jan 2011 16:43:01 -0500] ERROR: aws_ebs_volume[vertica_catalog_01] (/var/chef/cache/cookbooks/ebs_mgmt/recipes/vertica_filesystem.rb:35:in `from_file') had an error:
can't convert true into String
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command/unix.rb:102:in `exec'
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command/unix.rb:102:in `popen4'
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command/unix.rb:64:in `fork'
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command/unix.rb:64:in `popen4'
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command.rb:160:in `output_of_command'
/usr/lib64/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/command.rb:149:in `chdir'
#!/bin/sh -e
# Root SSH Public Key
mkdir -p /root/.ssh >/dev/null 2>&1
wget -q -O - http://169.254.169.254/2008-02-01/meta-data/public-keys/0/openssh-key\
>/root/.ssh/authorized_keys
chmod -R go-rwsx /root
# Userdata Shell Script
wget -q -O - http://169.254.169.254/2008-02-01/user-data| sh
exit 0
#!/usr/bin/ruby
#requires
require 'rubygems'
require 'erb'
require 'json'
require 'chef'
require 'chef/knife'
# Get validation key
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description" : "elasticBI - Vertica Edition",
"Parameters": {
"RunList": {
"Default": "role[vertica_4_1_6]",
"Description" : "Chef Run List",
"Type": "String"
export PATH=/sbin:/usr/sbin:$PATH
export HOME=/root
cd $HOME
yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf make
yum install -q -y unixODBC unixODBC-devel
gem install ohai chef --no-rdoc --no-ri --verbose
gem install right_aws --no-rdoc --no-ri --verbose
[root@adwx6401 ~]# cd /var/log/
[root@adwx6401 log]# tail -f chef-client.log
[Sun, 27 Feb 2011 18:23:43 -0500] INFO: Chef Run complete in 394.88224 seconds
[Sun, 27 Feb 2011 18:23:43 -0500] INFO: cleaning the checksum cache
[Sun, 27 Feb 2011 18:23:43 -0500] INFO: Running report handlers
[Sun, 27 Feb 2011 18:23:43 -0500] INFO: Report handlers complete
[Sun, 27 Feb 2011 18:23:43 -0500] DEBUG: Exiting
vagrant@precise64:~$ docker build -t ramarnat/centos_upstart .
Uploading context 13742080 bytes
Step 1 : FROM centos:6.4
---> 539c0211cd76
Step 2 : RUN yum -y install upstart
---> Running in d3bc8dbef6c2
Loaded plugins: fastestmirror
Setting up Install Process
Resolving Dependencies
--> Running transaction check
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM
# AND install 7-zip, curl and .NET 4 if its missing.
# Then use the EC2 tools to create a new AMI from the result, and you have a system
# that will execute user-data as a PowerShell script after the instance fires up!
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon
#
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs):
#
# <powershell>
# $log = 'c:\bootstrap_output.txt'
$ cat /bin/sudo
#!/bin/bash
while getopts ":a:" opt; do
case $opt in
\?)
shift
;;
esac
done
shift $((OPTIND-1))
require 'grape'
require 'rspec'
require 'rack/test'
module Example
module TransactionTestHelper
include Rack::Test::Methods
def app
Example::Root