I hereby claim:
- I am jmlrt on github.
- I am jmlrt (https://keybase.io/jmlrt) on keybase.
- I have a public key ASDTN1Tul2QgMnw6MCSzixRFfyfZqUlBHBvYf5jt8Q-Fpwo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# List terraform resources in the current directory and ask their arn to import them into terraform state | |
RESOURCES_LIST=$(awk -F\" '/^resource "/ {print $2"."$4}' *.tf) | |
for resource in ${RESOURCES_LIST} | |
do | |
read -p "Enter ARN for resource ${resource} (type none to not import it): " arn | |
if [[ ${arn} != "none" ]] |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/bash -e | |
# This script will be use to automate the mongodb rpm updates steps on ReplicaSet nodes installed on EC2 instances with CentOS7 | |
mongo_connect() { | |
mongo --quiet ${MONGO_DB} -u ${MONGO_USER} -p ${MONGO_PASS} | |
} | |
usage() { | |
cat << EOF |
$ python get_logs.py rds-db-instance-name rds.log aws-access-key aws-secret-key
$ ./pgbadger -p '%t:%r:%u@%d:[%p]:' ./rds.log
$ open out.html
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
proxy_pass http://webserver:8080; | |
} | |
} | |
server { |
#!/bin/bash -x | |
# | |
# archive-cloudwatch-logs-to-s3.sh | |
# | |
# This script archives all cloudwatch logs to S3 for the specified environment | |
# Environment (prefix used in all matching cloudwatch log groups - ex: prod-tomcat, prod-apache, prod-mysql, ...) | |
ENV=$1 | |
# Destination S3 Bucket | |
S3_LOG_BUCKET="$2" |
#!/bin/bash | |
# | |
# Update docker image tag in a kubernetes deployment | |
# Kubernetes cluster address | |
K8S_CLUSTER="change.me" | |
# Kubernetes cluster certificate path | |
K8S_CERTIFICATE="/change/me" | |
# Kubernetes cluster token | |
K8S_USER="CHANGEME" |
#!/bin/bash | |
# | |
# Download and compress cloudwatch log for the specified group, stream and date | |
DATE=$1 | |
CLOUDWATCH_LOG_GROUP=$2 | |
CLOUDWATCH_LOG_STREAM=$3 | |
LOG_FILE="${DATE}-${CLOUDWATCH_LOG_GROUP}-${CLOUDWATCH_LOG_STREAM}.log" | |
echo "Installing awslog tools" |
#!/bin/bash -ex | |
export name | |
export template_url=$2 | |
aws cloudformation create-stack --stack-name ${name} --template-url ${template_url} \ | |
# Check StackStatus | |
sleep 120 |
#!/bin/bash | |
ENV=$1 | |
# Install terraform | |
if [ ! -x terraform ] | |
then | |
wget -q https://releases.hashicorp.com/terraform/0.8.8/terraform_0.8.8_linux_amd64.zip | |
unzip terraform_0.8.8_linux_amd64.zip | |
chmod +x terraform |