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
[ec2-user@ip-172-31-22-129 ~]$ sudo yum -y install gcc libyaml-devel | |
..... | |
.... | |
... | |
.. | |
. | |
Installed: | |
gcc.noarch 0:4.8.3-3.20.amzn1 libyaml-devel.x86_64 0:0.1.6-6.7.amzn1 | |
Dependency Installed: |
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 -x | |
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7` | |
export ENV=`echo $1 | rev | cut -d \- -f1 | rev` | |
case "$1" in | |
'production') | |
export ENV_PREFIX=$PROD_PREFIX |
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 -x | |
export S3=`echo $1` | |
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7` | |
export ENV=`echo $1 | rev | cut -d \- -f1 | rev` | |
aws --region $REGION s3 sync . s3://$S3/ --exclude 'circle.yml' --exclude '.*' --exclude '*.swp' --exclude 's3*.sh' --delete | |
if [ $? -eq 0 ]; then |
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 | |
export VER=1.6.2 | |
export GO=go$VER.linux-amd64.tar.gz | |
wget https://storage.googleapis.com/golang/$GO | |
tar xvfz $GO | |
cat >>~/.bash_profile <<EOF | |
export GOROOT=\$HOME/go | |
export GOPATH=\$HOME/golang |
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
tail 0 | |
chksum 0x0f | |
csum 0x0f | |
rl d��| �l�|�$�c|ǃ��{�c�b��og�l'o���#p��${ls$p�'��l��cn�|l�ć�c��g'� l��d`�gnd`or���n��d{��o��$��g� | |
ets Jan 8 2013,rst cause:4, boot mode:(3,6) | |
wdt reset | |
load 0x4010f000, len 1264, room 16 | |
tail 0 | |
chksum 0x0f |
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
$ terraform apply | |
aws_api_gateway_rest_api.EB: Creating... | |
description: "" => "get EB info" | |
name: "" => "EB" | |
root_resource_id: "" => "<computed>" | |
aws_api_gateway_rest_api.EB: Creation complete | |
aws_api_gateway_resource.eb: Creating... | |
parent_id: "" => "k9x3d7qlhd" | |
path: "" => "<computed>" | |
path_part: "" => "eb" |
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
$ terraform plan | |
Refreshing Terraform state prior to plan... | |
The Terraform execution plan has been generated and is shown below. | |
Resources are shown in alphabetical order for quick scanning. Green resources | |
will be created (or destroyed and then created if an existing resource | |
exists), yellow resources are being changed in-place, and red resources | |
will be destroyed. |
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
provider "aws" { | |
region = "ap-northeast-1" | |
allowed_account_ids = ["${var.names.account_id}"] | |
} | |
variable "names" { | |
default = { | |
account_id = "$ACCOUNT_ID" | |
} | |
} |
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
IFS="$(printf '\n\t')" | |
mkdir -p ~/.ssh | |
if ! [[ -f ~/.ssh/authorized_keys ]]; then | |
echo "Creating new ~/.ssh/authorized_keys" | |
touch ~/.ssh/authorized_keys | |
fi | |
grep -q "$1" ~/.ssh/authorized_keys || echo "$1" >> ~/.ssh/authorized_keys |
