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
curl -skL -X GET https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker > `brew --prefix`/etc/bash_completion.d/docker |
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 | |
SHA1=$1 | |
BUILD_NUM=$2 | |
# Push image to Docker Registry | |
docker commit `docker run -d portaldev_web` $DOCKER_REPO:$SHA1 | |
docker push $DOCKER_REPO:$SHA1 | |
# Create Elastic Beanstalk zipped source bundle | |
DOCKERRUN_FILE=Dockerrun.aws.json |
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
curl -sLX GET 'https://api.newrelic.com/v2/servers.json' \ | |
-H "X-Api-Key:${NEW_RELIC_API_KEY}" | \ | |
jq -r '.servers | [ .[] | select(.reporting == 'false') ] | .[] | ."id" ' | \ | |
xargs -L1 -I% curl -X DELETE 'https://api.newrelic.com/v2/servers/%.json' \ | |
-H "X-Api-Key:${NEW_RELIC_API_KEY}" -i |
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
AWS_DEFAULT_REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region) | |
EC2_INSTANCE_ID=$(curl -sL http://169.254.169.254/latest/meta-data/instance-id) | |
EB_ENVIRONMENT_ID=$(aws ec2 describe-tags --filter Name=resource-id,Values=$EC2_INSTANCE_ID --region $AWS_DEFAULT_REGION | jq -r '.Tags | .[] | select(.Key=="elasticbeanstalk:environment-id") | .Value') | |
EB_APPLICATION_VERSION=$(aws elasticbeanstalk describe-environments --environment-ids $EB_ENVIRONMENT_ID --region $AWS_DEFAULT_REGION --region $AWS_DEFAULT_REGION | jq -r '.Environments | .[] | .VersionLabel') |
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
# See http://help.papertrailapp.com/kb/hosting-services/aws-elastic-beanstalk/ | |
sources: | |
/home/ec2-user: https://github.com/papertrail/remote_syslog2/releases/download/<VERSION>/remote_syslog_linux_amd64.tar.gz | |
files: | |
"/etc/log_files.yml": | |
mode: "00644" | |
owner: root | |
group: root |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "MyApp VPC", | |
"Parameters" : { | |
"Project" : { | |
"Description" : "Project name to tag resources with", | |
"Type" : "String", | |
"MinLength": "1", | |
"MaxLength": "16", | |
"AllowedPattern" : "[a-z]*", |
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
[ | |
{ "ParameterKey": "Project", "ParameterValue": "myapp" }, | |
{ "ParameterKey": "Environment", "ParameterValue": "dev" }, | |
{ "ParameterKey": "VPCNetworkCIDR", "ParameterValue": "10.0.0.0/16" }, | |
{ "ParameterKey": "VPCSubnet0CIDR", "ParameterValue": "10.0.0.0/24" }, | |
{ "ParameterKey": "VPCSubnet1CIDR", "ParameterValue": "10.0.1.0/24" }, | |
{ "ParameterKey": "VPCSubnet2CIDR", "ParameterValue": "10.0.2.0/24" } | |
] |
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
STACK:=myapp-dev | |
TEMPLATE:=cloudformation-template_vpc-iam.json | |
PARAMETERS:=cloudformation-parameters_myapp-dev.json | |
AWS_REGION:=us-east-1 | |
AWS_PROFILE:=aws-dev | |
all: | |
@which aws || pip install awscli | |
aws cloudformation create-stack --stack-name $(STACK) --template-body file://`pwd`/$(TEMPLATE) --parameters file://`pwd`/$(PARAMETERS) --capabilities CAPABILITY_IAM --profile $(AWS_PROFILE) --region $(AWS_REGION) |
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
aws cloudformation describe-stacks --stack-name myapp-dev --profile aws-dev --region us-east-1 | jq -r '.Stacks[].Outputs' | |
[ | |
{ | |
"Description": "VPC Id", | |
"OutputKey": "VpcId", | |
"OutputValue": "vpc-b7d1d8d2" | |
}, | |
{ | |
"Description": "VPC", | |
"OutputKey": "VPCDefaultNetworkAcl", |
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
packages: | |
yum: | |
wget: [] | |
curl: [] | |
commands: | |
00_remove_99_swap.conf.bak: | |
command: rm -f /etc/sysctl.d/99_swap.conf.bak | |
test: test -f /etc/sysctl.d/99_swap.conf.bak | |
ignoreErrors: true | |
00_remove_99_filesystem.conf.bak: |