This file contains hidden or 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 | |
# | |
# vmrun.sh | |
# | |
# Wrapper around vmrun to make running a shell command | |
# or script in the path easier. Outputs stdout/stderr | |
# from the command in the guest and exits with the | |
# same return code. | |
# | |
# Amit Bakshi |
This file contains hidden or 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
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install the CloudInit.NET service, 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 R2 Core x64 and Windows 2008 SP2 x86 AMIs provided | |
# by Amazon | |
# | |
# To run the script, open up a PowerShell prompt as admin | |
# PS> Set-ExecutionPolicy Unrestricted | |
# PS> icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://raw.github.com/gist/1672426/Bootstrap-EC2-Windows-CloudInit.ps1')) |
This file contains hidden or 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
$include /etc/inputrc | |
set editing-mode vi | |
set keymap vi-insert | |
"\C-l": clear-screen | |
set keymap vi | |
#set completion-ignore-case on | |
#set show-all-if-ambiguous on | |
#set page-completions off | |
set match-hidden-files off |
This file contains hidden or 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
; vim:set filetype=dosini: | |
[alias] | |
fap = fetch --all --prune | |
sb = status -sb | |
st = status -s | |
co = checkout | |
br = branch | |
bv = branch -avv | |
rv = remote -v |
This file contains hidden or 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 centos:centos6 | |
MAINTAINER Amit Bakshi <[email protected]> | |
RUN yum update -y && \ | |
yum groupinstall -y 'Development tools' && \ | |
yum install -y tar gzip cronolog rsyslog ruby ruby-devel rubygems vim-enhanced \ | |
epel-release sudo hg bash-completion bzr rpmdevtools rpm-build rpm-libs \ | |
openssh openssh-server openssh-clients screen mysql-server mysql httpd php | |
RUN gem install --no-rdoc --no-ri fpm | |
RUN rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm |
This file contains hidden or 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 | |
exec > >(tee /var/log/user-data.log|logger -it user-data -s 2>/dev/console) 2>&1 | |
eval `ec2-tags -s -i` | |
/usr/sbin/sendmail -oi -t -f $EMAIL <<EOM | |
From: $EMAIL | |
To: $EMAIL | |
Subject: EC2 instance failure |
This file contains hidden or 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 | |
set -e | |
## striping seems to break docker | |
#STRIPE="-i2 -I64" | |
#DEVS="/dev/xvdf /dev/xvdg" | |
DEVS="$1" | |
if [ -z "$DEVS" ]; then | |
echo >&2 "Specify which block devices to use" | |
exit 1 |
This file contains hidden or 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 | |
# | |
# 1. Downloads, builds and install Golang from source. | |
# into $HOME/opt/goXXX where GOROOT is $HOME/opt/go | |
# symlink to the current version. | |
# 2. Install some standard go tools and helpers | |
# 3. Update $GOPATH built packages with new version of compiler | |
# | |
set -e |
This file contains hidden or 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 | |
# | |
# Get all IPs from an autoscale group and update set the local ip as | |
# equal weight A entries (round robin dns). Takes autoscale group as | |
# parameter. | |
# | |
# Amit Bakshi | |
# 10/21/2014 | |
# |
This file contains hidden or 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 | |
# | |
# | |
# Download the latest docker release and | |
# make sure /etc/sysconfig/docker is set | |
# to use it. | |
# | |
set -e |