This file contains 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 | |
# | |
# check-codedeploy check-codedeploy shipper | |
# | |
# chkconfig: 2345 98 02 | |
# description: Starts and stops a single check-codedeploy instance on this system | |
# | |
### BEGIN INIT INFO | |
# Provides: check-codedeploy |
This file contains 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 | |
. /etc/bashrc | |
# EC2 Metadata | |
export REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document/ | jq .region -r) | |
export INSTANCEID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
# Get all tags in one call | |
ec2-describe-tags --filter "resource-type=instance" --filter "resource-id=$(ec2-metadata -i | cut -d ' ' -f2)" | cut -f 4,5 > /tmp/ec2_tags |
This file contains 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 | |
############################################################ | |
# run: cloudwatch_push -e staging -q rabbit_queue_name | |
############################################################ | |
while getopts e:q:c:h: option | |
do | |
case "${option}" | |
in | |
e) environment=${OPTARG};; |
This file contains 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
# Not sure how to switch .region to us-west-1 / us-west-2 | |
resource "aws_subnet" "Shared_Services-2A_Public" { | |
vpc_id = "${aws_vpc.default.id}" | |
cidr_block = "${var.aws_region_defaults.region.cidr_prefix}.0.0/23" | |
map_public_ip_on_launch = true | |
} |
This file contains 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
variable "aws_region" { | |
description = "Where would you like to deploy to? Valid regions are: us-west-1, us-west-2, us-east-1" | |
} | |
variable "aws_region_defaults" { | |
default = { | |
us-west-1 = { | |
region_name = "California" | |
region_prefix = "CA" | |
ami_id = "ami-d5ea86b5" |
This file contains 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 | |
export PATH=$PATH:/usr/local/bin | |
THE_USER=`whoami` | |
set -e | |
sudo -u ${THE_USER} mkdir tmp | |
# install prerequisities |