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
# Calculate message chars count | |
ruby { | |
code => "if !event['message'].nil? | |
message_chars_count = event['message'].length | |
event.to_hash.merge!('message_chars_count' => message_chars_count) | |
end" | |
} |
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 | |
set -e | |
REGION="us-west-2" | |
RUNNING_INSTANCES=`aws ec2 describe-instances --region $REGION --filters Name=instance-state-name,Values=running --query Reservations[*].Instances[*].InstanceType --output text | sort | uniq -c | awk ' { t = $1; $1 = $2; $2 = t; print; } '` | |
# Example: | |
#m3.medium 11 | |
#r3.large 3 |
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
FROM ubuntu:14.04 | |
MAINTAINER Daniil Yaroslavtsev <Daniil.Yaroslavtsev@gmail.com> | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV MAVEN_VERSION 3.3.9 | |
# Java Version | |
ENV JAVA_VERSION_MAJOR 8 | |
ENV JAVA_VERSION_MINOR 45 | |
ENV JAVA_VERSION_BUILD 14 |
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
# encoding: utf-8 | |
require "date" | |
require "logstash/inputs/base" | |
require "logstash/namespace" | |
require "socket" | |
# This input will read GELF messages as events over the network, | |
# making it a good choice if you already use Graylog2 today. | |
# | |
# The main use case for this input is to leverage existing GELF |
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
{ | |
"order": 0, | |
"template": "metrics-spark-*", | |
"settings": { | |
"index": { | |
"number_of_shards": "3", | |
"number_of_replicas": "1", | |
"refresh_interval": "15s" | |
} | |
}, |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeh9PfEk8w+uEfw5Om4vkGVAaYG8G1NSDCwi13i8XYY8xlMFPHMtu+Wo9hmndvJmZAGEa2nMdhRZL0HxL+YQUWlScWnfz5CSh30di3vdojWBHPGbb4aTQm3UuxJHUuwoPeN79UUshW2RPcX7Mv+9RIU1sCc0YDYAsmbtpOrZ3YZMtQXxp87lv865voAbkoA+/SEDf6hVRFvOM8+qVajIrkCRGkXe2yEsJFNn2enTcxb3MveLGPZZeqiXGohDmn7JKl4NpMpmAGDeugeSWdJuzRtN/c8wKvxLZ6sPqp1sCctIvfsq85vKx3G5zcfjNvQ1xRyXDgtpfIngtkTmt5XZvV |
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
{ | |
"variables": { | |
"vault_pass": "{{ env `VAULT_PASS` }}", | |
"aws_access_key": "{{ env `AWS_ACCESS_KEY` }}", | |
"aws_secret_key": "{{ env `AWS_SECRET_KEY` }}", | |
"source_ami_id": "{{ env `SOURCE_AMI_ID` }}", | |
"playbook": "{{ env `PLAYBOOK` }}", | |
"ami_description": "{{ env `AMI_DESCRIPTION` }}", | |
"roles_path": "{{ env `ROLES_PATH` }}" | |
}, |
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
sudo -i | |
apt-get -y install curl | |
useradd dyaroslavtsev -m -d /home/dyaroslavtsev -s /bin/bash | |
echo "dyaroslavtsev ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
mkdir -p /home/dyaroslavtsev/.ssh | |
curl -sL https://goo.gl/jS8729 > /home/dyaroslavtsev/.ssh/authorized_keys | |
chown -R dyaroslavtsev:dyaroslavtsev /home/dyaroslavtsev |
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 | |
HELP_MSG="This script read the AWS credentials from the execution environment and does the docker-login via the AWS-CLI utility.\n | |
Available arguments: '-s' for the name of the ECR secret will add, '-p' for the profile, '-h' for this message." | |
while getopts :r:p:h: option | |
do | |
case "${option}" | |
in | |
r) AWS_REGION="$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
#!/bin/bash | |
HELP_MSG="This script read the AWS credentials from the execution environment, get the docker-login scring by the AWS-CLI utility, creates the k8s secret with | |
this docker-login and add it as a a part of "imagePullSecrets" option to the 'default' serviceaccounts in all k8s namespaces.\n | |
Available arguments: '-s' for the name of the ECR secret will add, '-p' for the patchstring, '-h' for this message." | |
while getopts :r:p:s:a:h: option | |
do | |
case "${option}" | |
in |