Skip to content

Instantly share code, notes, and snippets.

commands:
01_fix_owner:
command: "mv /tmp/10_fixing_permission.sh /opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh"
files:
/tmp/10_fixing_permission.sh:
content: |
#!/usr/bin/env bash
. /opt/elasticbeanstalk/support/envvars
#!/usr/bin/env python
import sys
from netaddr import IPNetwork
from subprocess import call
cidr = len(sys.argv) == 3 and sys.argv[2] or '24'
if sys.argv[1]:
ips = list(IPNetwork(sys.argv[1] + '/' + cidr))[1:-1]
# Serf Agent
description "Serf Agent"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [06]
kill signal INT # Use SIGINT instead of SIGTERM so serf can depart the cluster.
respawn # Restart the process if it dies and GOAL was not 'stopping'.
kill timeout 90 # Allow 90 seconds for serf to die before sending SIGKILL.
env SERF=/usr/local/bin/serf
DOGE_WOW = 'wow'
DOGE_SO_PROGRAM = 'so program'
DOGE_MANY_BRAIN = 'many brain'
class Greeting
def initialize(greeting="Hello")
@greeting = greeting
end
def hello(name, options={})
puts "#{@greeting} #{name}"
end
end
puts Greeting.new.hello("Luke")
m = Greeting.new.method(:hello)
require 'aws'
require 'pry'
require 'awesome_print'
REGIONS = ['us-east-1','ap-southeast-2']
REGIONS.each do |region|
puts "Fetching volumes for #{region}"
ec2 = AWS::EC2.new(access_key_id: ENV['AWS_ACCESS_KEY_ID'], secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], region: region)
source "http://rubygems.org"
source "http://dist/rubygems"
gem 'rake'
gem 'thor'
gem 'lchadwick-grape', :require => 'grape' # We needed a patch that has been applied to grape master but not yet released
gem 'rabl'
gem 'yajl-ruby'
[4:20pm] evan: like the S3 keys
[4:20pm] claco: I prolly misunderstood
[4:20pm] claco: that's what I get for disappearing for a day
[4:20pm] evan: i'd like us to come up with something that works now
[4:20pm] evan: and we can change it later
[4:21pm] vertis: evan: yeah
[4:21pm] vertis: where are the S3 keys at this point
[4:21pm] claco: regardless, this process is always awesome given the end result
[4:21pm] evan: i've got them on my machine.
@vertis
vertis / gist:4695805
Created February 2, 2013 02:28
Chef logs
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing file[/etc/apt/sources.list.d/nginx.list] action create (/home/vertis/chef/cookbooks/apt/providers/repository.rb line 112)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing package[nginx] action install (nginx::server line 9)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing service[nginx] action enable (nginx::service line 8)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing service[nginx] action start (nginx::service line 8)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing template[nginx.conf] action create (nginx::configuration line 7)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com]
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] =============
Current state:
- README is the getting started point (it should be kept up to date)
- App server and LB server both work in vagrant (thanks to opscode + others)
- Orchestration support using capistrano has been added (instructions in readme)
- Opscode staff will be back as soon as the east coasters start coming in
- Getting EC2 provisioned and deployed is the current challenge
- Issues, tasks & questions on the github issues page
- Everything comes via a pull request
- Evan has given permission for the DB to be broken off into it's own host
- No rearchitecting till it reaches prod (we all want to)