Skip to content

Instantly share code, notes, and snippets.

View chhibber's full-sized avatar

Sono Chhibber chhibber

View GitHub Profile
@chhibber
chhibber / gist:8414044
Created January 14, 2014 06:32
AWS - Bootstrap Examples
#!/bin/bash -
#===============================================================================
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en
#===============================================================================
set -x
set -e
SALT_BOOTSTRAP_SCRIPT="salt-bootstrap.sh"
SALT_BOOTSTRAP_DOWNLOAD="http://bootstrap.saltstack.org"
exec 2>&1 > /tmp/awsbootstrap.log
@chhibber
chhibber / gist:8413983
Created January 14, 2014 06:27
Cloudformation - VPC
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "US West 2 (Oregon) Development VPC :: SG, Routing, EIPs :: Avalability Zones: 2A,2B,2C",
"Parameters" : {
},
"Mappings" : {
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "US East Development Staging :: ELBs, RDS, DNS, WWWs, and Workers :: AZ-1B and AZ-1C",
"Parameters" : {
"AGInstanceType" : {
"Type" : "String",
"Description" : "Instance Type for autoscaling group",
@chhibber
chhibber / gist:6908927
Last active June 23, 2022 20:02
LaunchConfig with Cloudformation::Init
"LaunchConfig" : {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"files" : {
"/tmp/boot-strap-nat00.sh" : {
"source" : { "Fn::Join" : ["", [
"http://", { "Ref" : "AWS::Region" }, "-development-appname", ".s3.amazonaws.com/path/to/boot-strap-nat00.sh"
]]}
@chhibber
chhibber / gist:5968213
Last active December 19, 2015 14:19
Saltstack - Newrelic System Daemon Setup
Newrelic - install repo:
cmd.run:
- name: rpm -Uvh http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
- unless: rpm -qa | grep newrelic-repo
newrelic-sysmond:
pkg:
- installed
- require:
- cmd: Newrelic - install repo
@chhibber
chhibber / gist:5878628
Created June 27, 2013 17:43
rbenv_install.sh
#!/bin/bash
set -e
set -x
CURRENT=`pwd`
RBENV_VERSION=1.9.3-p429
#[ -z "$1" ] && { echo "No version set - check pillar data"; exit 1 }